fbpx
Wikipedia

Deterministic pushdown automaton

In automata theory, a deterministic pushdown automaton (DPDA or DPA) is a variation of the pushdown automaton. The class of deterministic pushdown automata 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.

Formal definition Edit

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

 

where

  •   is a finite set of states
  •   is a finite set of input symbols
  •   is a finite set of stack symbols
  •   is the start state
  •   is the starting stack symbol
  •  , where   is the set of accepting, or final, states
  •   is a transition function, where
 
where   is the Kleene star, meaning that   is "the set of all finite strings (including the empty string  ) of elements of  ",   denotes the empty string, and   is the power set of a set  .

M is deterministic if it satisfies both the following conditions:

  • For any  , the set   has at most one element.
  • For any  , if  , then   for every  

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 those languages that are accepted by final state and are prefix-free: no word in the language is the prefix of another word in the language.[citation needed]

The usual acceptance criterion is final state, and it is this acceptance criterion which is used to define the deterministic context-free languages.

Languages recognized Edit

If   is a language accepted by a PDA  , 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  . If   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 (DCFL).

Not all context-free languages are deterministic. This makes the DPDA a strictly weaker device than the PDA. For example, the language Lp of even-length palindromes on the alphabet of 0 and 1 has the context-free grammar S → 0S0 | 1S1 | ε. If a DPDA for this language exists, and it sees a string 0n, it must use its stack to memorize the length n, in order to be able to distinguish its possible continuations 0n 11 0nLp and 0n 11 0n+2Lp. Hence, after reading 0n 11 0n, comparing the post-"11" length to the pre-"11" length will make the stack empty again. For this reason, the strings 0n 11 0n 0n 11 0nLp and 0n 11 0n 0n+2 11 0n+2Lp cannot be distinguished.[2]

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

Properties Edit

Closure Edit

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.[citation needed] 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 Edit

