CS250      Lab10 - Context-Free Pumping Lemma

Objectives:

  1. Recall the definition of the context-free pumping lemma:

    Let L be an infinite context-free language. Then there exists some positive integer m such that any w that is a member of L with |w| ≥ m can be decomposed as w = uvxyz, with |vxy| ≤ m, and |vy| ≥ 1, such that wi = uvixyiz, is also in L for all i = 0, 1, 2, ....

    In other words, any sufficiently long string in L can be broken down into five parts such that any number of repetitions of the 2nd and 4th pars will still yield in a string in L.

    JFLAP treats the context-free pumping lemma as a two-player game. One player, player A, is trying to prove that the language is not context-free, and the other player, player B, is trying to make it as hard as possible for player A to do so. The game is played like this:

    1. Player B picks an integer for m.
    2. Player A picks a string w such that w is a member of L and |w| ≥ m.
    3. Player B picks the partition of w into uvxyz such that |vxy| ≤ m and |vy| ≥ 1.
    4. Player A picks an integer i such that uvixyiz is not a member of L. If player A can do so, player A wins, otherwise, player B wins.

    If player A can pick a strategy such that they will always win regardless of player B's choices, it is equivalent to proof that the language is not context-free. JFLAP takes the role of player A, and you take the role of player B, with a few examples that are included.

    Explain in your own words why the existence of a strategy for player A that always wins is equivalent to proof that the language is not context-free.

     

  2. Play the game with a number of examples.  There is help on how to use the cases in the right box in the jflap tutorial http://jflap.org/tutorial/ .   Are all the languages non-context-free? 

     
    There is at least one context-free language there.  Which languages are context-free and which are not? For any context-free languages, explain how you won the game.  Does winning the game mean that the language IS context-free?

     


  3.  
    Write out formal pumping lemma proofs for exercises pp212 7d,g