COMS W3261
Computer Science Theory
Lecture 10: October 8, 2012
Properties of Context-Free Languages

Outline

1. Eliminating Useless Symbols from a CFG

2. Eliminating ε-productions from a CFG

3. Eliminating Unit Productions from a CFG

4. Putting a CFG into Chomsky Normal Form

5. Pumping Lemma for CFL's

6. Cocke-Younger-Kasami Algorithm for Testing Membership in a CFL

7. Practice Problems

  1. Eliminate useless symbols from the following grammar:
  2. S → AB | CA
    A → a
    B → BC | AB
    C → aB | b
    
  3. Put the following grammar into Chomsky Normal Form:
  4. S → ASB | ε
    A → aAS | a
    B → BbS | A | bb
    C → aB | b
    
  5. Show that { anbncn | n ≥ 0 } is not context free.
  6. Show that { anbnci | in } is not context free.
  7. Show that { ssRs | s is a string of a's and b's } is not context free.
  8. (Hard) Show that the complement of { ss | ss is a string of a's and b's } is context free.

8. Reading Assignment



aho@cs.columbia.edu