COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 14 : Turing Machines

Similar documents
COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 16 : Turing Machines

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 1 : Introduction

CS21 Decidability and Tractability

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 5 : DFA minimization

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 9 : Myhill-Nerode Theorem and applications

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 10 : Context-Free Grammars

Introduction to Turing Machines

Computability Theory. CS215, Lecture 6,

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 2 : Regular Expressions & DFAs

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

Chapter 3: The Church-Turing Thesis

The Church-Turing Thesis

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Theory of Computation (IX) Yijia Chen Fudan University

Computability and Complexity

CSCE 551: Chin-Tser Huang. University of South Carolina

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

TURING MAHINES

DM17. Beregnelighed. Jacob Aae Mikkelsen

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

UNRESTRICTED GRAMMARS

Fundamentals of Computer Science

CSE 105 THEORY OF COMPUTATION

CSCC63 Worksheet Turing Machines

Turing Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA

Turing Machines. Lecture 8

CSE 105 THEORY OF COMPUTATION

Decidable Languages - relationship with other classes.

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSCE 551 Final Exam, Spring 2004 Answer Key

V Honors Theory of Computation

CSE 105 THEORY OF COMPUTATION

Lecture 13: Turing Machine

Turing Machines (TM) The Turing machine is the ultimate model of computation.

The Turing machine model of computation

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama

The Unsolvability of the Halting Problem. Chapter 19

Decidability: Church-Turing Thesis

Undecidable Problems and Reducibility

Exam Computability and Complexity

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Theory of Computation

Functions on languages:

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

Final exam study sheet for CS3719 Turing machines and decidability.

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

SCHEME FOR INTERNAL ASSESSMENT TEST 3

Intro to Theory of Computation

Computational Models Lecture 7, Spring 2009

Computational Models - Lecture 6

CSCE 551: Chin-Tser Huang. University of South Carolina

Lecture 12: Mapping Reductions

CSE 105 THEORY OF COMPUTATION

Part I: Definitions and Properties

Variants of Turing Machine (intro)

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

CS20a: Turing Machines (Oct 29, 2002)

CS154, Lecture 10: Rice s Theorem, Oracle Machines

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

Theory of Computation Turing Machine and Pushdown Automata

1 Showing Recognizability

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

CP405 Theory of Computation

Automata and Computability. Solutions to Exercises

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

Computation Histories

Summary. Reg Dodds Department of Computer Science University of the Western Cape 2016 Reg Dodds

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Chap. 4,5 Review. Algorithms created in proofs from prior chapters

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

DD2371 Automata Theory

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Turing Machines Part III

Decidability (What, stuff is unsolvable?)

ACS2: Decidability Decidability

CSE 105 Theory of Computation

Automata and Computability. Solutions to Exercises

The Church-Turing Thesis. Chapter 18

CS154, Lecture 13: P vs NP

Introduction to Languages and Computation

More Turing Machines. CS154 Chris Pollett Mar 15, 2006.

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2

CS154 Final Examination

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Transcription:

COMP-330 Theory of Computation Fall 2012 -- Prof. Claude Crépeau Lec. 14 : Turing Machines 1

COMP 330 Fall 2012: Lectures Schedule 1. Introduction 1.5. Some basic mathematics 2. Deterministic finite automata +Closure properties, 3. Nondeterministic finite automata 4. Determinization+Kleene s theorem 5-6. Regular Expressions, GNFA and Regular Languages 6-7. The pumping lemma 8. Minimization+Myhill-Nerode theorem 9. Context-free languages 10. Pushdown automata 11. Equivalence between CFG & PDA 12. The pumping lemma for CFLs 13. MIDTERM 14. Turing Machines 15. The Church-Turing Thesis 16. Introduction to computability 17. Models of computation Basic computability theory 18. Reducibility, undecidability and Rice s theorem 19. Undecidable problems about CFGs 20. Post Correspondence Problem 21. Validity of FOL is RE / Gödel s and Tarski s thms 22. Universality / The recursion theorem 23. Degrees of undecidability 24. Introduction to complexity 25. Introduction to Quantum Computing/Complexity 26. Review of course material 2

