I can't think of an example of a non-regular language $L$ such that $L^*$ is regular. . Any help ?

  • 2
    $\begingroup$ Take a non-regular language $L$ over an alphabet $\Sigma$. Consider the language $L'=L\cup \Sigma$. The language $L'$ is not regular, but $L'\,^*$ is regular since it is equal to $\Sigma^*$. $\endgroup$ – babou Dec 15 '14 at 22:37

Define $L=\{a^nb^n|n\in \mathbb N\}\cup \{a,b\}$

It's not hard to see that while $L$ is not regular, $L^*=\Sigma^*$.

| cite | improve this answer | |
  • $\begingroup$ What do you mean by the union of $\{a,b\}$ with $L=\{a^nb^n|n\in \mathbb N\}$ ? I never saw a language defined like that. $\endgroup$ – Altaïr Dec 16 '14 at 0:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.