In: Computer Science
Why does pumping strings in a CFL changes two parts of the string simultaneously?
Pumping Lemma for CFL states that for any Context Free Language
L, it is possible to find two substrings that can be ‘pumped’ any
number of times and still be in the same language. For any language
L, we break its strings into five parts and pump second and fourth
substring.
Pumping Lemma, here also, is used as a tool to prove that a
language is not CFL. Because, if any one string does not satisfy
its conditions, then the language is not CFL.
Thus, if L is a CFL, there exists an integer n, such that for
all x ∈ L with |x| ≥ n, there exists u, v, w, x, y ∈ Σ∗, such that
x = uvwxy, and
(1) |vwx| ≤ n
(2) |vx| ≥ 1
(3) for all i ≥ 0: uviwxiy ∈ L
Source : John E. Hopcroft, Rajeev Motwani, Jeffrey D. Ullman (2003). Introduction to Automata Theory, Languages, and Computation.