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

Size: px
Start display at page:

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

Transcription

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

2 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

3 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

4 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

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

6 Turing MACHINES Alan Turing 6

7 M 1 7

8 M 1 q

9 M 1 1 q

10 M 1 0 q

11 M 1 1 q read and write! moves Right and Left! 11

12 M 1 0 q

13 Turing Machines 13

14 TM Example 14

15 15

16 15

17 15

18 15

19 15

20 15

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

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

23 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

24 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

25 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

26 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

27 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

28 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

29 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

30 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

31 TM definition 17

32 18

33 TM Configuration 19

34 TM Computation 20

35 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

36 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

37 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

38 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

39 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

40 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

41 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

42 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

43 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

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

45 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

46 TM Computation 24

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

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

49 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

50 TM Examples 25

51 TM Examples 26

52 TM Examples 27

53 28

54 28

55 28

56 28

57 28

58 28

59 28

60 28

61 28

62 28

63 28

64 28

65 28

66 28

67 28

68 28

69 28

70 28

71 28

72 28

73 28

74 28

75 28

76 28

77 28

78 28

79 28

80 TM Examples 29

81 30

82 TM Examples 31

83 TM Examples 32

84 TM Examples 33

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

86 Multitape TM 35

87 Multitape TM 36

88 Multitape TM 36

89 Multitape TM 37

90 Multitape TM 38

91 Non-deterministic TM 39

92 Non-deterministic TM 40

93 Non-deterministic TM 41

94 Non-deterministic TM 41

95 Non-deterministic TM 41

96 Enumerator TM 42

97 Enumerator TM 43

98 Enumerator TM 44

99 Enumerator TM 45

100 Enumerator TM 45

101 Enumerator TM 45

102 Everything Else Alonzo Church Stephen Kleene J. Barkley Rosser 46

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

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

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

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

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

108 Church-Turing Thesis Alonzo Church Alan Turing 47

109 Church-Turing Thesis 48

110 Paris, 1900 David Hilbert 49

111 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

112 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

113 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

114 Single variable Poly 51

115 Single variable Poly 51

116 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

117 Format & Notations 53

118 Format & Notations 54

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

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

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 16 : Turing Machines COMP-330 Theory of Computation Fall 2017 -- Prof. Claude Crépeau Lec. 16 : Turing Machines COMP 330 Fall 2017: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic finite

More information

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

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 1 : Introduction COMP-330 Theory of Computation Fall 2017 -- Prof. Claude Crépeau Lecture 1 : Introduction COMP 330 Fall 2017: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic finite automata

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 8 January 24, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis So far several models of computation finite automata

More information

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. 5 : DFA minimization COMP-33 Theory of Computation Fall 27 -- Prof. Claude Crépeau Lec. 5 : DFA minimization COMP 33 Fall 27: Lectures Schedule 4. Context-free languages 5. Pushdown automata 6. Parsing 7. The pumping lemma

More information

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. 9 : Myhill-Nerode Theorem and applications COMP-33 Theory of Computation Fall 217 -- Prof. Claude Crépeau Lec. 9 : Myhill-Nerode Theorem and applications COMP 33 Fall 212: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic

More information

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

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 10 : Context-Free Grammars COMP-330 Theory of Computation Fall 2017 -- Prof. Claude Crépeau Lec. 10 : Context-Free Grammars COMP 330 Fall 2017: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic finite

More information

Introduction to Turing Machines

Introduction to Turing Machines Introduction to Turing Machines Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 12 November 2015 Outline 1 Turing Machines 2 Formal definitions 3 Computability

More information

Computability Theory. CS215, Lecture 6,

Computability Theory. CS215, Lecture 6, Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David

More information

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

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018 CS 301 Lecture 17 Church Turing thesis Stephen Checkoway March 19, 2018 1 / 17 An abridged modern history of formalizing algorithms An algorithm is a finite, unambiguous sequence of steps for solving a

More information

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta CSE 2001: Introduction to Theory of Computation Fall 2013 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cse.yorku.ca/course/2001 11/7/2013 CSE

More information

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

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 2 : Regular Expressions & DFAs COMP-330 Theory of Computation Fall 2017 -- Prof. Claude Crépeau Lecture 2 : Regular Expressions & DFAs COMP 330 Fall 2017: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic

More information

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

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement: Decidability 2017/10/31 Chapter 4.1 in Sipser Ø Announcement: q q q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/decidability.pdf Happy Hollaween! Delayed

More information

Chapter 3: The Church-Turing Thesis

Chapter 3: The Church-Turing Thesis Chapter 3: The Church-Turing Thesis 1 Turing Machine (TM) Control... Bi-direction Read/Write Turing machine is a much more powerful model, proposed by Alan Turing in 1936. 2 Church/Turing Thesis Anything

More information

