Regular language or not?

200 Views Asked by At

Let $L$ be a regular language over the alphabet $A=\{0, 1\}$. Is it true that the language of strings $0^n$, where binary representation of n $\in L$, is regular?

1

There are 1 best solutions below

0
On

HINT: Not necessarily. For $n\in\Bbb N$ let $\operatorname{bin}(n)$ be the binary representation of $n$. Suppose that $L$ is the language of the regular expression $10^*$; then the $n\in\Bbb N$ whose binary representations are in $L$ are precisely the powers of $2$. Show that the language $$\{0^n:\operatorname{bin}(n)\in L\}=\left\{0^{2^n}:n\in\Bbb N\right\}$$ is not regular.