Find $L$ such that $L^*=LL$ but $L \neq LL$

58 Views Asked by At

I need example for a language that $L^*=LL$ but $L \neq LL$

I tried $L=\{w| |w| \text{ is even}\}$

but I cant find example

2

There are 2 best solutions below

0
On BEST ANSWER

How about the set of all words over $\{a,b\}$ that are either empty or have a different number of $a$'s and $b$'s. So $LL=L^*$ would be all words over $\{a,b\}$, but $L$ itself is not.

Or even simpler, $L=\{w\mid |w|\neq3\}$

0
On

Take $L = 1 + a + a^3a^*$. Then $L^2 = L^* = a^*$, but $L \not= L^2$.