Is language, made of the first half of the words from context-free language, context-free?

1.9k Views Asked by At

L is context-free language. Then we make new language L'={x|$\exists$y xy∈L,|x|=|y|}. Is L' context-free or not always? I'm stuck on this problem. I suppose that there are examples when L' isn't context-free, but can't create any.

1

There are 1 best solutions below

0
On

http://infolab.stanford.edu/~ullman/ialc/spr10/sol/solution4.pdf gives a counterexample:

$$L = \{ 0^i1^j2^j3^{3i}: i,j \ge 1 \}$$

is context free but half($L$) is not. The argument is sketched in the linked PDF.