Lecture 11UofH - COSC 3340 - Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 11.

Slides:



Advertisements
Similar presentations
Lecture 23UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 23.
Advertisements

Pushdown Automata CPSC 388 Ellen Walker Hiram College.
CS21 Decidability and Tractability
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
CS5371 Theory of Computation
Costas Busch - RPI1 Pushdown Automata PDAs. Costas Busch - RPI2 Pushdown Automaton -- PDA Input String Stack States.
Courtesy Costas Busch - RPI1 Pushdown Automata PDAs.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Fall 2004COMP 3351 Pushdown Automata PDAs. Fall 2004COMP 3352 Pushdown Automaton -- PDA Input String Stack States.
Fall 2006Costas Busch - RPI1 Pushdown Automata PDAs.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Lecture 7UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 7.
Lecture 9UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 9.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
Lecture 5UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 5.
Lecture 4UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 4.
Prof. Busch - LSU1 Pushdown Automata PDAs. Prof. Busch - LSU2 Pushdown Automaton -- PDA Input String Stack States.
Fall 2005Costas Busch - RPI1 Pushdown Automata PDAs.
1 Pushdown Automata PDAs. 2 Pushdown Automaton -- PDA Input String Stack States.
1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 8 Mälardalen University 2010.
UofH - COSC Dr. Verma COSC 3340: Introduction to Theory of Computation Rakesh Verma Computer Science Department University of Houston URL:
Lecture 2UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 2.
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Lecture 18UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 18.
Push-down Automata Section 3.3 Fri, Oct 21, 2005.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 6 Mälardalen University 2010.
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Pushdown.
Formal Languages, Automata and Models of Computation
Lecture 14UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 14.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Pushdown.
Lecture 24UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 24.
Pushdown Automata Hopcroft, Motawi, Ullman, Chap 6.
1.Draw a parse tree for the following derivation: S  C A C  C A b b  b b A b b  b b B b b  b b a A a a b b  b b a b a a b b 2. Show on your parse.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 8 Mälardalen University 2011.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
Lecture 11  2004 SDU Lecture7 Pushdown Automaton.
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
Formal Languages, Automata and Models of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Pushdown Automata PDAs
Push-down Automata Section 3.3 Wed, Oct 27, 2004.
Pushdown Automata PDAs
Pushdown Automata PDAs
Pushdown Automata PDAs
Theory of Computation Lecture #27-28.
Push-down Automata.
AUTOMATA THEORY VI.
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
CSE322 Definition and description of finite Automata
Non Deterministic Automata
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
… NPDAs continued.
Pushdown automata The Chinese University of Hong Kong Fall 2011
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Non Deterministic Automata
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

Lecture 11UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 11

UofH - COSC Dr. Verma 2 Push Down Automaton (PDA) Language Acceptor Model for CFLs It is an NFA with a stack. Finite State control Input Stack Accept/Reject

Lecture 11UofH - COSC Dr. Verma 3 PDA (contd.) In one move the PDA can : – change state, – consume a symbol from the input tape or ignore it – pop a symbol from the stack or ignore it – push a symbol onto the stack or not A string is accepted provided the machine when started in the start state consumes the string and reaches a final state.

Lecture 11UofH - COSC Dr. Verma 4 PDA (contd.) If PDA in state q can consume u, pop x from stack, change state to p, and push w on stack we show it as q0q0 u, x  w q1q1 u, x ; w In JFLAP

Lecture 11UofH - COSC Dr. Verma 5 Example of a PDA PDA L = {a n b n |n  0} Push S to the stack in the beginning and then pop it at the end before accepting.

Lecture 11UofH - COSC Dr. Verma 6 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 7 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 8 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 9 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 10 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 11 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 12 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 13 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 14 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 15 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 16 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 17 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 18 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 19 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 20 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 21 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 22 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 23 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 24 JFLAP Simulation

Lecture 11UofH - COSC Dr. Verma 25 Definition of PDA Formally, a PDA M = (K, , , , s, F), where – K -- finite set of states –  -- is the input alphabet –  -- is the tape alphabet – s  K -- is the start state – F  K -- is the set of final states –   (K X   X   ) X (K X   )

Lecture 11UofH - COSC Dr. Verma 26 Definition of L(M) Define  * as: (1)  *(q, w, x) = {(q, w, x)}  {(p, w, x) | ((q, ,  ), (p,  ))   } (2)  *(q, uv, xy) = U {  *(p, v, wy) | ((q, u, x), (p, w))   } [at least one of u, x, w is not equal to  ] – i.e., first compute  * for all successor configurations and then take the union of all those sets M accepts w if (f, , x) in  *(s, w,  ) Alternative: if (f, ,  ) in  *(s, w,  ) [we use] L(M) = {w   * | M accepts w}

Lecture 11UofH - COSC Dr. Verma 27 Example What is L(M)? Push S to the stack in the beginning and then pop it at the end before accepting.