Exam 1

Exam 1: [PDF]

Exam 1 Preliminary Comments: [PDF]

Read the revision opportunity information at the top of the Exam 1 preliminary comments handout carefully. Revised answers are due at the beginning of the next class (Tuesday, March 16, 2:01pm).

4 comments to Exam 1

  • cs_ai

    For question 2d, I am confused whether you are asking us to prove that squarefree has a pumping length p for any p, or just to answer the the original exam question, or both.

    • I don’t understand what you mean by, “squarefree has a pumping length p for any p”. When we use the pumping lemma, we can’t make any assumptions about the value of p, other than it is some positive integer. A pumping lemma proof starts by assuming there exists a DFA (for regular languages) or CFG (for context-free languages) with some pumping length p, but we can’t assume anything about the value of p.

  • Nathan

    For the revision for Problem 3: Mystery Language Problem

    It seems from your comments that it should be possible for a one state PDA to recognize all finite languages. Is this true.

    • A one state PDA can’t do it (unless you also allow an implicit rejecting state and preloading the stack), but a PDA with 3 states can definitely recognize all finite languages.