COSC 3340: Introduction to Theory of Computation

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.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Costas Busch - RPI1 Pushdown Automata PDAs. Costas Busch - RPI2 Pushdown Automaton -- PDA Input String Stack States.
Courtesy Costas Busch - RPI1 Pushdown Automata PDAs.
Fall 2004COMP 3351 Pushdown Automata PDAs. Fall 2004COMP 3352 Pushdown Automaton -- PDA Input String Stack States.
Fall 2006Costas Busch - RPI1 Pushdown Automata PDAs.
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.
Lecture 18UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 18.
Lecture Pushdown Automata. stack stack head finite control tape head tape.
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.
Lecture 11UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 11.
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.
Lecture 24UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 24.
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
Non Deterministic Automata
COSC 3340: Introduction to Theory of Computation
CSE 105 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
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
CSE322 Definition and description of finite Automata
Non Deterministic Automata
CS322D Tutorials.
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
… NPDAs continued.
CSE 105 theory of computation
Pushdown automata The Chinese University of Hong Kong Fall 2011
Recap lecture 37 New format for FAs, input TAPE, START, ACCEPT , REJECT, READ states Examples of New Format of FAs, PUSHDOWN STACK , PUSH and POP states,
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
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
CSE 105 theory of computation
Presentation transcript:

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

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

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 11 UofH - COSC 3340 - Dr. Verma

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 u, x  w q0 q1 u, x ; w In JFLAP Lecture 11 UofH - COSC 3340 - Dr. Verma

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

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

JFLAP Simulation Lecture 11 UofH - COSC 3340 - Dr. Verma

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 11 UofH - COSC 3340 - Dr. Verma

Definition of L(M) Define * as: (1) *(q, , ) = {(q, , )}  {(p, , ) |((q, , ), (p, ))  } (2) *(q, uv, xy) = U {*(p, v, wy) | ((q, u, x), (p, w))  } 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 11 UofH - COSC 3340 - Dr. Verma

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