Let’s look at a few examples of pushdown automata that accept the following languages:
- L={wcwR∣w∈(a+b)∗}
- M={wwR∣w∈(a+b)∗}
- N={ambn∣m<=n<=2m}
- P={na(w)=nb(w)∣w∈(a+b)∗}
- Q={nb(w)=2na(w)∣w∈(a+b)∗}
- R={aibjck∣i=j∨i=k}
- S={aibj∣i=j}
PDA for palindromes
The following PDA accepts the language L={wcwR∣w∈(a+b)∗}, i.e., odd-length palindromes of a's and b's with a c in the middle.