Géraud Sénizergues (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,[5][6][7] a proof that earned him the 2002 Gödel Prize. For nondeterministic PDA, equivalence is undecidable.

Notes Edit

  1. ^ Michael Sipser (1997). Introduction to the Theory of Computation. PWS Publishing. p. 102. ISBN 0-534-94728-X.
  2. ^ Hopcroft, John; Rajeev Motwani; Jeffrey Ullman (2001). Introduction to Automata Theory, Languages, and Computation (2 ed.). Addison-Wesley. pp. 249–253.
  3. ^ Kurki-Suonio, R. (1969). "Notes on top-down languages". BIT. 9 (3): 225–238. doi:10.1007/BF01946814. S2CID 60912010.
  4. ^ Rosenkrantz, D. J.; Stearns, R. E. (1970). "Properties of Deterministic Top Down Grammars". Information and Control. 17 (3): 226–256. doi:10.1016/s0019-9958(70)90446-8. Here: p.246–247
  5. ^ Sénizergues, Géraud (1997). "The equivalence problem for deterministic pushdown automata is decidable". Proc. Int. Coll. on Automata, Languages, and Programming (ICALP). Lecture Notes in Computer Science. Vol. 1256. pp. 671–681. doi:10.1007/3-540-63165-8_221. ISBN 978-3-540-63165-1. — Full version: Géraud Sénizergues (1997). L(A) = L(B)? (Technical Report 1161-97). Universite Bordeaux, LaBRI.
  6. ^ Géraud Sénizergues (2001). "Fundamental study: L(A) = L(B)? decidability results from complete formal systems". Theoretical Computer Science. 251 (1–2): 1–166. doi:10.1016/S0304-3975(00)00285-1.
  7. ^ Géraud Sénizergues (2002). "L(A) = L(B)? A simplified decidability proof". Theoretical Computer Science. 281 (1–2): 555–608. doi:10.1016/S0304-3975(02)00027-0.

Further reading Edit

deterministic, pushdown, automaton, automata, theory, deterministic, pushdown, automaton, dpda, variation, pushdown, automaton, class, deterministic, pushdown, automata, accepts, deterministic, context, free, languages, proper, subset, context, free, languages. In automata theory a deterministic pushdown automaton DPDA or DPA is a variation of the pushdown automaton The class of deterministic pushdown automata 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 1 Formal definition 2 Languages recognized 3 Properties 3 1 Closure 3 2 Equivalence problem 4 Notes 5 Further readingFormal definition EditA not necessarily deterministic PDA M displaystyle M can be defined as a 7 tuple M Q S G q 0 Z 0 A d displaystyle M Q Sigma Gamma q 0 Z 0 A delta where Q displaystyle Q is a finite set of states S displaystyle Sigma is a finite set of input symbols G displaystyle Gamma is a finite set of stack symbols q 0 Q displaystyle q 0 in Q is the start state Z 0 G displaystyle Z 0 in Gamma is the starting stack symbol A Q displaystyle A subseteq Q where A displaystyle A is the set of accepting or final states d displaystyle delta is a transition function whered Q S e G P Q G displaystyle delta colon Q times Sigma cup left varepsilon right times Gamma longrightarrow mathcal P Q times Gamma where displaystyle is the Kleene star meaning that G displaystyle Gamma is the set of all finite strings including the empty string e displaystyle varepsilon of elements of G displaystyle Gamma e displaystyle varepsilon denotes the empty string and P X displaystyle mathcal P X is the power set of a set X displaystyle X M is deterministic if it satisfies both the following conditions For any q Q a S e x G displaystyle q in Q a in Sigma cup left varepsilon right x in Gamma the set d q a x displaystyle delta q a x has at most one element For any q Q x G displaystyle q in Q x in Gamma if d q e x displaystyle delta q varepsilon x not emptyset then d q a x displaystyle delta left q a x right emptyset for every a S displaystyle 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 those languages that are accepted by final state and are prefix free no word in the language is the prefix of another word in the language citation needed The usual acceptance criterion is final state and it is this acceptance criterion which is used to define the deterministic context free languages Languages recognized EditIf L A displaystyle L A is a language accepted by a PDA A displaystyle 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 displaystyle L A If L A displaystyle 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 DCFL Not all context free languages are deterministic This makes the DPDA a strictly weaker device than the PDA For example the language Lp of even length palindromes on the alphabet of 0 and 1 has the context free grammar S 0S0 1S1 e If a DPDA for this language exists and it sees a string 0n it must use its stack to memorize the length n in order to be able to distinguish its possible continuations 0n 11 0n Lp and 0n 11 0n 2 Lp Hence after reading 0n 11 0n comparing the post 11 length to the pre 11 length will make the stack empty again For this reason the strings 0n 11 0n 0n 11 0n Lp and 0n 11 0n 0n 2 11 0n 2 Lp cannot be distinguished 2 Restricting the DPDA to a single state reduces the class of languages accepted to the LL 1 languages 3 which is a proper subclass of the DCFL 4 In the case of a PDA this restriction has no effect on the class of languages accepted Properties EditClosure Edit 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 citation needed 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 Edit 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 5 6 7 a proof that earned him the 2002 Godel Prize For nondeterministic PDA equivalence is undecidable Notes Edit Michael Sipser 1997 Introduction to the Theory of Computation PWS Publishing p 102 ISBN 0 534 94728 X Hopcroft John Rajeev Motwani Jeffrey Ullman 2001 Introduction to Automata Theory Languages and Computation 2 ed Addison Wesley pp 249 253 Kurki Suonio R 1969 Notes on top down languages BIT 9 3 225 238 doi 10 1007 BF01946814 S2CID 60912010 Rosenkrantz D J Stearns R E 1970 Properties of Deterministic Top Down Grammars Information and Control 17 3 226 256 doi 10 1016 s0019 9958 70 90446 8 Here p 246 247 Senizergues Geraud 1997 The equivalence problem for deterministic pushdown automata is decidable Proc Int Coll on Automata Languages and Programming ICALP Lecture Notes in Computer Science Vol 1256 pp 671 681 doi 10 1007 3 540 63165 8 221 ISBN 978 3 540 63165 1 Full version Geraud Senizergues 1997 L A L B Technical Report 1161 97 Universite Bordeaux LaBRI Geraud Senizergues 2001 Fundamental study L A L B decidability results from complete formal systems Theoretical Computer Science 251 1 2 1 166 doi 10 1016 S0304 3975 00 00285 1 Geraud Senizergues 2002 L A L B A simplified decidability proof Theoretical Computer Science 281 1 2 555 608 doi 10 1016 S0304 3975 02 00027 0 Further reading EditHamburger Henry Dana S Richards 2002 Logic and Language Models for Computer Science Upper Saddle River NJ 07458 Prentice Hall pp 284 331 ISBN 0 13 065487 6 a href Template Cite book html title Template Cite book cite book a CS1 maint location link Retrieved from https en wikipedia org w index php title Deterministic pushdown automaton amp oldid 1170978806, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.