Information AboutPushdown Automaton |
| CATEGORIES ABOUT PUSHDOWN AUTOMATON | |
| automata | |
| computational models | |
|
OPERATION Pushdown automata differ from normal finite state machines in two ways: # They can use the top of the stack to decide which transition to take. # They can manipulate the stack as part of performing a transition. Pushdown automata choose a transition by indexing a table by input signal, current state, and the top of the stack. Normal finite state machines just look by input signal and current state: they have no stack to work with. Pushdown automata add the stack as a parameter for choice. Given an input signal, current state, and a given symbol at the top of the stack, a transition path is chosen. Pushdown automata can also manipulate the stack, as part of performing a transition. Normal finite state machines choose a new state, the result of following the transition. The manipulation can be to push a particular symbol to the top of the stack, or to pop off the top of the stack. The automaton can alternatively ignore the stack, and leave it as it is. The choice of manipulation (or no manipulation) is determined by the transition table. Put together: Given an input signal, current state, and stack symbol, the automaton can follow a transition to another state, and optionally manipulate (push or pop) the stack. The (underlying) finite automaton is specifically a Nondeterministic Finite State Machine , giving what is technically known as a "nondeterministic pushdown automaton" (NPDA). If a Deterministic Finite State Machine is used, then the result is a Deterministic Pushdown Automaton (DPDA), a strictly weaker device. Nondeterminism means that there may be more than just one transition available to follow, given an input signal, state, and stack symbol. If we allow a finite automaton access to two stacks instead of just one, we obtain a more powerful device, equivalent in power to a Turing Machine . A Linear Bounded Automaton is a device which is more powerful than a pushdown automaton but less so than a Turing machine. Pushdown automata are equivalent to Context-free Grammars : for every context-free grammar, there exists a pushdown automaton such that the language generated by the grammar is identical with the language generated by the automaton, and for every pushdown automaton there exists a context-free grammar such that the language generated by the automaton is identical with the language generated by the grammar. FORMAL DEFINITION A PDA is formally defined as a 6-tuple: where
''Computation Definition 1'' For any PDA, , a computation path is an ordered (n+1)-tuple, , where Q, n 0, which satisfies the following conditions: (i) for i = 0, 1, 2,......, n-1, :where
Intuitively, a PDA, at any point in the computation process, faces a multiple possibilities of whether to read a symbol from the top of the stack and replace it with another symbol, or read a symbol from the top of the stack and remove it without replacement, or not read any symbol from the stack but only push another symbol to it, or does nothing. All these are governed by the simutaneous equations is called the stack content immediately before the transitional move and is the symbol to be removed from the top of the stack. is the stack content immediately after the transitional move and is the symbol to be added to the stack during the transitional move. Both and can be . If and , the PDA reads a symbol from the stack and replace it with another one. If and , the PDA reads a symbol from the stack and remove it without replacement. If and , the PDA simply adds a symbol to the stack. If and , the PDA leaves the stack unchanged. Note that when n=0, the computation path is just the singleton (q0). ''Computation Definition 2'' For any input w = w1w2...wm, wi , m0, M accepts w if a computation path and a finite sequence r0, r1, r2,...rm Q, mn, such that (i) For each i = 0, 1, 2,...m, ri is on the computation path. That is, : f(i) where if(i)n such that ri = qf(i) (ii) (qf(i)+1, bf(i)+1) (ri, wi+1, af(i)+1) for each i = 0, 1, 2,...m-1. :where af(i)+1 and bf(i)+1 are defined as in Computation Definition 1. (iii) (qj+1, bj+1) (qj, , aj+1) if qj {r0, r1,...rm} :where aj+1 and bj+1 are defined as in Computation Definition 1. (iv) rm = qn and rm F Note that the above definitions do not provide a mechanism to test for an empty stack. To do so, one would need to write a special symbol on the stack at the beginning of every computation so that the PDA would recognize that the stack is effectively empty whenever it detects the special symbol. Formally, this is done by introducing the transition (q0, = {(q1, $)} where $ is the special symbol. EXAMPLE |
|
|