COMP 494: Quiz 2 --- Friday, 1 September 2000

  1. Design a Context-Free Grammar for the language L = {x in {a,b}*: x = x^R}.
    (Remember that (a_1 ... a_n)^R = a_n ... a_1.)

  2. Carefully, exactly, state the pumping lemma for context-free languages.

  3. Is the following grammar ambiguous? Prove your answer.
    S -> a S | a a a S | emptystring

  4. Make a DFA for the set of all strings of 0's and 1's with an even number of 0's, and then convert it into a CFG using the method shown in class.