CS - 301 Theory of Automata

.

..e. i. » Pushdown-automata are recognizing mechanisms..» CFG are specification mechanisms. i. a CFG generates a context-free language. a PDA recognizes a context-free language. » CFG are like regular expressions and PDA are like FA.e.

are a new type of computation model » PDAs are like NFAs but have an extra component called a stack » The stack provides additional memory beyond the finite amount available in the control. » The stack allows PDA to recognize some non regular languages . PDA.» Pushdown automata.

» PDA are equivalent in specification power with CFG » This is useful because it gives us two options for proving that a language is context-free:  construct a CFG that generates the language or  construct a PDA that recognizes the language .

» A PDA can write symbols on the stack and read them back later » Writing a symbol “pushes down" all the other symbols on the stack » The symbol on the top of the stack can be read and removed. » When the top symbol is removed the remaining symbols move up .

Figure contrasts the schematic representations of PDA and NFA : a FSM a b b a FSM x a y b z b … .

» Writing a symbol on the stack is referred to as pushing the symbol » Removing a symbol from the stack is referred to as popping the symbol » All access to the stack may be done only at the top .

» A stack can hold an unlimited amount of information » A PDA can recognize a language like because it can use the stack to remember the number of 0s it has seen .

.

if stack becomes empty while there is still input or input finishes while stack is not empty reject . As each 0 is read push it onto the stack ˃ As soon as a 1 is read.» Informal algorithm: ˃ Read symbols from the input. pop a 0 off the stack for each 1 read ˃ If input finishes when stack becomes empty accept.

» PDA may be nondeterministic and this is a crucial feature because nondeterminism adds power » Some languages. such as do not require nondeterminism. but other do. Such a language is .

. . 𝛿. 𝐹 : » 𝑄 is a set of states » is the input alphabet » is the stack alphabet » 𝛿 is the transition functions » 𝑞𝑜 start states » 𝐹 set of accepting states . 𝑞𝑜 .» A pushdown automaton is a 6-tuple 𝑄.

0. ∈ (𝑷𝑶𝑷) 1.input symbol Z. X.input symbol Z. XZ 0.input symbol X. X. XX 0.initial state of stack( empty) XZ. Z.remove 0 PUSH 1.when Zero is added to stack 1.pervious state of stack ∈ (𝑃𝑂𝑃).Z 0.when Zero is added to stack . Z. ∈ (𝑷𝑶𝑷) 1.pervious state of stack ∈ (𝑃𝑂𝑃).input symbol X.remove 0 POP ∈.X.initial state of stack( empty) XZ.

Z. push Y 0. anything PUSH POP Empty.Z . POP 1.0. anything.push X 1.anything. POP 2 . Y. X. anything.

anything. push Y 0. POP 1. anything PUSH POP Empty. anything.» W = any sets of 0 and 1 » R = Reverse it 0. anything.push X 1. POP empty .Z . X. Z. Y.

any. any. any. any. any 1. Y any 1. any I SAW a 1 0.Z POP 0. any 1. any PUSH 0 .0. any. any 010000 010010 Mismatch I saw a O 0. any. any. any . any.Z. any 0. X any 1. any. any 1. any.

Sign up to vote on this title
UsefulNot useful