Pushdown Automata Section 2.2 CSC 4170 Theory of Computation.

Slides:



Advertisements
Similar presentations
Chapter 5 Pushdown Automata
Advertisements

Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
Introduction to Computability Theory
CFG => PDA Sipser 2 (pages ).
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
CFG => PDA Sipser 2 (pages ). CS 311 Fall Formally… A pushdown automaton is a sextuple M = (Q, Σ, Γ, δ, q 0, F), where – Q is a finite set.
Costas Busch - RPI1 Pushdown Automata PDAs. Costas Busch - RPI2 Pushdown Automaton -- PDA Input String Stack States.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Courtesy Costas Busch - RPI1 Pushdown Automata PDAs.
Introduction to the Theory of Computation John Paxton Montana State University Summer 2003.
CS 310 – Fall 2006 Pacific University CS310 Pushdown Automata Sections: 2.2 page 109 October 9, 2006.
1 Normal Forms for Context-free Grammars. 2 Chomsky Normal Form All productions have form: variable and terminal.
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.
1 Normal Forms for Context-free Grammars. 2 Chomsky Normal Form All productions have form: variable and terminal.
Pushdown Automaton (PDA)
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
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)
CS 3240: Languages and Computation Pushdown Automata & CF Grammars NOTE: THESE ARE ONLY PARTIAL SLIDES RELATED TO WEEKS 9 AND 10. PLEASE REFER TO THE TEXTBOOK.
CSCI 2670 Introduction to Theory of Computing September 21, 2005.
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Pushdown Automata (PDAs)
Cs3102: Theory of Computation Class 6: Pushdown Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint manual.
Pushdown Automata Part I: PDAs Chapter Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2)
Complexity and Computability Theory I Lecture #11 Instructor: Rina Zviel-Girshin Lea Epstein.
Pushdown Accepters & Context-Free Grammars Sipser, Theorem 2.12 Denning, Chapter 8.
PushDown Automata. What is a stack? A stack is a Last In First Out data structure where I only have access to the last element inserted in the stack.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
1 Pushdown Automata There are context-free languages that are not regular. Finite automata cannot recognize all context-free languages.
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Pushdown.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Pushdown.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Pushdown.
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.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
1 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
Recap: Nondeterministic Finite Automaton (NFA) A deterministic finite automaton (NFA) is a 5-tuple (Q, , ,s,F) where: Q is a finite set of elements called.
6. Pushdown Automata CIS Automata and Formal Languages – Pei Wang.
Formal Languages, Automata and Models of Computation
Non Deterministic Automata
CSE 105 theory of computation
Pushdown Automata PDAs
Pushdown Automata PDAs
Pushdown Automata PDAs
Pushdown Automata PDAs
CS 461 – Sept. 28 Section 2.2 – Pushdown Automata { 0n 1n }
Theory of Computation Lecture #27-28.
Chapter 7 PUSHDOWN AUTOMATA.
AUTOMATA THEORY VI.
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Non Deterministic Automata
Context-Free Grammars
Pushdown automata a_introduction.htm.
Pushdown Automaton (PDA)
Chapter 2 Context-Free Language - 01
CSE 105 theory of computation
Principles of Computing – UFCFA3-30-1
… NPDAs continued.
Chapter 1 Regular Language
Pushdown automata The Chinese University of Hong Kong Fall 2011
CSE 105 theory of computation
Non Deterministic Automata
Normal Forms for Context-free Grammars
CSE 105 theory of computation
Presentation transcript:

Pushdown Automata Section 2.2 CSC 4170 Theory of Computation

Components of a pushdown automaton (PDA) 2.2.a (Q, , , ,s,F) xyxz...xyxz... a a b a c … StackInput Q is the set of states  is the input alphabet  is the stack alphabet  is the transition function s is the start state F  Q is the set of accept states a,x  y q1q2 If the input symbol is a and the top stack symbol is x, go from q1 to q2, pop x and push y If a= , the read head is not advanced If x= , nothing is popped If y= , nothing is pushed Push: write a symbol on the top of the stack Pop: delete a symbol from the top of the stack

How a PDA works 2.2.b1 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput

How a PDA works 2.2.b2 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput $

How a PDA works 2.2.b3 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 0$0$

How a PDA works 2.2.b4 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 00$00$

How a PDA works 2.2.b5 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 000$000$

How a PDA works 2.2.b6 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 00$00$

How a PDA works 2.2.b7 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 0$0$

How a PDA works 2.2.b8 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput $

How a PDA works 2.2.b9 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput Accept

How a PDA works 2.2.b10 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   What language does this automaton recognize?

How a PDA works 2.2.b11 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput

How a PDA works 2.2.b12 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput $

How a PDA works 2.2.b13 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 0$0$

How a PDA works 2.2.b14 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 00$00$

How a PDA works 2.2.b15 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 0$0$ Reject

How a PDA works 2.2.b16 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput

How a PDA works 2.2.b17 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput $

How a PDA works 2.2.b18 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 0$0$

How a PDA works 2.2.b19 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput $

How a PDA works 2.2.b20 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput Reject

How a PDA works 2.2.b21 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput

How a PDA works 2.2.b22 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput $

How a PDA works 2.2.b23 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput 0$0$

How a PDA works 2.2.b24 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput $

How a PDA works 2.2.b25 , $, $ q1q2 q4 q3 ,$  ,$   1,0   0, 00, 0 1,0  1,0   StackInput Reject

Designing pushdown automata 2.2.c s 0 Design a pushdown automaton that recognizes the language {w | w has an equal number of 0s and 1s} 1 =

Converting NFA into PDA 2.2.d 32 1 a a b abab  Every NFA can be understood as a PDA that never pushes or pops. Just replace every label a of the NFA by a,  a,  b,  a,  b,  , 

Main theorems 2.2.e Theorem 2.20: A language is context-free iff some pushdown automaton recognizes it. Theorem: Not every nondeterministic PDA has an equivalent deterministic PDA. Example 2.18: There is a nondeterministic PDA recognizing {ww R | w  {0,1}* } (w R means w reversed), but no deterministic PDA can recognize this language. Proofs omitted.