[Math] Show that every finite automaton is a one-state pushdown automaton

automataformal-languages

I'm reading a book that states:

Every finite automaton is a one-state push-down automaton

How can I go about proving it?

Best Answer

Suppose the finite automaton makes transitions through states $q_0\to q_1\to q_2\to\ldots\to q_n$ in the process of accepting some string. Then you can arrange that your PDA does essentially the same thing, but instead of making state transitions, it makes the top (and only) stack symbol be $q_0\ldots, q_n$. Whenever the FA would have read input symbol $\sigma$ in state $q_a$ and made a transition to state $q_b$, the PDA instead will read input symbol $\sigma$ with $q_a$ on top of the stack and replace $q_a$ with $q_b$ on the stack. When the PDA reaches the end of the input, it can look to see if the top symbol on the stack represents an accepting state of the FA; if so, it pops it off, accepting by having an empty stack, and if not, it does nothing, rejecting the input.

Formally, say that the FA has input alphabet $\Sigma$, state set $Q$, accepting state set $A\subset Q$,and transition function $\delta:\Sigma\times Q\to Q$. Then define a PDA with input alphabet $\Sigma$, stack alphabet $Q$, state set $S=\{\bullet\}$ (there's your one state), and transition function $d:(\Sigma\cup\{\epsilon\})\times Q\times S\to Q^\ast\times S$ as follows: For $\sigma\in\Sigma$, take $d(\sigma,q,\bullet) = (\delta(\sigma, q), \bullet)$. For end-of-input, have $d(\epsilon, q, \bullet) = (\epsilon, \bullet)$ if $q\in A$ and $(q, \bullet)$ if not.