Prove that a language is not context free

249 Views Asked by At

I was solving some hard exercises on context free grammer.

Consider the language L={w∈{a,b}^{*} :the length of the longest substring of all b’s in w is longer than any of the length of substring of just a’s in w}.

Prove that L is not context free.

I have tried this problem using pumping lemma and closure properties. How to go about it? Any help would be appreciated.

1

There are 1 best solutions below

1
On

Let $p$ be the pumping length. Then $b^pa^{p+1}\in L$ and also $b^{r}a^{p+1}$ for many $r>p$, contradiction.