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

Size: px
Start display at page:

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

Transcription

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

2 Definition of Turing Machine A 5-tuple: T = (Q, Σ, Γ, q 0, δ), where Q: a finite set of states h: the halt state, not included in Q Σ= input alphabet Γ= Tape symbols Both Σ and Γ are finite and Σ Γ is the blank symbol and not in Γ q 0 is the start state and q 0 ɛq δ is the transition function (it is a partial function): δ : Q (Γ { }) (Q {h}) (Γ { }) {R, L, S} δ(p, X) = (q, Y, D) Current state pɛq {h}, Next state qɛq {h} X, Y ɛγ { } Dɛ{R, L, S} is the direction p X/Y, D q Tape has addresses 0,1,2,3,... Initially, input string is on tape starting at location 1 and all other locations on tape has initially Tape read/write head points to location 0. 2

3 Sequence of TM Moves We will call the symbol a blank. and each location of the tape a square TM read/write head points to a current square and head moves one position to right or one position to the left or stay at the same square for each move. Configuration of TM: xqy where q is the current state, x is the string to the left of the current square, y either is null or starts in the current square, everything after xy on the tape is blank. Trace a sequence of TM moves by specifying the configuration at each step: xqy T Zrw or xqy T Zrw Q is the current state, r is the next state Starting configuration: q 0 x, xɛσ is the input string Acceptance configuration: zhw, where z, wɛ(γ { }) Rejection: q 0 x T zqaw and (q, a) is not a valid input to the transition function TM loops for ever 3

4 Turing Machines as Language Acceptors If T = (Q, Σ, Γ, q 0, δ) is a TM and xɛσ, then x is accepted by T if q 0 x T zhw for some strings z, wɛ(γ { }) A language L Σ is accepted by T if L = L(T ), where L(T ) = {xɛσ x is accepted by T } 4

5 An Example Language L = ab An FA: q a 0 q 1 b a b q 2 a, b A TM accepting the same language (partial function): /, R q q 0 1 a/a, R q 2 b/b, R /, S h Trace of the computation for the input string x = abb q 0 abb q 1 abb aq 2 bb abq 2 b abbq 2 abbh (ACCEPT) x=aba q 0 aba q 1 aba aq 2 ba abq 2 a (RE- JECT) 5

6 Variants of Turing Machine Language model and computational model of Turing machines Any variant will not add any more power: (Same computations) Some minor variations: Only moves: R and L, no S (Reduction does not reduce power) Doubly infinite tape (Addition does not increase power) Major variations: Increase the number of tapes Nondeterminism Random access memory 6

