Is $a^n b^n$ context free even if we take strings instead of characters?

115 Views Asked by At

Let a and b be 2 strings . Does the set {$a^nb^n$ , $n\geq0$} still form a context free language?

Intuitively, I feel that should be the case since in this case I'm just storing strings instead of characters in my stack for the Pushdown automata but I am not able to prove anything. Any help would be appreciated !

1

There are 1 best solutions below

0
On BEST ANSWER

Yes.

As a hint, recall the homomorphic image of a context free language is context free.

Can you see why your language is a homomorphic image of the context free language $\{ x^ny^n \} \subseteq \{x,y\}^*$?


I hope this helps ^_^