2
$\begingroup$

Clearly we have to disprove this. But I am finding it hard to prove it. I was trying in following way:
Considering any non context free language $L$. I was trying to prove that $L^2$ is context free which will contradict given statement. But I don't know to how to prove it. Because by pumping lemma we can show only that language is not CFL but converse is not true.

Can you please help me? Or is there any other way to prove it?

$\endgroup$
  • $\begingroup$ What is $L^2{}$? $\endgroup$ – Mariano Suárez-Álvarez Nov 30 '14 at 22:20
  • $\begingroup$ I'd assume that $L^2 = \{ww : w\in L\}$. $\endgroup$ – Math1000 Nov 30 '14 at 22:25
  • 1
    $\begingroup$ Well, since also $\{uv:u,v\in L\}$ is a quite sensible interpretation, we'll have to wait for the OP to tell us what he meant! $\endgroup$ – Mariano Suárez-Álvarez Dec 2 '14 at 7:31
  • $\begingroup$ @math1000 There is no ambiguity, since $L^2 = LL$, as in any monoid. Thus the interpretation of mariano-suárez-alvarez is the right one. $\endgroup$ – J.-E. Pin Feb 1 '16 at 17:18
1
$\begingroup$

The answer is negative, even on a single letter alphabet $\{a\}$. Let $S$ be a non recursively enumerable subset of $\mathbb{N}$ and let $$ L = 1 \cup (aa)^*a \cup \{a^{2n} \mid n \in S \} $$ Then $L^2 = a^*$ and thus $L$ is regular, but $L$ is not recursively enumerable (an in particular not context free).

$\endgroup$
  • $\begingroup$ but the use of a non recursively enumerable subset of $\mathbb{N}$ is tedious. is there an example of a context-sensitive (but recursively enumerable) $L$ for which $L^2$ is context-free ? under the Goldbach conjecture $\{a^p, p \ \ \text{is prime}\}$ would work $\endgroup$ – reuns Feb 1 '16 at 17:45
  • $\begingroup$ @user1952009 It suffices to modify my example as follows: $L = 1 \cup (aa)^*a \cup \{a^{2p} \mid p \text{ is prime} \}$. Again $L^2 = a^*$, but $L$ is context-sensitive, and not context-free. $\endgroup$ – J.-E. Pin Feb 1 '16 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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