PlanetMath (more info)
 Math for the people, by the people.
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Medium Entry average rating: No information on entry rating
non-deterministic pushdown automaton (Definition)

A non-deterministic pushdown automaton (or PDA) is a variation on the idea of a non-deterministic finite automaton (NDFA). Unlike an NDFA, a PDA is associated with a stack (hence the name pushdown). The transition function must also take into account the state of the stack.

Formally defined, a non-deterministic pushdown automaton is a 6-tuple $ (Q,\Sigma,\Gamma,T,q_0,F)$. $ Q, \Sigma, q_0,$ and $ F$ are the same as for an NDFA. $ \Gamma$ is the stack alphabet, specifying the set of symbols that can be pushed onto the stack. The transition function is

$\displaystyle T : Q\times(\Sigma\cup\{\lambda\})\times\Gamma\to\mathcal{P}(Q).$

Like an NDFA, a PDA can be presented visually as a directed graph, called a state diagram. Instead of simply labelling edges representing transitions with the leading symbol, two additional symbols are added, representing what symbol must be matched and removed from the top of the stack (or $ \lambda$ if none) and what symbol should be pushed onto the stack (or $ \lambda$ if none). For instance, the notation a A/B for an edge label indicates that a must be the first symbol in the remaining input string and A must be the symbol at the top of the stack for this transition to occur, and after the transition, A is replaced by B at the top of the stack. If the label had been $ \verb=a=\,\lambda\verb=/B=$, then the symbol at the top of the stack would not matter (the stack could even be empty), and B would be pushed on top of the stack during the transition. If the label had been $ \verb=a=\,\verb=A/=\lambda$, A would be popped from the stack and nothing would replace it during the transition.

When a PDA halts, it is considered to have accepted the input string if and only if there is some final state where the entire input string has been consumed and the stack is empty.

For example, consider the alphabet $ \Sigma := \left\{ \verb=(=, \verb=)= \right\}$. Let us define a context-free language $ L$ that consists of strings where the parentheses are fully balanced. If we define $ \Gamma := \left\{ A \right\}$, then a PDA for accepting such strings is:

$\displaystyle \UseComputerModernTips \xymatrix{ \ar[r] & *++[o][F=]{0} \ar@(u,... ...\texttt{(}\,\lambda/\texttt{A}} \ar@(d,r)[]_{\texttt{)}\,\texttt{A}/\lambda} } $

Another simple example is a PDA to accept binary palindromes (that is, $ \left\{ w \in \left\{ 0, 1 \right\}^* \mid w = w^R \right\}$).

$\displaystyle \begin{xy} *!C\xybox{ \xymatrix{ \ar[r] & *+[o][F-]{0} \ar@(u,r)[... ...++[o][F=]{1} \ar@(u,r)[]^{0\,A/\lambda} \ar@(d,r)[]_{1\,B/\lambda} } } \end{xy}$

It can be shown that the language of strings accepted by any PDA is a context-free language, and that any context-free language can be represented by a PDA.



Anyone with an account can edit this entry. Please help improve it!

"non-deterministic pushdown automaton" is owned by Henry. [ full author list (4) | owner history (2) ]
(view preamble)

View style:

See Also: context-free language, non-deterministic finite automaton, automaton

Other names:  pushdown automaton, PDA
Also defines:  state diagram
Log in to rate this entry.
(view current ratings)

Cross-references: language, palindromes, binary, context-free language, entire, final state, even, string, label, edges, labelling, directed graph, alphabet, state, transition function, stack, non-deterministic finite automaton, variation
There are 5 references to this entry.

This is version 6 of non-deterministic pushdown automaton, born on 2002-02-24, modified 2007-08-16.
Object id is 2571, canonical name is PushdownAutomaton.
Accessed 17889 times total.

Classification:
AMS MSC68Q05 (Computer science :: Theory of computing :: Models of computation )
 68Q42 (Computer science :: Theory of computing :: Grammars and rewriting systems)
 03D10 (Mathematical logic and foundations :: Computability and recursion theory :: Turing machines and related notions)

Pending Errata and Addenda
None.
[ View all 1 ]
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)