{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
Harvard CS 121 and CSCI E-207 Lecture 10: Pushdown Automata Harry Lewis October 6, 2009 Reading: Sipser, § 2.2.
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 2
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
Image of page 3

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

View Full Document Right Arrow Icon
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, σ, γ ) ( 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
Image of page 4
Harvard CS 121 & CSCI E-207 October 6, 2009 (Nondeterministic) PDA for “even palindromes” { ww R : w ∈ { a, b } * } ( q, a, ε ) ( q, a ) Push a ’s ( q, b, ε ) ( q, b ) and b ’s ( q, ε, ε ) ( r, ε ) switch to other state ( r, a, a ) ( r, ε ) pop a ’s matching input ( r, b, b ) ( r, ε ) pop b ’s matching input 4
Image of page 5

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

View Full Document Right Arrow Icon
Harvard CS 121 & CSCI E-207 October 6, 2009 (Nondeterministic) PDA for “even palindromes” { ww R : w ∈ { a, b } * } ( q, a, ε ) (
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern