Computing Functions with Turing Machines

Slides:



Advertisements
Similar presentations
ALAK ROY. Assistant Professor Dept. of CSE NIT Agartala
Advertisements

Introduction to Turing Machines
Algorithms Sipser 3.3 (pages ). CS 311 Fall Computability Hilbert's Tenth Problem: Find a process according to which it can be determined.
Fall 2006Costas Busch - RPI1 Turing Machines. Fall 2006Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Computing functions with Turing machines
Algorithms Sipser 3.3 (pages ). CS 311 Mount Holyoke College 2 Computability Hilbert's Tenth Problem: Find “a process according to which it can.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Courtesy Costas Busch - RPI1 Turing’s Thesis. Courtesy Costas Busch - RPI2 Turing’s thesis: Any computation carried out by mechanical means can be performed.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Computing Functions with Turing Machines. 2 A function Domain: Result Region: has:
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 Turing’s Thesis. Fall 2004COMP 3352 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2011.
1 Language Recognition (11.4) and Turing Machines (11.5) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 Turing Machines There are languages that are not context-free. What can we say about the most powerful automata and the limits of computation?. Alan.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
Turing Machines (13.5) Based on slides by Costas Busch from the course
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
1 Turing machines Chapter 4, Smith and Kimber. A Turing machine is an abstraction of a human “computer”. Consists of - control, in the form of states -
Recursively Enumerable and Recursive Languages
1 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 154 Formal Languages and Computability April 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 3240 – Chapter 9.  Turing Machines  From Alan Turing, 1936  Turns out to be the LAST machine  The only machine you'll ever need  The Church-Turing.
How Does Turing Machine Think? Example Chaoyang Li RULE’S If read 1, write 0, go right, repeat. If read 0, write 1, HALT! If read , write 1, HALT! Let’s.
1 Computing Functions with Turing Machines. 2 A function Domain Result Region has:
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Turing Machines. The next level of Machine… PDAs improved on FSAs by adding memory. We make the memory more flexible to do more complicated tasks.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 154 Formal Languages and Computability April 7 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Mealy Machines Finite State Machines with Outputs given on the transitions.
1 Recursively Enumerable and Recursive Languages.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Turing’s Thesis.
Turing’s Thesis Costas Busch - LSU.
CSE202: Introduction to Formal Languages and Automata Theory
Computable Functions.
Busch Complexity Lectures: Turing Machines
Computing with Turing Machines
Turing’s Thesis Costas Busch - RPI.
Computing Functions with Turing Machines
Turing Machines 2nd 2017 Lecture 9.
University of Gujrat Department of Computer Science
Chapter 9 TURING MACHINES.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Chapter 3: The CHURCH-Turing thesis
Turing Machines (11.5) Based on slides by Costas Busch from the course
Turing Machines (TM) Deterministic Turing Machine (DTM)
Theory of Computation Turing Machines.
Decidable Languages Costas Busch - LSU.
Theory of computing, part 4
Turing acceptable languages and Enumerators
Formal Languages, Automata and Models of Computation
Formal Definitions for Turing Machines
Presentation transcript:

Computing Functions with Turing Machines

A function has: Result Region: Domain:

A function may have many parameters: Example: Addition function

Integer Domain Decimal: 5 Binary: 101 We prefer unary representation: easier to manipulate with Turing machines Unary: 11111

Definition: A function is computable if there is a Turing Machine such that: Initial configuration Final configuration initial state final state For all Domain

In other words: A function is computable if there is a Turing Machine such that: Initial Configuration Final Configuration For all Domain

Example The function is computable are integers Turing Machine: Input string: unary Output string: unary

Start initial state The 0 is the delimiter that separates the two numbers

Start initial state Finish final state

The 0 helps when we use the result for other operations Finish final state

Turing machine for function

Execution Example: Time 0 (2) (2) Final Result

Time 0

Time 1

Time 2

Time 3

Time 4

Time 5

Time 6

Time 7

Time 8

Time 9

Time 10

Time 11

Time 12 HALT & accept

Another Example The function is computable is integer Turing Machine: Input string: unary Output string: unary

Start initial state Finish final state

Turing Machine Pseudocode for Replace every 1 with $ Repeat: Find rightmost $, replace it with 1 Go to right end, insert 1 Until no more $ remain

Turing Machine for

Example Start Finish

Another Example if The function if is computable

Turing Machine for if if Input: Output: or

Turing Machine Pseudocode: Repeat Match a 1 from with a 1 from Until all of or is matched If a 1 from is not matched erase tape, write 1 else erase tape, write 0

Combining Turing Machines

Block Diagram Turing Machine input output

Example: if if Adder Comparer Eraser

Turing’s Thesis

Question: Do Turing machines have the same power with a digital computer? Intuitive answer: Yes There is no formal answer!!!

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

Computer Science Law: A computation is mechanical if and only if it can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines

Definition of Algorithm: An algorithm for function is a Turing Machine which computes

Algorithms are Turing Machines When we say: There exists an algorithm We mean: There exists a Turing Machine that executes the algorithm