The Church-Turing Thesis

The Church-Turing Thesis The Church-Turing Thesis Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/

More information

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

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite The Church-Turing Thesis CS60001: Foundations of Computing Science Professor, Dept. of Computer Sc. & Engg., Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q 0, q accept, q reject ), where

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

More information

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM)? Proposed by Alan Turing in 936 finite-state control + infinitely long tape A

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 15 Ana Bove May 17th 2018 Recap: Context-free Languages Chomsky hierarchy: Regular languages are also context-free; Pumping lemma

More information

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

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine) CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM) Proposed by Alan Turing in 936 finite-state control + infinitely long tape A stronger

More information

Theory of Computation (IX) Yijia Chen Fudan University

Theory of Computation (IX) Yijia Chen Fudan University Theory of Computation (IX) Yijia Chen Fudan University Review The Definition of Algorithm Polynomials and their roots A polynomial is a sum of terms, where each term is a product of certain variables and

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition

More information

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

CSCE 551: Chin-Tser Huang. University of South Carolina CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Church-Turing Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan

More information

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4 Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form: A BC A a S ε B and C aren t start variables a is

More information

TURING MAHINES

TURING MAHINES 15-453 TURING MAHINES TURING MACHINE FINITE STATE q 10 CONTROL AI N P U T INFINITE TAPE read write move 0 0, R, R q accept, R q reject 0 0, R 0 0, R, L read write move 0 0, R, R q accept, R 0 0, R 0 0,

More information

DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17. Beregnelighed. Jacob Aae Mikkelsen DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

UNRESTRICTED GRAMMARS