All languages Computability Theory Languages we can describe Decidable Languages Context-free Languages Regular NON-Regular Languages via Pumping Lemma Languages NON-Regular Languages via Reductions 3

All languages Computability Theory Languages we can describe Decidable Languages Context-free Languages Regular Languages NON-CFLs via Pumping Lemma NON-CFLs via Reductions 4

All languages Computability Theory Decidable Languages Languages. we can describe Context-free Languages Regular Languages NON-decidable via Diagonalization NON-decidable via Reductions 5

Turing MACHINES Alan Turing 6

M 1 7

M 1 q1 10010101 8

M 1 1 q2 10010101 9

M 1 0 q3 10010101 10

M 1 1 q2 10110101 read and write! moves Right and Left! 11

M 1 0 q3 10110101 12

Turing Machines 13

TM Example 14

15

15

15

15

15

15

Definition of PDA States Input Alphabet Tape Alphabet Transition function Start state Accept state Reject state 16

Definition of PDA States q 1 q 2 q 3 Input Alphabet Tape Alphabet Transition function Start state Accept state Reject state 16

Definition of PDA States q 1 q 2 q 3 Input Alphabet a,b,c Tape Alphabet Transition function Start state Accept state Reject state 16

Definition of PDA States q 1 q 2 q 3 Input Alphabet Tape Alphabet a,b,c a,b,c,a,b,c,_ Transition function Start state Accept state Reject state 16

Definition of PDA States q1 q2 q3 a,b,c Tape Alphabet a,b,c,a,b,c,_ Input Alphabet Transition function b c,d q1 q2 Start state Accept state Reject state 16

Definition of PDA q2 q 3 q1 L or R States output head input symbol move Input Alphabet a,b,c symbol b c,d Tape Alphabet a,b,c,a,b,c,_ Transition function q1 b c,d Start state q1 Accept state q2 q2 Reject state 16

Definition of PDA States q1 q2 q3 a,b,c Tape Alphabet a,b,c,a,b,c,_ Input Alphabet Transition function b c,d q1 q2 Start state Accept state Reject state 16

Definition of PDA States q2 q1 q3 a,b,c Tape Alphabet a,b,c,a,b,c,_ Input Alphabet Transition function Start state q1 b c,d q1 q2 Accept state Reject state 16

Definition of PDA States q2 q1 q3 a,b,c Tape Alphabet a,b,c,a,b,c,_ Input Alphabet Transition function Start state q1 b c,d q1 q2 Accept state qacc Reject state 16

Definition of PDA States q2 q1 q3 a,b,c Tape Alphabet a,b,c,a,b,c,_ Input Alphabet Transition function Start state q1 b c,d q1 q2 Accept state qacc Reject state qrej 16

TM definition 17

18

TM Configuration 19

TM Computation 20

TM definition For all a,b,c Γ, u,v Γ*, qi,qi Q Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition ua qi bv For all a,b,c Γ, u,v Γ*, qi,qi Q Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l yields (L) Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r u qj acv Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition For all a,b,c Γ, u,v Γ*, qi,qi Q Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition ua qi bv For all a,b,c Γ, u,v Γ*, qi,qi Q Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l yields (R) Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r uac qj v Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition For all a,b,c Γ, u,v Γ*, qi,qi Q Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition For all a,b,c Γ, u,v Γ*, qi,qi Q qi bv Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l yields (L) Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r qj cv Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition For all a,b,c Γ, u,v Γ*, qi,qi Q Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition For all a,b,c Γ, u,v Γ*, qi,qi Q qi bv Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l yields (R) Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r c qj v Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM definition For all a,b,c Γ, u,v Γ*, qi,qi Q Config. ua qi bv yields config. u qj acv if δ(qi,b) = qj,c,l Config. ua qi bv yields config. uac qj v if δ(qi,b) = qj,c,r Special cases: Config. q i bv yields qj cv if δ(qi,b) = qj,c,l Config. qi bv yields c qj v if δ(qi,b) = qj,c,r 21

