Prove that language is non-context free $L=\{a^{n^2}b^n|n\ge 0\}$

40 Views Asked by At

$\{a^{n^2}b^n|n\ge 0\}$
Is there any way to solve it beyond Pumping lemma ?

1

There are 1 best solutions below

2
On

The pumping lemma will work. Show that if $r,s\ge 0$, and at least one of $r$ and $s$ is positive, then there is always a $k\ge 0$ such that

$$p^2+(k-1)r\ne\big(p+(k-1)s\big)^2\;.$$