60 likes | 333 Views
PDA. Languages accepted by nondeterministic pushdown automata. Languages accepted by deterministic pushdown automata. Chapter 14: Pushdown Automata. Languages accepted by finite automata nondeterministic finite automata transition graphs. Acceptance Criteria for PDA.
E N D
Languages accepted by nondeterministic pushdown automata Languages accepted by deterministic pushdown automata Chapter 14: Pushdown Automata • Languages accepted by • finite automata • nondeterministic finite automata • transition graphs Zaguia/Stojmenovic
Acceptance Criteria for PDA • Goal: (acceptance) • Terminate in a non-null state • Read the entire input string • Terminate with an empty stack • Informally, a string is accepted if there exists a computation that uses up all the input and leaves the stack empty.
Acceptance Criteria for PDA • There are two possible acceptance criteria for PDA: 1. acceptance by empty stack 2. 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 Ω for the initial stack symbol, instead adding a first transition which writes a start symbol to the stack.
Deterministic PDA • A DPDA is simply a pushdown automata without non-determinism. • i.e. no epsilon transitions or transitions to multiple states on same input • Only one state at a time • DPDA not as powerful a non-deterministic PDA • This machine accepts a class of languages somewhere between regular languages and context-free languages. • For this reason, the DPDA is often skipped as a topic • In practice the DPDA can be useful since determinism is much easier to implement. • Parsers in programs such as YACC are actually implemented using a DPDA.