7 Multitape Turing Machines A 5-tuple: T = (Q, Σ, Γ, q 0, δ), where δ : Q (Γ { }) 2 (Q {h}) (Γ { }) 2 {R, L, S} 2 Two input/output tapes with independent heads (i.e., the two heads are not moving in synchrony. Input is in the first tape, second tape is initially blank. Similarly, the output will appear on the first tape, and the contents of the second tape at the end of the computation will be irrelevant. A single move can change the state, the symbols in the current squares on both tapes, and the i positions of the two tape heads. Configuration of a 2-tape TM : (q, x 1 a1y 1, x 2 a 2 y 2 ) TM is in state q, current character is a 1 on the first and a 2 on the second tape. X 1, Y 1, X 2, Y 2 ɛ(γ { }) Starting configaration: (q 0, x, ) δ(q, X, Y ) = (r, Z, W, L, R) Current state is q, input symbols in tape 1 and 2 are X and Y respectively. Next state is r and X is replaced by Z and Y by W. Head on the first tape move left and on the second tape move right. (q, x 1 a 1 y 1, x 2 a 2 y 2 (r, x 1 b 1 y 1, x 2 b 2 y 2 ) δ(q, a 1, a 2 ) = (r, b 1, b 2, S, S) q (a1,a2) / (b1,b2), (S,S) r 7

8 Example of a Two-Tape Turing Machine Copy input in the second tape starting in square 1. Bring head back to square 0 after copying. δ(q,, ) = (q 1,,, R, R) δ(q 1, a, ) = (q 1, a, a, R, R) δ(q 1, b, ) = (q 1, b, b, R, R) δ(q 1,, ) = (q 2,,, L, L) δ(q 2, a, a) = (q 2, a, a, L, L) δ(q 2, b, b) = (q 2, b, b, L, L) δ(q 2,, ) = (h,,, S, S) (b, ) / (b,b), (R,R) (, )/ (, ), (R,R) ( a, )/ (a,a), (R,R) q 0 q 1 h (, )/(, ), (S,S) q 2 (, )/(, ), (L,L) (a,a)/ (a,a), ( L,L) (b,b)/ (b,b ), (L,L) Theorem: For every 2-tape (also true for m-tape) TM T, there is an ordinary 1-tape TM T1, such that 1. For every xɛσ, T accepts x if and only if T1 accepts x, and T rejects x if and only if T1 rejects x That is, L(T)=L(T1). 2. For every xɛσ, if (q 0, x, ) T (h, yaz, ubv) for some strings y, z, u, vɛ(γ { }) and symbols a, bɛγ { }, then q 1 x T 1 yhaz 8

9 That is, the tape of the simple TM and the first tape of the 2-tape TM have the same string left when they halt. Theorem: For every nondeterministic TM there is an ordinary deterministic TM. 9

10 Universal Turing Machine 1. A computer runs many programs, not just one particular program. 2. Data for the program is stored in memory with the program 3. If we consider the moves of a TM as a program, a given TM runs a particular program. Where is this program stored? Where is the data for this program stored? 4. A TM is not general purpose like a modern computer which runs NOT just one program. 5. Universal Turing Machine, T u, is a general purpose TM in the sense that it runs any Turing machine on it s input (a sort of recursive concept, a Turing Machine running a Turing machine). 6. Because a TM can take any input string on it s tape, we will use different input strings for T u to simulate different Turing Machines. But T u is a particular TM (i.e., a fixed program). 7. A TM T and and an input, w, to T is encoded for T u, so that T and w can be placed on the tape of T u as T u s input. 8. After all, a T u is also a TM and it takes ainy string of characters on it s tape. 10

11 9. If e(t) and e(w) are the encoding of T and w respectively, then input to T u is e(t)e(w). 10. Initially, e(t)e(w) is placed on the tape of T u, and T u runs on this input string e(t)e(w) to simulate the functions of T running on w. 11

12 Encoding e(t) and e(w) for an Universal Turing Machine 1. Symbolic notation first: e(t)={m(t)} where, m(t)= a move of TM T move m: δ(p, σ) = (q, τ, D) e(m)=(p, σ, q, τ, D), a five tuple Example: T accepting the language a q /, R q 0 1 a /a, R /, S h {(, q 0,, R), (q 1, a, q 1, a, R), (q 1,, h,, S)} Moves for T stored on tape in any order. 12

13 Encoding Using Tape Symbols 1. we will use Σ = {0, 1} for T u 2. Assign numbers to each state, tape symbol, and tape head direction of T 3. Each tape symbol a i = 1 n(a i), where n(a i ) = i 4. we use a 1, thus, = 1 n(a 1) = 1 1 = 1 5. Similarly, for states, we can assign n(h) = 1, n(q 0 ) = 2, etc. Therefore, h = 1, q 0 = 11, etc. 6. Three directions: n(r) = 1, n(l) = 2, n(s) = 3 Therefore, R= 1, L=11, S= Encoding of a move m: δ(p, σ) = (q, τ, D) is represented by a five tuple, each element of the tuple separated by a 0 1 n(p) 01 n(σ) 01 n(q) 01 n(τ) 01 n(d) 0 Example: δ(, q 0 ) = (, R) = (, q 0,, R) = Encoding of T: Moves of T in some order as m 1, m 2,..., m k e(t ) = e(m 1 )0e(m 2 )0...0e(m k )0 9. Encoding of input z: if z = z 1 z 2...z j is a string, where each z i ɛs is the infinite number of symbols. e(z) = o1 n(z 1) 01n(z 2 ) n(z j) o 13

14 Encoding of the TM accepting a q /, R q 0 1 a /a, R /, S h 1. Symbolic: e(t): (q 0,, q 1,, R), (q 1, a, q 1, a, R), (q 1,, h,, S) Using Tape symbols: 2. Two 1 s (11) to delimit consecutive moves. 3. Four 1 s (i.e., 1111) separating e(t) and e(w)? 4. e(t): e(t)e(w) where w = aba When it is placed on the input tape of the UTM, it will look like: Tape 1: Tape 2: Tape 3: 14

15 Halting Problem 1. What is the language that is accepted by the Universal Turing Machine? H={e(T )e(w) T accepts w} If T halts on w, T u halts on (e(t ), e(w)). If T does not accept w, T u does not accept (e(t ), e(w)), i.e., T u either crashes or goes into an infinite loop. 2. What is the Halting Problem? Given a Turing Machine T and an input w, does T accept w? 3. This is a decision problem with yes/no answer 4. Input to this decision problem is xɛσ 5. Σ can be partitioned int three subsets as follows: Subset that the T accepts, subset that the T does not accept by crashing and the subset that T does not accept by infinite looping. 6. Y(T)= the set of input T accepts N(T): the set of input T rejects, i.e., it says no I(T): the set of input T infinite loops on; T never halts 15

16 Halting Problem is unsolvable 1. Recursively enumerable language L: If there exists a TM that accepts L, i.e., if xɛl then TM for L halts on x, else it will either crash or loop. 2. Recursive language L: If there exists a TM for L that recognizes L, i.e., if xɛl then TM for L halts on x, else the TM crashes (i.e. it does not accept the input by only crashing and NOT by going into a LOOP). 3. If a language is recursive then it s compliment is recursive. 4. If a language is recirsively enumerateble and it s complement is also recursively enumerable then the language is recursive. Take a string and run it on T and T. Either T or T will halt on any input. 5. If a language is not recursive then it s compliment is not recursive. 6. Proof of the halting problem: 16

17 CHURCH-TURING THESIS 1. Any effective computation whatsoever, any algorithmic procedure that can be carried out by a human being or a team of human beings or a computer can be carried out by some Turing machine. 2. This statement was first formulated by a logician Alonzo Church in the 1930s. 3. One cannot prove it because there is no precise definition of an effective computation or algorithmic procedure. 4. A good bit of evidence has accumulated over the last 80 years that has caused this thesis to be generally accepted. 17

Chapter 7 Turing Machines

Chapter 7 Turing Machines Chapter 7 Turing Machines Copyright 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 A General Model of Computation Both finite automata and pushdown automata are

More information

7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions

7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions CSC4510/6510 AUTOMATA 7.1 A General Model of Computation 7.2 Turing Machines as Language Acceptors 7.3 Turing Machines that Compute Partial Functions A General Model of Computation Both FA and PDA are

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

Most General computer?

Most General computer? Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall

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

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

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

From Fundamentele Informatica 1: inleverdatum 1 april 2014, 13:45 uur. A Set A of the Same Size as B or Larger Than B. A itself is not.

From Fundamentele Informatica 1: inleverdatum 1 april 2014, 13:45 uur. A Set A of the Same Size as B or Larger Than B. A itself is not. Fundamentele Informatica 3 voorjaar 2014 http://www.liacs.nl/home/rvvliet/fi3/ Rudy van Vliet kamer 124 Snellius, tel. 071-527 5777 rvvliet(at)liacs(dot)nl college 8, 31 maart 2014 8. Recursively Enumerable

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 s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines Definition of Algorithm:

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

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

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions Turing Machine properties Turing Machines TM Variants and the Universal TM There are many ways to skin a cat And many ways to define a TM The book s Standard Turing Machines Tape unbounded on both sides

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

CS4026 Formal Models of Computation

CS4026 Formal Models of Computation CS4026 Formal Models of Computation Turing Machines Turing Machines Abstract but accurate model of computers Proposed by Alan Turing in 1936 There weren t computers back then! Turing s motivation: find

More information

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

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages Homework s TM Variants and the Universal TM Homework #6 returned Homework #7 due today Homework #8 (the LAST homework!) Page 262 -- Exercise 10 (build with JFLAP) Page 270 -- Exercise 2 Page 282 -- Exercise

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

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 (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM)

Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) Turing Machines (TM) Deterministic Turing Machine (DTM) Nondeterministic Turing Machine (NDTM) 1 Deterministic Turing Machine (DTM).. B B 0 1 1 0 0 B B.. Finite Control Two-way, infinite tape, broken into

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

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

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

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

1 Unrestricted Computation

1 Unrestricted Computation 1 Unrestricted Computation General Computing Machines Machines so far: DFAs, NFAs, PDAs Limitations on how much memory they can use: fixed amount of memory plus (for PDAs) a stack Limitations on what they

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

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

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman Equivalence of TMs and Multitape TMs Theorem 3.13 and Corollary 3.15 By: Joseph Lauman Turing Machines First proposed by Alan Turing in 1936 Similar to finite automaton, but with an unlimited and unrestricted

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

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

Chapter 8. Turing Machine (TMs)

Chapter 8. Turing Machine (TMs) Chapter 8 Turing Machine (TMs) Turing Machines (TMs) Accepts the languages that can be generated by unrestricted (phrase-structured) grammars No computational machine (i.e., computational language recognition

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

Before We Start. Turing Machines. Languages. Now our picture looks like. Theory Hall of Fame. The Turing Machine. Any questions? The $64,000 Question

Before We Start. Turing Machines. Languages. Now our picture looks like. Theory Hall of Fame. The Turing Machine. Any questions? The $64,000 Question Before We Start s Any questions? Languages The $64,000 Question What is a language? What is a class of languages? Now our picture looks like Context Free Languages Deterministic Context Free Languages

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

Theory of Computation

Theory of Computation Theory of Computation Lecture #2 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 1 Lecture 2: Overview Recall some basic definitions from Automata Theory.

More information

1 Deterministic Turing Machines

1 Deterministic Turing Machines Time and Space Classes Exposition by William Gasarch 1 Deterministic Turing Machines Turing machines are a model of computation. It is believed that anything that can be computed can be computed by a Turing

More information

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

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0 Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0 Turing Machines Now for a machine model of much greater power.

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

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

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

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

Equivalent Variations of Turing Machines

Equivalent Variations of Turing Machines Equivalent Variations of Turing Machines Nondeterministic TM = deterministic TM npda = pushdown automata with n stacks 2PDA = npda = TM for all n 2 Turing machines with n tapes (n 2) and n tape heads has

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

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

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

Automata Theory (2A) Young Won Lim 5/31/18

Automata Theory (2A) Young Won Lim 5/31/18 Automata Theory (2A) Copyright (c) 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

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

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

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

CS 525 Proof of Theorems 3.13 and 3.15

CS 525 Proof of Theorems 3.13 and 3.15 Eric Rock CS 525 (Winter 2015) Presentation 1 (Week 4) Equivalence of Single-Tape and Multi-Tape Turing Machines 1/30/2015 1 Turing Machine (Definition 3.3) Formal Definition: (Q, Σ, Γ, δ, q 0, q accept,

More information

CS151 Complexity Theory. Lecture 1 April 3, 2017

CS151 Complexity Theory. Lecture 1 April 3, 2017 CS151 Complexity Theory Lecture 1 April 3, 2017 Complexity Theory Classify problems according to the computational resources required running time storage space parallelism randomness rounds of interaction,

More information

Variations of the Turing Machine

Variations of the Turing Machine Variations of the Turing Machine 1 The Standard Model Infinite Tape a a b a b b c a c a Read-Write Head (Left or Right) Control Unit Deterministic 2 Variations of the Standard Model Turing machines with:

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

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

Foundations of

Foundations of 91.304 Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin dm@cs.uml.edu With some modifications by Prof. Karen Daniels, Fall 2012

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

Theory of Computation - Module 4

Theory of Computation - Module 4 Theory of Computation - Module 4 Syllabus Turing Machines Formal definition Language acceptability by TM TM as acceptors, Transducers - designing of TM- Two way infinite TM- Multi tape TM - Universal Turing

More information

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

Busch Complexity Lectures: Turing s Thesis. Costas Busch - LSU 1 Busch Complexity Lectures: Turing s Thesis Costas Busch - LSU 1 Turing s thesis (1930): Any computation carried out by mechanical means can be performed by a Turing Machine Costas Busch - LSU 2 Algorithm:

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

Turing Machine Extensions, and Enumerators

Turing Machine Extensions, and Enumerators Turing Machine Extensions, and Enumerators Prof. (Dr.) K.R. Chowdhary Email: kr.chowdhary@iitj.ac.in Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Monday 10

More information

Lecture 14: Recursive Languages

Lecture 14: Recursive Languages Lecture 14: Recursive Languages Instructor: Ketan Mulmuley Scriber: Yuan Li February 24, 2015 1 Recursive Languages Definition 1.1. A language L Σ is called recursively enumerable (r. e.) or computably

More information

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE

COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE Volume 3, No. 5, May 2012 Journal of Global Research in Computer Science REVIEW ARTICLE Available Online at www.jgrcs.info COMPARATIVE ANALYSIS ON TURING MACHINE AND QUANTUM TURING MACHINE Tirtharaj Dash

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

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

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

Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1 Turing Machines a n b n c The anguage Hierarchy n? ww? Context-Free anguages a n b n egular anguages a * a *b* ww Courtesy Costas Busch - PI a n b n c n Turing Machines anguages accepted by Turing Machines

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

CSCI3390-Assignment 2 Solutions

CSCI3390-Assignment 2 Solutions CSCI3390-Assignment 2 Solutions due February 3, 2016 1 TMs for Deciding Languages Write the specification of a Turing machine recognizing one of the following three languages. Do one of these problems.

More information

1 Deterministic Turing Machines

1 Deterministic Turing Machines Time and Space Classes Exposition by William Gasarch 1 Deterministic Turing Machines Turing machines are a model of computation. It is believed that anything that can be computed can be computed by a Turing

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

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

ECS 120 Lesson 15 Turing Machines, Pt. 1

ECS 120 Lesson 15 Turing Machines, Pt. 1 ECS 120 Lesson 15 Turing Machines, Pt. 1 Oliver Kreylos Wednesday, May 2nd, 2001 Before we can start investigating the really interesting problems in theoretical computer science, we have to introduce

More information

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

Chapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE Chapter 1 - Time and Space Complexity deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE 1 / 41 Deterministic Turing machines Definition 1.1 A (deterministic

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

More About Turing Machines. Programming Tricks Restrictions Extensions Closure Properties

More About Turing Machines. Programming Tricks Restrictions Extensions Closure Properties More About Turing Machines Programming Tricks Restrictions Extensions Closure Properties 1 Overview At first, the TM doesn t look very powerful. Can it really do anything a computer can? We ll discuss

More information

Turing Machines Part II

Turing Machines Part II Turing Machines Part II COMP2600 Formal Methods for Software Engineering Katya Lebedeva Australian National University Semester 2, 2016 Slides created by Katya Lebedeva COMP 2600 Turing Machines 1 Why

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

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

A Universal Turing Machine

A Universal Turing Machine A Universal Turing Machine A limitation of Turing Machines: Turing Machines are hardwired they execute only one program Real Computers are re-programmable Solution: Universal Turing Machine Attributes:

More information

Turing Machines. Wolfgang Schreiner

Turing Machines. Wolfgang Schreiner Turing Machines Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang Schreiner

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

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

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

CS 410/610, MTH 410/610 Theoretical Foundations of Computing

CS 410/610, MTH 410/610 Theoretical Foundations of Computing CS 410/610, MTH 410/610 Theoretical Foundations of Computing Fall Quarter 2010 Slides 2 Pascal Hitzler Kno.e.sis Center Wright State University, Dayton, OH http://www.knoesis.org/pascal/ CS410/610 MTH410/610

More information

Undecibability. Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not.

Undecibability. Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not. Undecibability Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not. The problem was posed in 1900. In 1970 it was proved that there can

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

Busch Complexity Lectures: Turing Machines. Prof. Busch - LSU 1

Busch Complexity Lectures: Turing Machines. Prof. Busch - LSU 1 Busch Complexity ectures: Turing Machines Prof. Busch - SU 1 The anguage Hierarchy a n b n c n? ww? Context-Free anguages n b n a ww egular anguages a* a *b* Prof. Busch - SU 2 a n b anguages accepted

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

Non-emptiness Testing for TMs

Non-emptiness Testing for TMs 180 5. Reducibility The proof of unsolvability of the halting problem is an example of a reduction: a way of converting problem A to problem B in such a way that a solution to problem B can be used to

More information

CSE 460: Computabilty and Formal Languages. S. Pramanik

CSE 460: Computabilty and Formal Languages. S. Pramanik CSE 46: Computabilty and Formal Languages NF A Λ S. Pramanik NF A Λ Concatanation of languages and () : () 2 O,, O * FA () * FA Λ 2 2 * ()* NFA * ()* NFA- Figure : NF A Λ is an NFA but it also allows Λ-transitions.

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

Turing Machine Recap

Turing Machine Recap Turing Machine Recap DFA with (infinite) tape. One move: read, write, move, change state. High-level Points Church-Turing thesis: TMs are the most general computing devices. So far no counter example Every

More information

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

IV. Turing Machine. Yuxi Fu. BASICS, Shanghai Jiao Tong University IV. Turing Machine Yuxi Fu BASICS, Shanghai Jiao Tong University Alan Turing Alan Turing (23Jun.1912-7Jun.1954), an English student of Church, introduced a machine model for effective calculation in On

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

Turing Machines Extensions

Turing Machines Extensions Turing Machines Extensions KR Chowdhary Professor & Head Email: kr.chowdhary@ieee.org Department of Computer Science and Engineering MBM Engineering College, Jodhpur October 6, 2010 Ways to Extend Turing

More information

Turing machines and linear bounded automata

Turing machines and linear bounded automata and linear bounded automata Informatics 2A: Lecture 29 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November, 2011 1 / 13 1 The Chomsky hierarchy: summary 2 3 4 2 / 13

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

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

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information Theory of Computation Lecture Notes Prof. Yuh-Dauh Lyuu Dept. Computer Science & Information Engineering and Department of Finance National Taiwan University Problems and Algorithms c 2004 Prof. Yuh-Dauh

More information

Opleiding Informatica

Opleiding Informatica Opleiding Informatica Tape-quantifying Turing machines in the arithmetical hierarchy Simon Heijungs Supervisors: H.J. Hoogeboom & R. van Vliet BACHELOR THESIS Leiden Institute of Advanced Computer Science

More information

Turing Machines. Fall The Chinese University of Hong Kong. CSCI 3130: Formal languages and automata theory

Turing Machines. Fall The Chinese University of Hong Kong. CSCI 3130: Formal languages and automata theory The Chinese University of Hong Kong Fall 2011 CSCI 3130: Formal languages and automata theory Turing Machines Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc3130 Turing Machines control head a

More information

2.6 Variations on Turing Machines

2.6 Variations on Turing Machines 2.6 Variations on Turing Machines Before we proceed further with our exposition of Turing Machines as language acceptors, we will consider variations on the basic definition of Slide 10 and discuss, somewhat

More information

Turing s Thesis. Fall Costas Busch - RPI!1

Turing s Thesis. Fall Costas Busch - RPI!1 Turing s Thesis Costas Busch - RPI!1 Turing s thesis (1930): Any computation carried out by mechanical means can be performed by a Turing Machine Costas Busch - RPI!2 Algorithm: An algorithm for a problem

More information

Universal Turing Machine. Lecture 20

Universal Turing Machine. Lecture 20 Universal Turing Machine Lecture 20 1 Turing Machine move the head left or right by one cell read write sequentially accessed infinite memory finite memory (state) next-action look-up table Variants don

More information

Turing Machines and Time Complexity

Turing Machines and Time Complexity Turing Machines and Time Complexity Turing Machines Turing Machines (Infinitely long) Tape of 1 s and 0 s Turing Machines (Infinitely long) Tape of 1 s and 0 s Able to read and write the tape, and move

More information