Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.

Slides:



Advertisements
Similar presentations
Lecture 10: Context-Free Languages Contextually David Evans
Advertisements

Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages We need a device similar to an FSM except that it needs more power. The insight: Precisely.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
Turing machines Sipser 2.3 and 3.1 (pages )
Turing machines Sipser 2.3 and 3.1 (pages )
CFG => PDA Sipser 2 (pages ).
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.
Turing Machines New capabilities: –infinite tape –can read OR write to tape –read/write head can move left and right q0q0 input tape.
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines.
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Class 19: Undecidability in Theory and Practice David Evans cs302: Theory of Computation University of Virginia Computer.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Turing Machines A more powerful computation model than a PDA ?
Context-Free Languages Regular Languages Violates Pumping Lemma For RLs Violates Pumping Lemma For CFLs Described by CFG, PDA 0n1n0n1n 0n1n2n0n1n2n Described.
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Pushdown Automata (PDAs)
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Cs3102: Theory of Computation Class 6: Pushdown Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint manual.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
Cs3102: Theory of Computation Class 8: Non-Context-Free Languages Spring 2010 University of Virginia David Evans.
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
Lecture 11UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 11.
January 20, 2016CS21 Lecture 71 CS21 Decidability and Tractability Lecture 7 January 20, 2016.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 154 Formal Languages and Computability March 10 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 154 Formal Languages and Computability March 15 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Theory of Languages and Automata By: Mojtaba Khezrian.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CSCI 2670 Introduction to Theory of Computing September 29, 2005.
Pushdown Automata - like NFA-  but also has a stack - transition takes the current state, the current input symbol, and the top-of-the-stack symbol (which.
Turing’s Thesis.
Non Deterministic Automata
Busch Complexity Lectures: Turing Machines
Pumping Lemma Revisited
Chapter 9 TURING MACHINES.
Chapter 3: The CHURCH-Turing thesis
Non Deterministic Automata
Pushdown automata a_introduction.htm.
CS21 Decidability and Tractability
Decidability and Tractability
Presentation transcript:

Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer Science University of Virginia www.cs.virginia.edu/~njb2b/theory

Hierarchy: So Far anbn bn abba wwR Regular Languages Violates Pumping Lemma For CFLs anbn bn Violates Pumping Lemma For RLs abba Described by DFA, NFA, RegExp, wwR Described by CFG, NDPDA Described by DPDA finite Languages Regular Languages Deterministic Context-Free Context-Free Languages

Hierarchy: Next step Languages Recognized by any computing machine Regular Languages Context-Free Languages finite Languages Deterministic Context-Free Problems solvable by humans?

PDA Enhancements c b c b $ $ a a b b c c Theorem: 2-stack PDAs are more powerful than 1-stack PDAs. Hint: Find an example non-CFL accepted by a 2-stack PDA. a, ↓b, ↓c b, ↑b,- c, -,↑c c b ε, ↓$, ↓$ b, ↑b, - c,-,↑c ε, ↑$, ↑$ start a‘s b‘s c‘s end c b $ Input $ a a b b c c Stack 2 Stack 1

PDA Enhancements a b b b b a $ $ a b b a b b Theorem: 2-stack PDAs are more powerful than 1-stack PDAs. Hint: Find an example non-CFL accepted by a 2-stack PDA. a, ↓a,- ε, ↑a, ↓a a a, -, ↑a b b, ↓b,- ε, ↑b, ↓b b, -, ↑b b b ε, ↓$, - ε, -, ↓$ ε, ↑$,- ε, -, ↑$ start w1 flip w2 end b a $ Input $ a b b a b b Stack 2 Stack 1

PDA Enhancements a b b $ a $ b b a b b b $ a $ $ b b b a b a $ Is there anything we can’t simulate with a 2-PDA? How about a 3-PDA? To pop from stack 1: Do: σϵ{a,b}, ωϵ{a,b,$} a b ε, ↑b, -, - x y $ b Stack 2 a Stack 1 Stack 3 b $ a $ b b b b x ε, ↑σ, ↓σ ε, ↑$, ↓$ ε, ↑b, - y ε ε, ↓ω, ↑ω $ a b $ b b Move stack 3 Move stack 2 Pop reset a b $ a Stack 1 Stack 2

PDA Enhancements a b a b $ $ Is there anything we can’t simulate with a 2-PDA? 2-PDA=Turing Machine $ a b $ b a Current Symbol Stack 1 Stack 2

Turing Machine … FSM Infinite tape: Γ* Tape head: read current square on tape, write into current square, move one square left or right FSM: like PDA, except: transitions also include direction (left/right) final accepting and rejecting states

Turing Machine … FSM 7-tuple: (Q, , Γ, δ, q0, qaccept, qreject) Q: finite set of states : input alphabet (cannot include blank symbol, _) Γ: tape alphabet, includes  and _ (blank) δ: transition function: Q  Γ  Q  Γ  {L, R} (in FSM) q0: start state, q0  Q qaccept: accepting state, qaccept  Q qreject: rejecting state, qreject  Q

Turing Machine Configuration q … FSM u v (u, q, v)ϵΓ* × Q × Γ* tape contents left of head head and right current FSM state

Initial Configuration b _ … FSM input blanks Configuration: (a, start, bba)

Operation … δ*: Γ*  Q  Γ*  Γ*  Q  Γ* Transition from configuration to configuration … FSM u v q The qaccept and qreject states are final (you never leave): δ*(u, qaccept, v)  (u, qaccept, v) δ*(u, qreject, v)  (u, qreject, v)

Operation … a c b δ*(ua, q, bv) = (uac, qr, v) if δ(q, b) = (qr, c, R) FSM q qr b,c,R … a c b u v δ*(ua, q, bv) = (uac, qr, v) if δ(q, b) = (qr, c, R) δ*(ua, q, bv) = (u, qr, acv) if δ(q, b) = (qr, c, L)

Operation … a c b δ*(ua, q, bv) = (uac, qr, v) if δ(q, b) = (qr, c, R) FSM q qr b,c,L … a c b u v δ*(ua, q, bv) = (uac, qr, v) if δ(q, b) = (qr, c, R) δ*(ua, q, bv) = (u, qr, acv) if δ(q, b) = (qr, c, L)

≡ Church Turing Thesis Read notes Ponder Scribble notes Repeat Read from tape Change state Write to tape Repeat