#jsDisabledContent { display:none; } My Account | Register | Help

Deterministic pushdown automaton

Article Id: WHEBN0003972656
Reproduction Date:

 Title: Deterministic pushdown automaton Author: World Heritage Encyclopedia Language: English Subject: Collection: Publisher: World Heritage Encyclopedia Publication Date:

Deterministic pushdown automaton

In automata theory, a deterministic pushdown automaton (DPDA or DPA) is a variation of the pushdown automaton . The DPDA accepts the deterministic context-free languages, a proper subset of context-free languages.[1]

Machine transitions are based on the current state and input symbol, and also the current topmost symbol of the stack. Symbols lower in the stack are not visible and have no immediate effect. Machine actions include pushing, popping, or replacing the stack top. A deterministic pushdown automaton has at most one legal transition for the same combination of input symbol, state, and top stack symbol. This is where it differs from the nondeterministic pushdown automaton.

Contents

• Formal definition 1
• Languages recognized 2
• Properties 3
• Closure 3.1
• Equivalence problem 3.2
• Notes 4
• References 5

Formal definition

A (not necessarily deterministic) PDA M can be defined as a 7-tuple:

M=(Q\,, \Sigma\,, \Gamma\,, q_0\,, Z_0\,, A\,, \delta\,)

where

• Q\, is a finite set of states
• \Sigma\, is a finite set of input symbols
• \Gamma\, is a finite set of stack symbols
• q_0\,\in Q\, is the start state
• Z_0\,\in\Gamma\, is the starting stack symbol
• A\,\subseteq Q\,, where A is the set of accepting states
• \delta\, is a transition function, where
\delta\colon(Q\, \times ( \Sigma\, \cup \left \{ \varepsilon\, \right \} ) \times \Gamma\,) \longrightarrow \mathcal{P}(Q \times \Gamma ^{*})
where * is the Kleene star, meaning that \Gamma^{*} is "the set of all finite strings (including the empty string \varepsilon) of elements of \Gamma", \varepsilon denotes the empty string, and \mathcal{P}(X) is the power set of a set X.

M is deterministic if it satisfies both the following conditions:

• For any q \in Q, a \in \Sigma \cup \left \{ \varepsilon \right \}, x \in \Gamma, the set \delta(q,a,x)\, has at most one element.
• For any q \in Q, x \in \Gamma, if \delta(q, \varepsilon, x) \not= \emptyset\,, then \delta\left( q,a,x \right) = \emptyset for every a \in \Sigma.

There are two possible acceptance criteria: acceptance by empty stack and acceptance by final state. The two are not equivalent for the deterministic pushdown automaton (although they are for the non-deterministic pushdown automaton). The languages accepted by empty stack are the languages that are accepted by final state, as well as have no word in the language that is the prefix of another word in the language.

Languages recognized

If L(A) is a language accepted by a PDA A it can also be accepted by a DPDA if and only if there is a single computation from the initial configuration until an accepting one for all strings belonging to L(A). If L(A) can be accepted by a PDA it is a context free language and if it can be accepted by a DPDA it is a deterministic context-free language.

Not all context-free languages are deterministic. This makes the DPDA a strictly weaker device than the PDA. For example, the language of even-length palindromes on the alphabet of 0 and 1 has the context-free grammar S → 0S0 | 1S1 | ε. An arbitrary string of this language cannot be parsed without reading all its letters first which means that a pushdown automaton has to try alternative state transitions to accommodate for the different possible lengths of a semi-parsed string.[2]

Restricting the DPDA to a single state reduces the class of languages accepted to the LL(1) languages.[3] In the case of a PDA, this restriction has no effect on the class of languages accepted.

Properties

Closure

Closure properties of deterministic context-free languages (accepted by deterministic PDA by final state) are drastically different from the context-free languages. As an example they are (effectively) closed under complementation, but not closed under union. To prove that the complement of a language accepted by a deterministic PDA is also accepted by a deterministic PDA is tricky. In principle one has to avoid infinite computations.

As a consequence of the complementation it is decidable whether a deterministic PDA accepts all words over its input alphabet, by testing its complement for emptiness. This is not possible for context-free grammars (hence not for general PDA).

Equivalence problem

Geraud Senizergues (1997) proved that the equivalence problem for deterministic PDA (i.e. given two deterministic PDA A and B, is L(A)=L(B)?) is decidable,[4] a proof that earned him the 2002 Gödel Prize. For nondeterministic PDA, equivalence is undecidable.

Notes

1. ^
2. ^
3. ^ Kurki-Suonio, R. (1969). "Notes on top-down languages". BIT 9 (3): 225–238.
4. ^ Sénizergues, Géraud (1997). "The equivalence problem for deterministic pushdown automata is decidable". AUTOMATA, LANGUAGES AND PROGRAMMING. 1256/1997: 671–681.

References

• Hamburger, Henry; Dana Richards (2002).
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.

Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.