1

Hi I am trying to do practice questions for pumping lemma. I need to prove that the language L = {w E alphabet a,b,c | there are twice as many as as bs and twice as many bs than cs in w}

Now i created a word w = a^4n * b^2n * c^n which belongs to L. I keep trying to go further in the calculation but I do not understand what to do. How do I find what xyz represent? And how do I prove that there is a contradiction? I've been trying for ages now and looking all over the internet but I am really struggling.

ArronK
  • 33
  • 2
  • 7

1 Answers1

1

Here is the pumping lemma for context-free languages :

If a language L is context-free, then there exists some integer p ≥ 1 (called a "pumping length") such that every string w in L that has a length of p or more symbols (i.e. with |w| ≥ p) can be written as

w = uvxyz with substrings u, v, x, y and z, such that

  1. |vxy| ≤ p,
  2. |vy| ≥ 1, and
  3. u(v^i)x(y^i)z is in L for all i ≥ 0.

Taken from wikipedia

Let's take a look at the string w=(a^4p)(b^2p)(c^p)

To show a contradiction we should show that for every substring of w, pumping the word, will take it out of the language.

Let's look at several cases:

  1. vxy (or in your case you marked it as "xyz") contains a sequence of 1 letter (let's assume the letter is a so the sequence is a^k where k>=1). For this case, if you pump the string for i=2 for example you will get : u(v^2)x(y^2)z=uvvxyyz=(a^(4p+|vy|))(b^2p)(c^p) which is not a word from the language because 4p+|vy| is bigger than 2*2p (as twice amount as bs).

  2. vxy contains a sequence of 2 letters (let's assume the letters are as followed by bs, so the sequence is (a^k)(b^l) k,l >= 1). For this case, if you pump the string for i=2 you will get : u(v^2)x(y^2)z=uvvxyyz=(a^(4p+|vy|))(b^(2p+|vy|))(c^p) which is not a word from the language because 2p+|vy| is bigger than 2*p (bs twice amount as cs)

You can show that for every letter a, b or c pumping with the first case will get the word out of the language, and for every sequence of 2 letters (a^k)(b^l) or (b^k)(c^l) pumping with the second case will get the word out of the language.

Because of the condition that |vxy| ≤ p, we can not get a sequence of 3 letters. The shortest substring we can get with 3 letters is : a(b^2p)c with a length of 2p+2 which is not valid for this condition.

So we showed that for every substring that we choose, pumping the word will get it out of the language. We got a contradiction that this language qualifies the pumping lemma, therfore this language is not a Context-Free language.

Ron537
  • 990
  • 1
  • 9
  • 20
  • 1
    An apparently often overlooked detail is the fact that the statement in point 3 includes zero, which corresponds to _shrinking_ the constructed word which satisfies the properties. So, in total, one could also argue as follows. As the length of `vxy` does not exceed `p`, it cannot contain more than two different letters (either only `a`, `a` and `b`, `b` and `c`, only `c`) so shrinking it away we obtain `uxz`, in which the number of either only one or two, but not three letters have decreased. `uxz` is in the language, but does not satisfy its defining property - a contadiction. – Codor Feb 25 '17 at 19:32