UNRESTRICTED GRAMMARS 136 UNRESTRICTED GRAMMARS Context-free grammar allows to substitute only variables with strings In an unrestricted grammar (or a rewriting system) one may substitute any non-empty string (containing variables

More information

Fundamentals of Computer Science

Fundamentals of Computer Science Fundamentals of Computer Science Chapter 8: Turing machines Henrik Björklund Umeå University February 17, 2014 The power of automata Finite automata have only finite memory. They recognize the regular

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with

More information

CSCC63 Worksheet Turing Machines

CSCC63 Worksheet Turing Machines 1 An Example CSCC63 Worksheet Turing Machines Goal. Design a turing machine, M that accepts only strings of the form {w#w w {0, 1} }. Idea. Describe in words how the machine would work. Read first symbol

More information

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

Turing Machines. 22c:135 Theory of Computation. Tape of a Turing Machine (TM) TM versus FA, PDA Turing Machines A Turing machine is similar to a finite automaton with supply of unlimited memory. A Turing machine can do everything that any computing device can do. There exist problems that even a

More information

Turing Machines. Lecture 8

Turing Machines. Lecture 8 Turing Machines Lecture 8 1 Course Trajectory We will see algorithms, what can be done. But what cannot be done? 2 Computation Problem: To compute a function F that maps each input (a string) to an output

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 2 Design a PDA and a CFG for a given language Give informal description for a PDA,

More information

Decidable Languages - relationship with other classes.

Decidable Languages - relationship with other classes. CSE2001, Fall 2006 1 Last time we saw some examples of decidable languages (or, solvable problems). Today we will start by looking at the relationship between the decidable languages, and the regular and

More information

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta CSE 2001: Introduction to Theory of Computation Fall 2012 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/2001 11/13/2012 CSE

More information

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

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand

More information

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus

More information

CSCE 551 Final Exam, Spring 2004 Answer Key

CSCE 551 Final Exam, Spring 2004 Answer Key CSCE 551 Final Exam, Spring 2004 Answer Key 1. (10 points) Using any method you like (including intuition), give the unique minimal DFA equivalent to the following NFA: 0 1 2 0 5 1 3 4 If your answer is

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.

More information

Lecture 13: Turing Machine

Lecture 13: Turing Machine Lecture 13: Turing Machine Instructor: Ketan Mulmuley Scriber: Yuan Li February 19, 2015 Turing machine is an abstract machine which in principle can simulate any computation in nature. Church-Turing Thesis:

More information

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

Turing Machines (TM) The Turing machine is the ultimate model of computation. TURING MACHINES Turing Machines (TM) The Turing machine is the ultimate model of computation. Alan Turing (92 954), British mathematician/engineer and one of the most influential scientists of the last

More information

The Turing machine model of computation

The Turing machine model of computation The Turing machine model of computation For most of the remainder of the course we will study the Turing machine model of computation, named after Alan Turing (1912 1954) who proposed the model in 1936.

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 13 CHAPTER 4 TURING MACHINES 1. The definition of Turing machine 2. Computing with Turing machines 3. Extensions of Turing

More information

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

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever.   ETH Zürich (D-ITET) October, Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free

More information

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

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand

More information

The Unsolvability of the Halting Problem. Chapter 19

The Unsolvability of the Halting Problem. Chapter 19 The Unsolvability of the Halting Problem Chapter 19 Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing Machines D and SD A TM M with

More information

Decidability: Church-Turing Thesis

Decidability: Church-Turing Thesis Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there

More information

Undecidable Problems and Reducibility

Undecidable Problems and Reducibility University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

More information

Exam Computability and Complexity

Exam Computability and Complexity Total number of points:... Number of extra sheets of paper:... Exam Computability and Complexity by Jiri Srba, January 2009 Student s full name CPR number Study number Before you start, fill in the three

More information

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

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK COMS11700 Undecidability Department of Computer Science, University of Bristol Bristol, UK 4 April 2014 COMS11700: Undecidability Slide 1/29 Decidability We are particularly interested in Turing machines

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #6 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 39 Lecture 6: Overview Prove the equivalence of enumerators and TMs. Dovetailing

More information

Functions on languages:

Functions on languages: MA/CSSE 474 Final Exam Notation and Formulas page Name (turn this in with your exam) Unless specified otherwise, r,s,t,u,v,w,x,y,z are strings over alphabet Σ; while a, b, c, d are individual alphabet

More information

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

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability The Turing Machine Computability Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical provides a

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information

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

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harry Lewis October 22, 2013 Reading: Sipser, 3.2, 3.3. The Basic Turing Machine The Basic Turing Machine a a b a

More information

SCHEME FOR INTERNAL ASSESSMENT TEST 3

SCHEME FOR INTERNAL ASSESSMENT TEST 3 SCHEME FOR INTERNAL ASSESSMENT TEST 3 Max Marks: 40 Subject& Code: Automata Theory & Computability (15CS54) Sem: V ISE (A & B) Note: Answer any FIVE full questions, choosing one full question from each

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 14 Last time Turing Machine Variants Church-Turing Thesis Today Universal TM Decidable languages Designing deciders Sofya Raskhodnikova 3/1/2016 Sofya Raskhodnikova;

More information

Computational Models Lecture 7, Spring 2009

Computational Models Lecture 7, Spring 2009 Computational Models Lecture 7, Spring 2009 The Church-Turing Thesis The language classes R = RE core David Hilbert s Tenth Problem Encoding of TMs Universal Turing Machines The Halting/Acceptance problem

More information

Computational Models - Lecture 6

Computational Models - Lecture 6 Computational Models - Lecture 6 Turing Machines Alternative Models of Computers Multitape TMs, RAMs, Non Deterministic TMs The Church-Turing Thesis The language classes R = RE core David Hilbert s Tenth

More information

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

CSCE 551: Chin-Tser Huang. University of South Carolina CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Computation History A computation history of a TM M is a sequence of its configurations C 1, C 2,, C l such

More information

Lecture 12: Mapping Reductions

Lecture 12: Mapping Reductions Lecture 12: Mapping Reductions October 18, 2016 CS 1010 Theory of Computation Topics Covered 1. The Language EQ T M 2. Mapping Reducibility 3. The Post Correspondence Problem 1 The Language EQ T M The

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/ Today's learning goals Sipser Ch 3 Trace the computation of a Turing machine using its transition function and configurations.

More information

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information

Variants of Turing Machine (intro)

Variants of Turing Machine (intro) CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples, Turing-recognizable and Turing-decidable languages Variants of Turing Machine Multi-tape Turing machines, non-deterministic

More information

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

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT. Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite

More information

CS20a: Turing Machines (Oct 29, 2002)

CS20a: Turing Machines (Oct 29, 2002) CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Church s thesis The computable functions are the same as the partial recursive

More information

CS154, Lecture 10: Rice s Theorem, Oracle Machines

CS154, Lecture 10: Rice s Theorem, Oracle Machines CS154, Lecture 10: Rice s Theorem, Oracle Machines Moral: Analyzing Programs is Really, Really Hard But can we more easily tell when some program analysis problem is undecidable? Problem 1 Undecidable

More information

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

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM Turing Machines Review An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM Varieties of TMs Multi-Tape TMs Nondeterministic TMs String Enumerators

More information

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

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,

More information

Theory of Computation Turing Machine and Pushdown Automata

Theory of Computation Turing Machine and Pushdown Automata Theory of Computation Turing Machine and Pushdown Automata 1. What is a Turing Machine? A Turing Machine is an accepting device which accepts the languages (recursively enumerable set) generated by type

More information

1 Showing Recognizability

1 Showing Recognizability CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove

More information

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

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: Mapping Reducibility 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/mapping.pdf 1 Last time Reducibility

More information

CP405 Theory of Computation

CP405 Theory of Computation CP405 Theory of Computation BB(3) q 0 q 1 q 2 0 q 1 1R q 2 0R q 2 1L 1 H1R q 1 1R q 0 1L Growing Fast BB(3) = 6 BB(4) = 13 BB(5) = 4098 BB(6) = 3.515 x 10 18267 (known) (known) (possible) (possible) Language:

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Fall 28 Alexis Maciel Department of Computer Science Clarkson University Copyright c 28 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

Automata Theory. Definition. Computational Complexity Theory. Computability Theory Outline THEORY OF COMPUTATION CS363, SJTU What is Theory of Computation? History of Computation Branches and Development Xiaofeng Gao Dept. of Computer Science Shanghai Jiao Tong University 2 The Essential

More information

Computation Histories

Computation Histories 208 Computation Histories The computation history for a Turing machine on an input is simply the sequence of configurations that the machine goes through as it processes the input. An accepting computation

More information

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

Summary. Reg Dodds Department of Computer Science University of the Western Cape 2016 Reg Dodds Theory of Computation Summary Reg Dodds Department of Computer Science University of the Western Cape 2016 Reg Dodds rdodds@uwc.ac.za CSC 311 Paper I: Theory of Computation CSC 311 Paper I: Theory of Computation

More information

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

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death 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

More information

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

Chap. 4,5 Review. Algorithms created in proofs from prior chapters Chap. 4,5 Review Algorithms created in proofs from prior chapters (p. 55) Theorem 1.39: NFA to DFA (p. 67) Lemma 1.55: Regex to NFA (p. 69) Lemma 1.60: DFA to regex (through GNFA) (p. 112) Lemma 2.21:

More information

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY RYAN DOUGHERTY If we want to talk about a program running on a real computer, consider the following: when a program reads an instruction,

More information

DD2371 Automata Theory

DD2371 Automata Theory KTH CSC VT 2008 DD2371 Automata Theory Dilian Gurov Lecture Outline 1. The lecturer 2. Introduction to automata theory 3. Course syllabus 4. Course objectives 5. Course organization 6. First definitions

More information

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

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page. 6.045J/18.400J: Automata, Computability and Complexity March 30, 2005 Quiz 2 Prof. Nancy Lynch Please write your name in the upper corner of each page. Problem Score 1 2 3 4 5 6 Total Q2-1 Problem 1: True

More information

Turing Machines Part III

Turing Machines Part III Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's

More information

Decidability (What, stuff is unsolvable?)

Decidability (What, stuff is unsolvable?) University of Georgia Fall 2014 Outline Decidability Decidable Problems for Regular Languages Decidable Problems for Context Free Languages The Halting Problem Countable and Uncountable Sets Diagonalization

More information

ACS2: Decidability Decidability

ACS2: Decidability Decidability Decidability Bernhard Nebel and Christian Becker-Asano 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem

More information

CSE 105 Theory of Computation

CSE 105 Theory of Computation CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s Agenda Quick Review of CFG s and PDA s Introduction to Turing Machines and their Languages Reminders and

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

The Church-Turing Thesis. Chapter 18

The Church-Turing Thesis. Chapter 18 The Church-Turing Thesis Chapter 18 FSM PDA Turing machine Is this the end of the line? Can We Do Better? There are still problems we cannot solve: There is a countably infinite number of Turing machines

More information

CS154, Lecture 13: P vs NP

CS154, Lecture 13: P vs NP CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of

More information

Introduction to Languages and Computation

Introduction to Languages and Computation Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014

More information

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

More Turing Machines. CS154 Chris Pollett Mar 15, 2006. More Turing Machines CS154 Chris Pollett Mar 15, 2006. Outline Multitape Turing Machines Nondeterministic Turing Machines Enumerators Introduction There have been many different proposals for what it means

More information

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2 Reading Assignment: Sipser Chapter 31, 42 Turing Machines 41 covers algorithms for decidable problems about DFA, NFA, RegExp, CFG, and PDAs, eg slides 17 & 18 below I ve talked about most of this in class

More information

Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2 Turing Machines 1 Reading Assignment: Sipser Chapter 3.1, 4.2 4.1 covers algorithms for decidable problems about DFA, NFA, RegExp, CFG, and PDAs, e.g. slides 17 & 18 below. I ve talked about most of this

More information

CS154 Final Examination

CS154 Final Examination CS154 Final Examination June 7, 2010, 7-10PM Directions: CS154 students: answer all 13 questions on this paper. Those taking CS154N should answer only questions 8-13. The total number of points on this

More information

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

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction) CS5371 Theory of Computation Lecture 14: Computability V (Prove by Reduction) Objectives This lecture shows more undecidable languages Our proof is not based on diagonalization Instead, we reduce the problem

More information

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

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages COMP/MATH 300 Topics for Spring 2017 June 5, 2017 Review and Regular Languages Exam I I. Introductory and review information from Chapter 0 II. Problems and Languages A. Computable problems can be expressed

More information

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

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012 Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM

More information