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.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2009 with acknowledgement.
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)
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.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
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.
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 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
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.
CSCI 2670 Introduction to Theory of Computing September 22, 2004.
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
COSC 3340: Introduction to Theory of Computation
CSE 105 theory of computation
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
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.
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
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 Fall 2003, 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) = {(p, v, wy) | ((q, u, x), (p, w)) } M accepts w if (f, , x) in *(s, w, ) 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