I am trying to use the pumping lemma to show this is not a context free language $$ L = \{a^n b^{2n} a^n\mid n\ge 0\} $$
My idea is fist assume it is a CFG language and let $n$ be the pumping lemma integer.
Then let $u=a^n b^{2n} a^n$ be a string. I am going to use to prove it is not a cfg language
Since $u=vwxyz$ and must follow all three conditions for the lemma.
So
$|wy|>0$ and $|wxy|\le n$ thus now I chose the first group of $a$ in the left of my string
and do
$vw^2xy^2z$ since $wy$ cannot include $b$, my $wxy$ string includes all $a$.
So then
$v w^2 x^2 z\notin L$ because $a^{n+1} b^{2n} a^n$ is not in language.
But am I correct?
a
s from each side, and the same number ofb
s asa
s. One of them has to contain bothb
s anda
s. Try multiplying that. It immediately breaks the grammar. – Millie Smith Apr 13 '15 at 04:30