0
$\begingroup$

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

$\endgroup$
1
  • 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
    Commented Dec 15, 2014 at 22:37

1 Answer 1

1
$\begingroup$

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^*$.

$\endgroup$
1
  • $\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
    Commented Dec 16, 2014 at 0:42

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