TM Computation Start configuration: q0 w (w = input string) Accepting configuration: state = qaccept Rejecting configuration: state = qreject 22

TM Computation Turing Machine M accepts input w if there exists configurations C 0, C1,..., Cm such that C0 is a start configuration Ci yields Ci+1 for 0 i<m Cm is an accepting configuration. The collection of strings that M accepts is the language of M or the language recongnized by M, denoted L(M). 23

TM Computation 24

TM Computation A TM decides a language if it recognizes it and halts (reaches an accepting or rejecting states) on all input strings. 24

TM Computation A TM decides a language if it recognizes it and halts (reaches an accepting or rejecting states) on all input strings. 24

TM Computation A TM decides a language if it recognizes it and halts (reaches an accepting or rejecting states) on all input strings. 1 Often named Recursively-Enumerable in the litterature. 2 Often named Recursive in the litterature. 24

TM Examples 25

TM Examples 26

TM Examples 27

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

28

TM Examples 29

30

TM Examples 31

TM Examples 32

TM Examples 33

More Turing MACHINES Multitape Turing Machines Non-Deterministic Turing Machines Enumerator Turing Machines Everything else... 34

Multitape TM 35

Multitape TM 36

Multitape TM 36

Multitape TM 37

Multitape TM 38

Non-deterministic TM 39

Non-deterministic TM 40

Non-deterministic TM 41

Non-deterministic TM 41

Non-deterministic TM 41

Enumerator TM 42

Enumerator TM 43

Enumerator TM 44

Enumerator TM 45

Enumerator TM 45

Enumerator TM 45

Everything Else Alonzo Church Stephen Kleene J. Barkley Rosser 46

Everything Else Lambda-calculus Alonzo Church Stephen Kleene J. Barkley Rosser 46

Everything Else Lambda-calculus Alonzo Church Recursive Functions Stephen Kleene J. Barkley Rosser 46

Everything Else Lambda-calculus Alonzo Church Recursive Functions Programming languages: Stephen Kleene J. Barkley Rosser 46

Everything Else Lambda-calculus Alonzo Church Recursive Functions Programming languages: FORTRAN, PASCAL, C, JAVA,... Stephen Kleene J. Barkley Rosser 46

Everything Else Lambda-calculus Alonzo Church Recursive Functions Programming languages: FORTRAN, PASCAL, C, JAVA,... Stephen Kleene LISP, SCHEME,... J. Barkley Rosser 46

Church-Turing Thesis Alonzo Church Alan Turing 47

Church-Turing Thesis 48

Paris, 1900 David Hilbert 49

Paris, 1900 David Hilbert Speaking on 8 August 1900, at the Paris 2 nd International Congress of Mathematicians, at La Sorbonne, German mathematician David Hilbert presented ten problems in mathematics. 49

Paris, 1900 David Hilbert Speaking on 8 August 1900, at the Paris 2 nd International Congress of Mathematicians, at La Sorbonne, German mathematician David Hilbert presented ten problems in mathematics. The problems were all unsolved at the time, and several of them turned out to be very influential for 20 th century mathematics. 49

Hilbert s 10 th problem Let P be a polynomial in several variables: P(x,y,z)=24x 2 y 3 +17x+5y+25 Is there a set of integers for x,y,z such that P(x,y,z)=0? This problem is undecidable... but is Turing-Recognizable... Needed a formal model of computing to prove impossibility. Yuri Matiyasevich 50

Single variable Poly 51

Single variable Poly 51

Format & Notations Represent objects as strings O 1, O 2,..., O k is the string representing objects O 1, O 2,..., O k Many encodings are possible. Implicitly, at begining of an algorithm, check that input is in the correct format, otherwise reject. 52

Format & Notations 53

Format & Notations 54

COMP-330 Theory of Computation Fall 2012 -- Prof. Claude Crépeau Lec. 14 : Turing Machines & Church-Turing Thesis 55