Push Down Automata - Fall 2004-2005 CSI 301 1 Pushdown...

Info iconThis preview shows pages 1–24. 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

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

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

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: Fall 2004-2005 CSI 301 1 Pushdown Automata PDAs Fall 2004-2005 CSI 301 2 Pushdown Automaton -- PDA I nput String Stack States Fall 2004-2005 CSI 301 3 I nitial Stack Symbol Stack $ Stack z bottom special symbol stack head top Fall 2004-2005 CSI 301 4 The States q 1 q 2 a , b c I nput symbol Pop symbol Push symbol Fall 2004-2005 CSI 301 5 q 1 q 2 a , b c a b top input stack a Replace e h $ e h $ c Fall 2004-2005 CSI 301 6 q 1 q 2 a , c a a Push b e h $ e h $ b c top input stack Fall 2004-2005 CSI 301 7 q 1 q 2 a , b a a Pop b e h $ e h $ top input stack Fall 2004-2005 CSI 301 8 q 1 q 2 a , a a No Change b e h $ e h $ b top input stack Fall 2004-2005 CSI 301 9 q 1 q 2 $ , a a a Pop $ top input stack A Possible Transition empty Fall 2004-2005 CSI 301 10 q 1 q 2 c b a , a input A Bad Transition The automaton H alts in state and Rejects the input string Empty stack q 1 H ALT Fall 2004-2005 CSI 301 11 q 1 q 2 c a , a input A Bad Transition The automaton H alts in state and Rejects the input string Empty stack q 1 H ALT Fall 2004-2005 CSI 301 12 q 1 q 2 z y x , No transition is allowed to be followed When the stack is empty Empty stack Fall 2004-2005 CSI 301 13 q 1 q 2 b a $ , a a Pop $ top input stack A Good Transition b Fall 2004-2005 CSI 301 14 Non-Determinism q 1 q 2 a , b c q 3 a , b c q 1 q 2 , b c transition- These are allowed transitions in a Non-deterministic PDA (NPDA) Fall 2004-2005 CSI 301 15 NPDA: Non-Deterministic PDA Example: , a , a b , a q q 1 q 2 q 3 b , a , $ $ Fall 2004-2005 CSI 301 16 a , a b , a q q 1 q 2 q 3 Execution Example: I nput a a a b b b current state b , a Time 0 , , $ $ Stack $ Fall 2004-2005 CSI 301 17 a , a b , a q q 1 q 2 q 3 I nput a a a b b b b , a Time 1 , , $ $ Stack $ Fall 2004-2005 CSI 301 18 a , a b , a q q 1 q 2 q 3 I nput Stack a a a b b b $ a b , a Time 2 , , $ $ Fall 2004-2005 CSI 301 19 a , a b , a q q 1 q 2 q 3 I nput Stack a a a b b b $ a a b , a Time 3 , , $ $ Fall 2004-2005 CSI 301 20 a , a b , a q q 1 q 2 q 3 I nput Stack a a a b b b $ a a a b , a Time 4 , , $ $ Fall 2004-2005 CSI 301 21 a , a b , a q q 1 q 2 q 3 I nput a a a b b b Stack $ a a a b , a Time 5 , , $ $ Fall 2004-2005 CSI 301 22 a , a b , a q q 1 q 2 q 3 I nput a a a b b b $ a Stack b , a Time 6 , , $ $ a Fall 2004-2005 CSI 301 23 a , a b , a q q 1 q 2 q 3 I nput a a a b b b $ Stack b , a Time 7 , , $ $ a Fall 2004-2005...
View Full Document

This note was uploaded on 01/25/2011 for the course CSI 301 taught by Professor Mr.elienasr during the Spring '10 term at American University of Science & Tech.

Page1 / 85

Push Down Automata - Fall 2004-2005 CSI 301 1 Pushdown...

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

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