Turing Machines and the Church-Turing Thesis

Similar documents
Computability Theory. CS215, Lecture 6,

Decidable Languages - relationship with other classes.

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Automata Theory CS S-12 Turing Machine Modifications

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

CS20a: Turing Machines (Oct 29, 2002)

CSE 105 THEORY OF COMPUTATION

Chapter 7 Turing Machines

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

Introduction to Turing Machines

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information

Decidability: Church-Turing Thesis

Turing Machines Part Two

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

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

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

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

TURING MAHINES

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Chapter 1 Welcome Aboard

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

HIS LEGACY. 100 Years Turing celebration. Gordana Dodig Crnkovic, IDT Open Seminar. Computer Science and Network Department Mälardalen University

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

Lecture notes on Turing machines

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

IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University

The Church-Turing Thesis

CS151 Complexity Theory. Lecture 1 April 3, 2017

7.1 The Origin of Computer Science

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

CSCI3390-Assignment 2 Solutions

Lecture 14: Recursive Languages

Chapter 3: The Church-Turing Thesis

Variations of the Turing Machine

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits

Part I: Definitions and Properties

Universal Turing Machine. Lecture 20

1 Deterministic Turing Machines

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

Theory of Computation - Module 4

Turing Machine variants

Turing s Thesis. Fall Costas Busch - RPI!1

CS21 Decidability and Tractability

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

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

Introduction to Turing Machines. Reading: Chapters 8 & 9

Lecture 1: Introduction

Lecture 1: Course Overview and Turing machine complexity

Computation. Some history...

Turing Machines Part III

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

1 Computational problems

CSE 105 THEORY OF COMPUTATION

(a) Definition of TMs. First Problem of URMs

Most General computer?

Turing Machines. Wen-Guey Tzeng Computer Science Department National Chiao Tung University

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0

Computability and Complexity

CS20a: Turing Machines (Oct 29, 2002)

highlights proof by contradiction what about the real numbers?

Turing Machine Variants

Lecture 13: Turing Machine

Complexity Theory Turing Machines

1 Unrestricted Computation

Turing Machines. Lecture 8

Turing Machines. Wolfgang Schreiner

Notes for Comp 497 (Comp 454) Week 12 4/19/05. Today we look at some variations on machines we have already seen. Chapter 21

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

SE 3310b Theoretical Foundations of Software Engineering. Turing Machines. Aleksander Essex

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE

ECS 120 Lesson 20 The Post Correspondence Problem

CpSc 421 Homework 9 Solution

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

Theory of Computation

1 Showing Recognizability

Theory of Computing Tamás Herendi

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

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

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

CSE 105 THEORY OF COMPUTATION

Complexity Theory Part I

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

CSci 311, Models of Computation Chapter 9 Turing Machines

Lecture 12: Mapping Reductions

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

The tape of M. Figure 3: Simulation of a Turing machine with doubly infinite tape

CSE 105 Theory of Computation

Chapter 01: Introduction. Lesson 01 Evolution Computers Part 1: Mechanical Systems, Babbage method of Finite Difference Engine and Turing Hypothesis

CSCC63 Worksheet Turing Machines

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

Theory of Computation (IX) Yijia Chen Fudan University

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Asymptotic notation : big-o and small-o

1 Deterministic Turing Machines

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

CS 525 Proof of Theorems 3.13 and 3.15

Computational Models Lecture 11, Spring 2009

Turing Machine Variants. Sipser pages

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Transcription:

