PDA - Harvard CS 121 and CSCI E-207 Lecture 10: Pushdown...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Harvard CS 121 and CSCI E-207 Lecture 10: Pushdown Automata Harry Lewis October 6, 2009 Reading: Sipser, 2.2. Harvard CS 121 & CSCI E-207 October 6, 2009 Context-free Grammars and Automata What is the fourth term in the analogy: Regular Languages : Finite Automata as Context-free Languages : ??? 1 Harvard CS 121 & CSCI E-207 October 6, 2009 Sheila Greibach, AB Radcliffe 60 summa cum laude Inverses of Phrase Structure Generators Harvard PhD Thesis, 1963 2 Harvard CS 121 & CSCI E-207 October 6, 2009 Pushdown Automata = Finite automaton + pushdown store The pushdown store is a stack of symbols of unlimited size which the machine can read and alter only at the top. a b b a b a F.C. a d c b b pushdown store head can push (add symbols) or pop (remove and check symbols) reading head (L to R only, one symbol at a time, or stays put) Input Stack Transitions of PDA are of form ( q,, ) 7 ( q , ) , which means: If in state q with on the input tape and on top of the stack, replace by on the stack and enter state q while advancing the reading head over . 3 Harvard CS 121 & CSCI E-207 October 6, 2009 (Nondeterministic) PDA for even palindromes { ww R : w { a,b } * } ( q,a, ) 7 ( q,a ) Push a s ( q,b, ) 7 ( q,b ) and b s ( q,, ) 7 ( r, ) switch to other state ( r,a,a ) 7 ( r, ) pop a s matching input ( r,b,b ) 7 ( r, ) pop b s matching input 4 Harvard CS 121 & CSCI E-207 October 6, 2009 (Nondeterministic) PDA for even palindromes...
View Full Document

Page1 / 18

PDA - Harvard CS 121 and CSCI E-207 Lecture 10: Pushdown...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online