0

I have to prove that L satisfies the pumping lemma for CFL’s. The language L is not context-free but satisfies the pumping lemma for context-free languages. Let L be : L = {a^j b^k c^k d^k: j, k ≥ 1} ∪ {b^j c^k d^l : j, k, l ≥ 0}

I have previously tried doing proof by pumping lemma but I always end up messing up. I am hoping someone can explain to me how to solve this question. I am struggling a lot.

1 Answers1

0

To show this, we must show that for any string in L satisfying the hypothesis of the pumping lemma, the conclusion holds: that is, for any string w in L where |w| >= p, w can be rewritten as uvxyz such that |vxy| <= p, |vy| > 0 and for all n >= 0, u(v^n)x(y^n)z is also in L.

Let w be any string of length at least p in L. Either w begins with some a's or it doesn't. Consider these cases separately.

  1. if w begins with some a's, let vxy be some substring of a's only. Pumping the number of a's must keep the string in the language since the number of a's is arbitrary and we're not changing the numbers of b's, c's or d's, which must have been the same if our string had a's in it originally.

  2. if w doesn't begin with any a's, let vxy be any substring of a single kind of character. Pumping the number of that character doesn't matter since if our original string had no a's in it, the number of b's, c's and d's doesn't matter anyway. Because we're just pumping one symbol the order will be maintained and the string remains in the language.

Patrick87
  • 27,682
  • 3
  • 38
  • 73