CSE2001, Fall 2006 1 Turing Machines and the Church-Turing Thesis Today our goal is to show that Turing Machines are powerful enough to model digital computers, and to see discuss some evidence for the equivalence between the Turing Machine solvability, and the algorithmic solvability. First, let us see that adding multiple tapes to a Turing Machine, does not add anything to its power. A Multitape Turing Machine is just like a regular Turing Machine, except it has a (finite) number of tapes, each with its own read-write head. Also, for convenience, heads are allowed to stay. Initially, the string is written on the first tape, the rest of tapes are initially blank. Formally, the only difference between multitape machines and regular ones, is in the definition of the transition function δ: where k is the number of tapes. δ : Q Γ k (Q {q accept, q reject }) Γ k {L, R, S} k, Theorem (3.13 in the textbook) Every Multitape Turing Machine has an equivalent single-tape Turing Machine. Proof: pretty straightforward. The idea is to keep the content of all tapes on the single tape, separated by some special symbol (e.g. #), and use markers to keep track of the positions of the tapes. See the textbook for details. Example:.

CSE2001, Fall 2006 2 Now, the multitape Turing Machines (and therefore regular TMs) can simulate Random Access Machines. A Random Access Machine (RAM) consists of: A read-only input tape A write-only output tape An infinite number of registers R 1,..., R n,.... Each cell of the tape and each register can hold a non-negative integer of arbitrary size. A control system of RAM consists of a finite sequence of instructions from the following list. c(r i ) means the content of register R i. Instruction Description read(r i ) read the next input integer into R i. write(r i ) write c(r i ) to the output tape. copy(r i, R j ) c(r i ) = c(r j ). add(r i, R j, R k ) c(r i ) = c(r j ) + c(r k ). sub(r i, R j, R k ) c(r i ) = c(r j ) c(r k ), if c(r j ) c(r k ); c(r i ) = 0, otherwise. mult(r i, R j, R k ) c(r i ) = c(r j ) c(r k ). div(r i, R j, R k ) c(r i ) = c(r j )/c(r k ), if c(r k ) 0; c(r i ) = 0, otherwise. goto(j) go to the instruction j (the numbering starts from 1). ifthen(r i, j) if c(r i ) > 0 go to the instruction j. Note: in each instruction, a register can be substituted by an integer constant, or a reference to another register.

CSE2001, Fall 2006 3 The RAM operates in the following manner: The input tape contains a list of integers n 1,...,n k. The output tape is blank. All registers are initialized to 0. The RAM begins with instruction 1, and after finishing each instruction i goes either to instruction i + 1 (the first seven instructions), or to specified instruction j. RAM halts when it reaches the end i.e. the instruction i > n, where n is the number of instructions in the RAM. The content of the output tape after RAM has halted is considered to be the output of RAM on the input n 1,...,n k. So, RAMs calculate functions on integers. Example: RAM to calculate n!. Theorem: Any Random Access Machine can be simulated by a multitape Turing Machine. Sketch of the proof: we will use a 6-tape Turing Machine (could do with less). The input tape of RAM will be simulated by the input tape of TM. Non-negative integers are represented in unary notation (i.e. an integer k of RAM is represented as 1 k on the input tape of TM). The integers are separated by # s. The output tape of RAM will be simulated by a second tape of TM, the same way as the input tape was. The registers of RAM will be simulated by a third tape of TM, which will contain the contents of each non-zero register, in unary notation, separated by # s. The fourth, fifth and sixth tapes will be used as work tapes to do arithmetic. Example: implementation of the command mult(r 2, R 2, R 1 ) from the previous example. 1. find R 2 on the register tape (look for the first #). 2. copy the content of R 2 to the tape 4. 3. find R 1 on the register tape (look for the beginning of the tape). 4. copy the content of R 1 to the tape 5. 5. multiply; the result is written to the tape 6.

CSE2001, Fall 2006 4 6. copy the content of work tape 6 to the register tape (may have to shift the content of the register tape to make enough space). By now we have seen that Turing Machines are powerful enough to model a computation performed by a device similar to what we currently understand as a digital computer. Over the period of 20-th century, people have came up with a myriad of other ways to perform computation and Turing Machines turned out to be powerful enough to model all these. The common between all these different ways is the fact that every computation boils down to execution of a sequence of simple steps, an algorithm (in the literature, terms algorithmic procedure, and effective procedure are often used instead). Now, the big question is: Are Turing Machines powerful enough to model any conceivable algorithm? If yes, then by understanding capabilities and, most importantly, limitations of Turing Machines, we can understand the capabilities and limitations of algorithmic procedures in general. To answer this question, we first need to formalize the notion of algorithm. Intuitively, an algorithm is a method for obtaining some desired result, which has the following properties: 1. It is set out in terms of a finite number of exact instructions. 2. Each instruction will, if carried out without error, produce the desired result in a finite number of steps. 3. It can (in practice or in principle) be carried out by a human being unaided by any machinery save paper and pencil. 4. It does not demand any insight or ingenuity on the part of the human being carrying it out. (this list is from the article on Church-Turing Thesis from the Standford Encyclopedia of Philosophy. I posted the article on our website.) Unfortunately, property 4 can not be made formal (at least for now), because the concepts of insight and ingenuity are not formally definable. Thus, the question posted two paragraphs above cannot be given a precise answer.

CSE2001, Fall 2006 5 However, as previously said, any algorithmic procedure conceived so far can be implemented on a Turing Machine. And, so, we are taking the positive answer to the above question on faith (with a huge body of evidence supporting it!). This is what is called The Church-Turing Thesis: any algorithmic procedure can be executed by a Turing Machine. Once we accept the thesis, we gain two things: 1. We do not need to construct Turing Machines when we don t want to only the algorithms that they implement. 2. By showing that certain problems can not be solved using Turing Machines, we can be confident that these problems do not have a solution in principle (i.e. on any other current and future computing device).