Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm reading a book that states:

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

How can I go about proving it?

share|improve this question
    
Write "This automaton is..." or "These automata are...", but please don't use the plural as the singular. –  Michael Hardy Nov 24 '12 at 22:21
    
The use of good English is went... –  copper.hat Nov 24 '12 at 22:25
1  
Look at en.wikipedia.org/wiki/Pushdown_automaton –  copper.hat Nov 24 '12 at 22:27
    
anyone else has something to add? –  Mike Nov 25 '12 at 23:31
1  
The answer by MJD is correct and detailed. The hint by copper.hat however was right! Every FSA can be simulated by a context-free grammar (actually a regular, or right-linear grammar) which then can be transformed into a one state PDA (using empty stack acceptance). The result will be the same as in the solution by MJD. As the CFG will use a non-terminal for each state, and each sentential form will contain a single state/non-terminal, this same state will appear as stack in the final PDA. –  Hendrik Jan Dec 2 '12 at 0:34
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.