CS 162 - Automata Theory Homework 5, 25 Points
Due: Friday, February 17, 11:55pm

  1. 5 points. Problem 2.26 in Sipser.
  2. 5 points. Problem 2.31 in Sipser.
  3. 5 points. Problem 2.32 in Sipser.
  4. 5 points. Consider the following grammar:
    S -> AB | BC
    A -> BA | a
    B -> CC | b
    C -> AB | a
    Show the table that results from running the CYK algorithm discussed in class to CFG membership for each of the following strings (and say whether or not the string is in the language generated by the CFG above):
    (a) baaab
    (b) aabab
  5. 5 points. In general, the intersection of two context-free languages is not a context-free language, as we showed in class. But sometimes it is. Let L be the set of all strings of the form aibjcndm, where i is greater than or equal to j and n is greater than or equal to m, and all of i, j, n, and m are at least 1. Let M be the set of all strings of the form aibjcndm, where i is less than or equal to j and n is less than or equal to m, and all of i, j, n, and m are at least 1. Show that L, M, and the intersection of L and M are all context-free languages.