I am doing a problem where I am applying pumping lemma to the CFL L = {a^nb^nc^n : n >= 0}. Here is the start of a proof I was looking at:
- Assume L is a CFL, so there exists a pumping length p for L
- Choose w = a^p b^p c^p
- Look at decompositions of uv^ixy^iz where: a. |vy| >= 1 b. |vxy| <= p
The proof then says that there are only these cases to consider, and no other cases are valid to look at:
Case 1-3: v & y only contain as or v & y only contain bs OR v & y only contain cs Case 4-5: v & y contains only as and bs OR v & y contains only bs and cs
Why are these the only cases? Why can't v & y contain as and cs, or v & y contain as, bs, and cs (like, for example v contains as and bs, and y contains bs and cs). The person I saw the solution from explains that because we made each part of the string have length p, trying to have v & y contain as, bs, and cs will go over the pumping length p, but I don't get how it would go over the pumping length. He also doesn't explain why we cant have as and cs in v & y. If anyone could explain how trying to have as, bs, and cs in v & y doesn't work, and why we can't have as & cs only in v & y, I would really appreciate it. Thanks!
Structure
In this case the structure of the string we consider is:
Where the variable
prepresents the pumping length.Note that the length of
wis thus three times the pumping length.Redundant case
vxycontainsa^k b^l c^mAssume that
vxycontained the symbols 'a', 'b', and 'c'. Then we can write this structure as:vxy = a^k b^l c^mSuch thatk + l + m <= p, due to the pumping lemma rules (|vxy| <= p).However, as the original string has p a's, p b's, and p c's. We know that between the last 'a' and the first 'c' there are p 'b's. This shows that
l = p.Given that:
k + l + m <= p, we now know by substitutinglforpthat:k + p + m <= p, i.ek + m <= 0. This shows that if this case was possible, thenk = 0andl = 0.Which contradicts our assumption that the case contained the symbols 'a', 'b', 'c', as
kandlor both zero thus no 'a' or 'c' symbols are present. Showing that this case is not possible.vxycontainsa^k c^lIf a string contains both 'a' and 'c', then it must also include the 'b' symbols in between as if it contains an 'a' it must go through the 'b' symbols to get to the first 'c'.
This case is thus equivalent to the earlier case, which does not exist.