0

While studying I've encountered this question written above. I am familiar to the closure properties of CFL, and even know that $$L=\{a^{j^2}|j\geqslant 0\}$$ ($a$ to the power of ($j$ to the power of $2$))
is one that answers the question, but I don't know how to prove that.

If anyone could explain it to me, it would be excellent!
Thank you.

Nathaniel
  • 18,309
  • 2
  • 30
  • 58
Ben Arviv
  • 3
  • 1

1 Answers1

1

I think proving that $\text{Pref}(L)$ is CFL is the easiest part (it is even regular): ask yourself what are all prefixes of a word $a^{j^2}$.

Proving that $L$ is not CFL is done here.

You can use the pumping lemma for CFL or, even better, the pumping lemma for regular languages (using the fact that a CFL over a one-letter alphabet is a regular language).

Nathaniel
  • 18,309
  • 2
  • 30
  • 58