This is an old revision of the document!
Push down automata
Exercise 1. Write PDAs for the following languages: 1.1. $ L = \{\: w \in \{A,B\}^* \| w is a palindrome\} $ 1.2. L = {w in {A,B}* . #A(w) =/= #B(w)} 1.3. L = {A^nB^{m+n}C^n . n,m >= 0} 1.4. L = {A^nB^nC^mD^m . n,m >= 0} U {A^nB^mC^mD^n . n,m >= 0} 1.5. L = {A^iB^jC^k . i = j or j = k} 2. Acceptance by empty stack. Consider the following definition for an accepted word, by a PDA: (q0, w, Z0) |- (q,e,e) where q is any state from K Prove that a language is CF iff it can be accepted by a PDA via the empty-stack definition. (Hint, you need to prove two parts) Collapse