CS3800 10F: Homework 05

Assigned: Wed 10-13
Due: Wed 10-20


  1. Please review the grading policy outlined in the course information page.

  2. On the first page 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...

    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.


Required: 5 of the following 6 problems
Points: 20 pts per problem

Note: This assignment cannot be handed in late. I will be passing out solutions to this assignment the day it is due, in preparation for the midterm exam.

  1. Construct both a CFG and a PDA for the following language: {ai bk | i <= k <= 2i}.
  2. Prove that your CFG is correct. Prove that your PDA is correct.

  3. Consider the following language: {ak b2k | 0 <= k }. Give two CFG grammars for L, one that is ambiguous and one that is not. Note: you have to prove that one grammar is ambiguous and that the other one is not.
  4. Problem 2.19.
  5. Problem 2.30 parts a, d.
  6. Problem 2.31.
  7. Problem 2.32.