1. Draw a state diagram of a pushdown automaton that recognizes the language
{ w ∈ {a,b}* : #a(w) - #b(w) = 3k for some positive integer k }.
The notation #a(w) means the number of times
a occurs in w.
2. Draw a state diagram of a pushdown automaton that recognizes the language
{ w#x : xR is a substring of w for some w, x ∈ {a,b}* }.
Note that the input alphabet is { a, b, # }.
3. Do Exercise 2.12
4. Do Exercise 2.15
5. Figure 2.19 on page 116 shows a PDA M3
that recognizes the language
{ wwR : w ∈ {0,1}* }
and Figure 1.20 on page 43 shows a DFA D
that recognizes the language
{ w ∈ {0,1}* : #1(w) is odd }.
Use the algorithm we did in class to construct a PDA that
recognizes L(M3) ∩ L(D)
Extra credit. Prove that the complement of the language
{ ww : w ∈ {a,b}* }
is context-free by either giving
a CFG generating it or a PDA recognizing it.