CS4311: Introduction to Computation Theory hw2

CS 4311 Introduction to Computation Theory
Homework 4: Chapter 2

Due: Monday, 10/2/00, beginning of class (Assigned: Monday, 9/25/00)

You are required to turn in answers to all the questions. However, only a random subset of the questions will be graded. While discussion with others is permitted and encouraged, the final work should be done individually. You are not allowed to work in groups. The answers, comments, and programs (if any) must be the original work of the author. You are allowed to build on material supplied in the class. If you use any other source than the current class notes and the textbook, specify it clearly.

1. (Exercise 2.9) Give a context-free grammar that generates the language

Is your grammar ambiguous? Why or why not?

2. (Exercise 2.14) Convert the following CFG into an equivalent CFG in Chomsky normal form, using the procedure given in Theorem 2.6. (Note: e is epsilon)

  A -> BAB | B | e
  B -> 00 | e

3. (Exercise 2.11) Convert the CFG G4 given in Exercise 2.1 to an equivalent PDA using the procedure given in Theorem 2.12.

4. (Exercise 2.18b) Use the pumping lemma to show that the following language is not context free.

5. (Exercise 2.18c) Use the pumping lemma to show that the following language is not context free.

6. (Exercise 2.2) a. Use the languages A={ambncn | m,n >= 0} and B={anbncm | m,n >= 0} together with Example 2.20 to show that the class of context-free languages is not closed under intersection.
b. Use part (a) and DeMorgan's Law (Theorem 0.10) to show that the class of context-free languages is not closed under complementation.