CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Similar documents
CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

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

Theory of Computation (IX) Yijia Chen Fudan University

Computability Theory. CS215, Lecture 6,

The Church-Turing Thesis

CS21 Decidability and Tractability

Chapter 3: The Church-Turing Thesis

Theory of Computation

Variants of Turing Machine (intro)

CSCC63 Worksheet Turing Machines

UNRESTRICTED GRAMMARS

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

Foundations of

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

Busch Complexity Lectures: Turing s Thesis. Costas Busch - LSU 1

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

CSE 105 THEORY OF COMPUTATION

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

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

Variations of the Turing Machine

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

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

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

V Honors Theory of Computation

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Turing s Thesis. Fall Costas Busch - RPI!1

Decidability (What, stuff is unsolvable?)

Introduction to Turing Machines

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

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

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

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

1 Showing Recognizability

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

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

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

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Computational Models - Lecture 6

Further discussion of Turing machines

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

CS151 Complexity Theory. Lecture 1 April 3, 2017

Asymptotic notation : big-o and small-o

Most General computer?

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Part I: Definitions and Properties

TURING MAHINES

CSE 105 THEORY OF COMPUTATION

1 Non-deterministic Turing Machine

A Universal Turing Machine

Turing s original paper (1936)

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions

CSE 460: Computabilty and Formal Languages Turing Machine (TM) S. Pramanik

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Turing Machines. Lecture 8

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

5 3 Watson-Crick Automata with Several Runs

Turing Machines. Wolfgang Schreiner

CS 525 Proof of Theorems 3.13 and 3.15

Introduction to Computability

DM17. Beregnelighed. Jacob Aae Mikkelsen

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

Foundations of

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

Introduction to Languages and Computation

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

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

Computational Models Lecture 8 1

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

CS4026 Formal Models of Computation

SCHEME FOR INTERNAL ASSESSMENT TEST 3

258 Handbook of Discrete and Combinatorial Mathematics

CS154, Lecture 13: P vs NP

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

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Computational Models Lecture 8 1

Problems, and How Computer Scientists Solve Them Manas Thakur

Chapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE

Complexity Theory Part I

CSCE 551 Final Exam, Spring 2004 Answer Key

Lecture Notes. Advanced Discrete Structures COT S

TAKE-HOME: OUT 02/21 NOON, DUE 02/25 NOON

Decidable Languages - relationship with other classes.

UNIT-VIII COMPUTABILITY THEORY

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Turing machine. Turing Machine Model. Turing Machines. 1. Turing Machines. Wolfgang Schreiner 2. Recognizing Languages

Lecture 16: Time Complexity and P vs NP

CS154, Lecture 13: P vs NP

Computational Models Lecture 8 1

17.1 The Halting Problem

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

1 Unrestricted Computation

7.1 The Origin of Computer Science

Equivalent Variations of Turing Machines

Turing Machine Variants

Computational Models Lecture 11, Spring 2009

Turing Machine Variants. Sipser pages

Transcription:

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 2001, Fall 2012 1

Turing machine variants Multiple tapes 2-way infinite tapes Non-deterministic TMs 11/13/2012 CSE 2001, Fall 2012 27

Multitape Turing Machines A k-tape Turing machine M has k different tapes and read/write heads. It is thus defined by the 7-tuple (Q,,,,q 0,q accept,q reject ), with Q finite set of states finite input alphabet (without _ ) finite tape alphabet with { _ } q 0 start state Q q accept accept state Q q reject reject state Q the transition function : Q\{q accept,q reject } k Q k {L,R} k 11/13/2012 CSE 2001, Fall 2012 28

k-tape TMs versus 1-tape TMs Theorem 3.13: For every multi-tape TM M, there is a single-tape TM M such that L(M)=L(M ). Or, for every multi-tape TM M, there is an equivalent single-tape TM M. Proving and understanding these kinds of robustness results, is essential for appreciating the power of the Turing machine model. From this theorem Corollary 3.9 follows: A language L is TM-recognizable if and only if some multi-tape TM recognizes L. 11/13/2012 CSE 2001, Fall 2012 29

