CSG714 04S: Homework 04

Created: Wed 04 Feb 2004
Last modified: 

Assigned: Wed 04 Feb 2004
Due: Wed 11 Feb 2004


General Instructions

  1. Please review the grading policy outlined in the course information page.

  2. On the first page of each part of your solution write-up, you must make explicit which problems are to be graded for "regular credit", which problems are to be graded for "extra credit", and which problems you did not attempt. Please use a table something like the following

    Problem01020304 0506070809...
    CreditRCRCRCECRC RCNARCRC...

    where "RC" is "regular credit", "EC" is "extra credit", and "NA" is "not applicable" (not attempted). Failure to do so will result in an arbitrary set of problems being graded for regular credit, no problems being graded for extra credit, and a five percent penalty assessment.

  3. You must also write down with whom you worked on the assignment. If this changes from problem to problem, then you should write down this information separately with each problem.


Problems

Required: 5 of the following 7 problems
Points: 20 pts per problem

  1. Show that the context-free languages are closed under Reverse. (See Problem 1.24 for the definition of Reverse.) A construction is insufficient; you must also provide a proof.

  2. Problem 2.18 (a,c)

  3. Prove that the following language is not context-free.

    {0n1m | m = n2}

  4. Prove that the following language is not context-free.

    {wwRw | w in {0,1}*}

  5. Show that the following language satisfies the three conditions of the strong version of the Pumping Lemma for CFLs despite the fact that it is not context-free. (The strong version of the Pumping Lemma requires that both v and y are non-empty; see Problem 2.28.)

    {anbncm | m != n}

    Note: "!=" is "not equal."

    Note: Satisfying the conditions of the strong Pumping Lemma implies satisfication of the conditions of the standard Pumping Lemma.

  6. Prove that the language described in the preceding problem is not context-free using Ogden's Lemma.

    Ogden's Lemma: Let L be an context-free language. Then there exists a constant k such that if w is any string in L, |w| >= k, and we mark any k or more positions of w as "distinguished," then w may be divided into five pieces w = uvxyz satisfying the conditions:

    1. v and y together have at least one distinguished position,
    2. vxy has at most k distinguished positions, and
    3. for all i >= 0, uvixyiz is in L.

    Hint: Consider the string akbkck+k!.

  7. Prove that the context-free languages are not closed under FirstHalf. (See HW01, Problem 9, for the definition of FirstHalf.)

    Hint: Construct a CFL A such that all strings in FirstHalf(A) which end in a single # must have the form anbncn#.


Switch to:


jaa@ccs.neu.edu