This has been confusing me for a while, how do we exactly choose the pumping length when we want to prove whether a language is CFL or not. For example, when we want to prove that {ww, w: {0,1}* } why do we choose p = n as 0^p 1^p 0^p 1^p ?
Asked
Active
Viewed 16 times
0
-
You don't get to choose $p$. All that the lemma promises if is that if the language is context-free then there exists a $p$ for which the rest of the conditions hold. – Yuval Filmus Apr 17 '18 at 10:16
-
@YuvalFilmus can you give me an example? – Refo Ilmiya Apr 17 '18 at 10:22
-
Look up any textbook example of application of the pumping lemma. It's exactly the same issue for the pumping lemma for regular languages, so you can look up at such examples as well. – Yuval Filmus Apr 17 '18 at 10:23