Outline Proof Thm. 3.13 Let M=(Q,,,,q 0,q accept,q reject ) be a k-tape TM. Construct 1-tape M with expanded = {#} Represent M-configuration u 1 q j a 1 v 1, u 2 q j a 2 v 2,, u k q j a k v k by M configuration, q j # u 1 a 1 v 1 # u 2 a 2 v 2 # # u k a k v k (The tapes are seperated by #, the head positions are marked by underlined letters.) 11/13/2012 CSE 2001, Fall 2012 30

Proof Thm. 3.13 (cont.) On input w=w 1 w n, the TM M does the following: Prepare initial string: #w 1 w n #_# #_#_ Read the underlined input letters k Simulate M by updating the input and the underlining of the head-positions. Repeat 2-3 until M has reached a halting state Halt accordingly. PS: If the update requires overwriting a # symbol, then shift the part # _ one position to the right. 11/13/2012 CSE 2001, Fall 2012 31

Non-deterministic TMs A nondeterministic Turing machine M can have several options at every step. It is defined by the 7-tuple (Q,,,,q 0,q accept,q reject ), with Q finite set of states finite input alphabet (without _ ) finite tape alphabet with { _ } q 0 start state Q q accept accept state Q q reject reject state Q the transition function : Q\{q accept,q reject } P (Q {L,R}) 11/13/2012 CSE 2001, Fall 2012 32

Robustness Just like k-tape TMs, nondeterministic Turing machines are not more powerful than simple TMs: Every nondeterministic TM has an equivalent 3-tape Turing machine, which in turn has an equivalent 1-tape Turing machine. Hence: A language L is recognizable if and only if some nondeterministic TM recognizes it. The Turing machine model is extremely robust. 11/13/2012 CSE 2001, Fall 2012 33

Computing with non-deterministic TMs Evolution of the n.d. TM represented by a tree of configurations (rather than a single path). If there is (at least) one accepting leave, then the TM accepts. C 5 C 2 C 6 C 1 C 3 C 4 t=1 t=2 t=3 reject accept 11/13/2012 CSE 2001, Fall 2012 34

Simulating Non-deterministic TMs with Deterministic Ones We want to search every path down the tree for accepting configurations. Bad idea: depth first. This approach can get lost in never-halting paths. Good idea: breadth first. For time step 1,2, we list all possible configurations of the nondeterministic TM. The simulating TM accepts when it lists an accepting configuration. 11/13/2012 CSE 2001, Fall 2012 35

Breadth First Let b be the maximum number of children of a node. Any node in the tree can be uniquely identified by a string {1,,b}*. C 5 Example: location of the rejecting configuration is (3,1). C 2 C 6 C 1 C 3 C 4 11/13/2012 CSE 2001, Fall 2012 36 accept t=1 reject t=2 With the lexicographical listing, (1), (2),, (b), (1,1), (1,2),,(1,b), (2,1), et cetera, we cover all nodes. t=3

Proof of Theorem 3.10 Let M be the non-deterministic TM on input w. The simulating TM uses three tapes: T1 contains the input w T2 the tape content of M on w at a node T3 describes a node in the tree of M on w. 1) T1 contains w, T2 and T3 are empty 2) Simulate M on w via the deterministic path to the node of tape 3. If the node accepts, accept, otherwise go to 3) 3) Increase the node value on T3; go to 2) 11/13/2012 CSE 2001, Fall 2012 37

Robustness Just like k-tape TMs, nondeterministic Turing machines are not more powerful than simple TMs: Every nondeterministic TM has an equivalent 3-tape Turing machine, which in turn has an equivalent 1-tape Turing machine. Hence: A language L is recognizable if and only if some nondeterministic TM recognizes it. Let s consider other ways of computing a language 11/13/2012 CSE 2001, Fall 2012 38

Enumerating Languages Thus far, the Turing machines were recognizers. When a TM E generates the words of a language, E is an enumerator (cf. recursively enumerable ). A Turing machine E, enumerates the language L if it prints an (infinite) list of strings on the tape such that all elements of L will appear on the tape, and all strings on the tape are elements of L. (E starts on an empty input tape. The strings can appear in any order; repetition is allowed.) 11/13/2012 CSE 2001, Fall 2012 39

Enumerating = Recognizing Theorem 3.13: A language L is TM-recognizable if and only if L is enumerable. Proof: ( if ) Take the enumerator E and input w. Run E and check the strings it generates. If w is produced, then accept and stop, otherwise let E continue. ( only if ) Take the recognizer M. Let s 1,s 2, be a listing of all strings * L. For j=1,2, run M on s 1,,s j for j time-steps. If M accepts an s, print s. Keep increasing j. 11/13/2012 CSE 2001, Fall 2012 40

Other Computational Models We can consider many other reasonable models of computation: DNA computing, neural networks, quantum computing Experience teaches us that every such model can be simulated by a Turing machine. Church-Turing Thesis: The intuitive notion of computing and algorithms is captured by the Turing machine model. 11/13/2012 CSE 2001, Fall 2012 41

Importance of the Church-Turing Thesis The Church-Turing thesis marks the end of a long sequence of developments that concern the notions of way-of-calculating, procedure, solving, algorithm. Goes back to Euclid s GCD algorithm (300 BC). For a long time, this was an implicit notion that defied proper analysis. 11/13/2012 CSE 2001, Fall 2012 42

Algorithm After Abū Abd Allāh Muhammed ibn Mūsā al-khwārizmī (770 840) His Al-Khwarizmi on the Hindu Art of Reckoning describes the decimal system (with zero), and gives methods for calculating square roots and other expressions. Algebra is named after an earlier book. 11/13/2012 CSE 2001, Fall 2012 43

Hilbert s 10th Problem In 1900, David Hilbert (1862 1943) proposed his Mathematical Problems (23 of them). The Hilbert s 10th problem is: Determination of the solvability of a Diophantine equation. Given a Diophantine equation with any number of unknown quantities and with rational integral numerical coefficients: To devise a process according to which it can be determined by a finite number of operations whether the equation is solvable in rational integers. 11/13/2012 CSE 2001, Fall 2012 44

Diophantine Equations Let P(x 1,,x k ) be a polynomial in k variables with integral coefficients. Does P have an integral root (x 1,,x k ) Z k? Example: P(x,y,z) = 6x 3 yz + 3xy 2 x 3 10 has integral root (x,y,z) = (5,3,0). Other example: P(x,y) = 21x 2 81xy+1 does not have an integral root. 11/13/2012 CSE 2001, Fall 2012 45

(Un)solving Hilbert s 10th Hilbert s a process according to which it can be determined by a finite number of operations needed to be defined in a proper way. This was done in 1936 by Church and Turing. The impossibility of such a process for exponential equations was shown by Davis, Putnam and Robinson. Matijasevič proved that Hilbert s 10th problem is unsolvable in 1970. 11/13/2012 CSE 2001, Fall 2012 46