Computing Functions with Turing Machines

Slides:



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

Introduction to Turing Machines
Fall 2006Costas Busch - RPI1 Turing Machines. Fall 2006Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Computing functions with Turing machines
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
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 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:
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 ? ?
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2005Costas Busch - RPI1 Pushdown Automata PDAs.
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.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output.
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.
A Universal Turing Machine
Turing Machines (13.5) Based on slides by Costas Busch from the course
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
Costas Busch - LSU1 Turing’s Thesis. Costas Busch - LSU2 Turing’s thesis (1930): Any computation carried out by mechanical means can be performed by a.
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.
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 ? ?
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
1 Recursively Enumerable and Recursive Languages.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
TM Macro Language MA/CSSE 474 Theory of Computation.
Turing’s Thesis Costas Busch - LSU.
A Universal Turing Machine
CSE202: Introduction to Formal Languages and Automata Theory
Recursively Enumerable and Recursive Languages
Chapter 1 Welcome Abroad
Busch Complexity Lectures: Turing Machines
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Computing with Turing Machines
Turing Machines 2nd 2017 Lecture 9.
Chapter 9 TURING MACHINES.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Turing Machines (11.5) Based on slides by Costas Busch from the course
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
Decidable Languages Costas Busch - LSU.
Computing Functions with Turing Machines
Theory of computing, part 4
A Universal Turing Machine
The Off-Line Machine Input File read-only (once) Input string
Turing acceptable languages and Enumerators
Undecidable problems:
Formal Languages, Automata and Models of Computation
Formal Definitions for Turing Machines
The Chomsky Hierarchy Costas Busch - LSU.
Presentation transcript:

Computing Functions with Turing Machines Costas Busch - LSU

A function has: Result Region: Domain: Costas Busch - LSU

A function may have many parameters: Example: Addition function Costas Busch - LSU

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

A function is computable if there is a Turing Machine such that: Definition: A function is computable if there is a Turing Machine such that: Initial configuration Final configuration initial state accept state For all Domain Costas Busch - LSU

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

Example The function is computable are integers Turing Machine: Input string: unary Output string: unary Costas Busch - LSU

The 0 is the delimiter that separates the two numbers Start initial state The 0 is the delimiter that separates the two numbers Costas Busch - LSU

Start initial state Finish final state Costas Busch - LSU

The 0 here helps when we use the result for other operations Finish final state Costas Busch - LSU

Turing machine for function Costas Busch - LSU

Execution Example: Time 0 (=2) (=2) Final Result Costas Busch - LSU

Time 0 Costas Busch - LSU

Time 1 Costas Busch - LSU

Time 2 Costas Busch - LSU

Time 3 Costas Busch - LSU

Time 4 Costas Busch - LSU

Time 5 Costas Busch - LSU

Time 6 Costas Busch - LSU

Time 7 Costas Busch - LSU

Time 8 Costas Busch - LSU

Time 9 Costas Busch - LSU

Time 10 Costas Busch - LSU

Time 11 Costas Busch - LSU

Time 12 HALT & accept Costas Busch - LSU

Another Example The function is computable is integer Turing Machine: Input string: unary Output string: unary Costas Busch - LSU

Start initial state Finish accept state Costas Busch - LSU

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 Costas Busch - LSU

Turing Machine for Costas Busch - LSU

Example Start Finish Costas Busch - LSU

Another Example if The function if is computable Input: Output: or Costas Busch - LSU

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 Costas Busch - LSU

Combining Turing Machines Costas Busch - LSU

Block Diagram Turing Machine input output Costas Busch - LSU

Example: if if Adder Comparator Eraser Costas Busch - LSU