CSG714 04S: Homework 03

Created: Wed 28 Jan 2004
Last modified: 

Assigned: Wed 28 Jan 2004
Due: Wed 04 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.


Specific Instructions

For each problem where you are required to devise a CFG, you must clearly indicate the purpose of each of your non-terminals. This can be accomplished most effectively by specifying the language generated by each non-terminal, as we did in class, for example.


Problems

Required: 7 of the following 9 problems
Points: 14 pts per problem

  1. Construct CFGs for the following languages.

  2. Construct PDAs for the languages specified in the following exercises.

  3. Exercise 2.6 (a)

  4. Exercise 2.6 (b)

  5. Exercise 2.8

  6. Problem 2.21 (a)

    Hint: The ambiguity present in the grammar shown in Problem 2.21 is due to the if-then and if-then-else statements. The ambiguity you will discover is referred to as the "dangling else" ambiguity.

  7. Problem 2.21 (b)

  8. Problem 2.26

  9. Problem 2.27


Switch to:


jaa@ccs.neu.edu