Reading: Kozen, Sections 27, 28, 29, and 30

Questions: Select any one part to be handed in at the beginning of class on Monday, April 15. Hand in the remaining parts on Wednesday, April 17. Your solutions must be typeset in LaTeX. Figures may be drawn by hand. Each solution must be handed in separately. Print front and back. If a single solution requires multiple pages, staple them. List your collaborators and include the honor code.

Part 1: Public Display of Aggression

a. Give an NPDA for L = fa^{n}b^{n+m}c^{m}g. You may choose to accept by nal state or empty stack. No formal proof required, but give a clear, concise explanation.

b. In your NPDA give the sequence of transitions you would apply to accept the string abbbcc. (It will help to label your transitions in the previous part.)

c. Brie y argue that there is no sequence of transitions that would lead your machine to accept acbbbcc.

Part 2: osure Show using PDAs that if A is a context-free language, then

Suf f ix(A) = fv j uv 2 A for some string u 2 g

is also context-free. In other words, you should:

Informally describe a procedure for turning an NPDA for A into an NPDA for Suf f ix(A).

Formally specify your procedure.

Prove that your construction is correct.

Part 3: Double Trouble

Let’s de ne a Twin Pushdown Automaton (TPDA) to be like a standard Pushdown Automaton with two stacks, rather than one. In particular, the transition function would include transitions of the form

(p; a; A; B) ! (q; ; ) for p; q 2 Q, a 2 [ f g, A; B 2 and ; 2 .

Such a rule would mean that while in state p, if the character a is read from the string, A is top of the rst stack, and B is on top of the second stack, then we can move to state q, pop A and B from their respective stacks, and push and onto the rst and second stack respectively. The 1 remainder of the de nition of a TPDA would be analogous to that of a standard PDA. Acceptance is by nal state.

Prove that TPDAs and NPDAs are not equivalent in expressive power. In other words, nd a language L that is not context-free, but for which there exists a TPDA. You do not need to prove that your TPDA accepts L (though you should provide a brief explanation and a formal description of your TPDA). You do need to prove that L is not context-free.