article

In automata theory, a pushdown automaton is a finite automaton that can make use of a stack containing data. The term "pushdown" refers to the "pushing down" action by which the prototypical mechanical automaton would physically contact a punchcard to read its information. The term "pushdown automata" (PDA) currently refers to abstract computing devices that recognize context-free languages.

Operation


Pushdown automata differ from normal finite state machines in two ways: (1) They can use the top of the stack to figure out what transition to take. (2) 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 don't have a 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, the manipulation can be to pop off the top of the stack. Or, the automata can ignore the stack, and leave it as it is. The choice of manipulation (or no manipulation) is determined by the transition table.

Put together: A given input signal, current state, and stack symbol, can follow a transition to another state, and an optional stack manipulation.

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.

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. Conversely, 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.

Definition


A NPDA W can be defined as a 7-tuple:

W=(Q,\Sigma,\Phi,\sigma,s,\Omega,F) where

  • Q is a finite set of states
  • \Sigma is a finite set of the input alphabet
  • \Phi is a finite set of the stack alphabet
  • \sigma (or sometimes \delta) is a finite transition relation (Q \times ( \Sigma \cup \left \{ \epsilon \right \} ) \times \Phi) \longrightarrow P( Q \times \Phi ^{*} )
  • s is an element of Q the start state
  • \Omega is the initial stack symbol
  • F is subset of Q, consisting of the final states.

There are two possible acceptance criteria: acceptance by empty stack and acceptance by final state. The two are easily shown to be equivalent: a final state can perform a pop loop to get to an empty stack, and a machine can detect an empty stack and enter a final state by detecting a unique symbol pushed by the initial state.

Some use a 6-tuple, dropping the \Omega for the initial stack symbol, instead adding a first transition which writes a start symbol to the stack.

Example


The context-free language \{a^kb^k | k \ge 0 \} can be recognized with the following pushdown automata:

M = (\{q_0, q_1, q_2, q_3\}, \{a,b\}, \{A,\underline{A}\}, \delta, q_0, \{q_0, q_3\} \}),

where the transitions are

\delta(q_0, a, \epsilon) = \{(q_1, \underline{A})\}

\delta(q_1, a, \epsilon) = \{(q_1, A)\}

\delta(q_1, b, A) = \{(q_2, \epsilon)\}

\delta(q_1, b, \underline{A}) = \{(q_3, \epsilon)\}

\delta(q_2, b, A) = \{(q_2, \epsilon)\}

\delta(q_2, b, \underline{A}) = \{(q_3, \epsilon)\}

\delta(q, \theta, \rho) = \empty for any other (q, \theta, \rho)

The meaning of the transitions can be explained by looking at the first transition

\delta(q_0, a, \epsilon) = \{(q_1, \underline{A})\}

When q_0 is the current state, a is the input and \epsilon is taken from the top of the stack then the state changes to q_1 and \underline{A} is written to the top of the stack.

See also


External links


References


  • Section 2.2: Pushdown Automata, pp.101–114.

Computational models

Zásobníkový automat | Kellerautomat | Autómata con pila | Automate à pile | Automa a pila | プッシュダウン・オートマトン | Pinoautomaatti | 下推自动机

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Pushdown automaton".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld