{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

PDA - Pushdown Automata PDAs Pushdown Automaton PDA Input...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Pushdown Automata PDAs Pushdown Automaton -- PDA Input String Stack States Initial Stack Symbol Stack $ Stack z bottom special symbol stack head top Appears at time 0 The States q 1 q 2 a , b → c Input symbol Pop symbol Push symbol q 1 q 2 a , b → c a b top input stack a Replace e h $ e h $ c q 1 q 2 a , λ → c a a Push b e h $ e h $ b c top input stack q 1 q 2 a , b → λ a a Pop b e h $ e h $ top input stack q 1 q 2 a , λ → λ a a No Change b e h $ e h $ b top input stack q 1 q 2 c b a → , a Pop top input stack Pop from Empty Stack Automaton halts! If the automaton attempts to pop from empty stack then it halts and rejects input Non-Determinism q 1 q 2 a , b → c q 3 a , b → c q 1 q 2 λ , b → c transition- λ PDAs are non-deterministic Allowed non-deterministic transitions Example PDA λ , λ → λ a , λ → a b , a → λ q q 1 q 2 q 3 b , a → λ λ , $ → $ PDA : M } : { ) ( ≥ = n b a M L n n λ , λ → λ a , λ → a b , a → λ q q 1 q 2 q 3 b , a → λ λ , $ → $ } : { ) ( ≥ = n b a M L n n Basic Idea: 1. Push the a’s on the stack 2. Match the b’s on input with a’s on stack 3. Match found a , λ → a b , a → λ q q 1 q 2 q 3 Execution Example: Input a a a b b b current state b , a → λ Time 0 λ , λ → λ λ , $ → $ Stack $ a , λ → a b , a → λ q q 1 q 2 q 3 Input a a a b b b b , a → λ Time 1 λ , λ → λ λ , $ → $ Stack $ a , λ → a b , a → λ q q 1 q 2 q 3 Input Stack a a a b b b $ a b , a → λ Time 2 λ , λ → λ λ , $ → $ a , λ → a b , a → λ q q 1 q 2 q 3 Input Stack a a a b b b $ a a b , a → λ Time 3 λ , λ → λ λ , $ → $ a , λ → a b , a → λ q q 1 q 2 q 3 Input Stack a a a b b b $ a a a b , a → λ Time 4 λ , λ → λ λ , $ → $ a , λ → a b , a → λ q q 1 q 2 q 3 Input a a a b b b Stack $ a a a b , a → λ Time 5 λ , λ → λ λ , $ → $ a , λ → a b , a → λ q q 1 q 2 q 3 Input a a a b b b $ a Stack b , a → λ Time 6 λ , λ → λ λ , $ → $ a a , λ → a b , a → λ q q 1 q 2 q 3 Input a a a b b b $ Stack b , a → λ Time 7 λ , λ → λ λ , $ → $ a a , λ → a b , a → λ q q 1 q 2 q 3 Input a a a b b b b , a → λ Time 8 accept λ , λ → λ λ , $ → $ $ Stack A string is accepted if there is...
View Full 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