Turing Machine Read/Write – Move Left/Right BB Read/Write Head 001000 State Qi.

Slides:



Advertisements
Similar presentations
Algebra Expressions equations and solving equations.
Advertisements

Turing Machines Part 1:. 2 Church-Turing Thesis Part 1 An effective procedure is defined as: a procedure which can be broken down into simple.
Multi-tape Turing Machines: Informal Description
The Turing Machine A definition of computability by Noah Richards.
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Turing Machines New capabilities: –infinite tape –can read OR write to tape –read/write head can move left and right q0q0 input tape.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free 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 ? ?
Turing Machines.
1 Computing Functions with Turing Machines. 2 A function Domain: Result Region: has:
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 ? ?
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Chapter 9 Turing Machine (TMs).
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.
Presented by Ravi Teja Pampana
Genetic Diagrams Noadswood Science, Genetic Diagrams To understand how to be able to construct genetic diagrams BBbb BBbb BbBbBbBbBbBbBbBb Sunday,
More Theory of Computing
Turing Machines A more powerful computation model than a PDA ?
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Machine level architecture Computer Architecture Basic units of a Simple Computer.
Turing Machines – Decidability Lecture 25 Section 3.1 Fri, Oct 19, 2007.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Models of Computation - Turing Machines Dale Roberts, Lecturer.
©Brooks/Cole, 2003 Chapter 17 Theory of Computation.
1 Design a PDA which accepts: L= { a n b m : n ≠ m }
Computer Theory Michael J. Watts
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 -
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Adding & Subtracting Decimals I will add and subtract decimals.
December 3, 2009Theory of Computation Lecture 21: Turing Machines III 1 Simulation of T in L Now the MIDDLE section of Q can be generated by replacing.
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 ? ?
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 Machine Model Are there computations that no “reasonable” computing machine can perform? –the machine should not store the answer to all possible.
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.
Turing Machines – Examples Lecture 24 Section 3.1 Wed, Oct 17, 2007.
Turing Theory. Turing Machine A Turing Machine denoted by TM, is a collection of six things. –An alphabet  of input letters –A TAPE divided into a sequence.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CSE202: Introduction to Formal Languages and Automata Theory
Busch Complexity Lectures: Turing Machines
Turing Machines Space bounds Reductions Complexity classes
CS21 Decidability and Tractability
COSC 3340: Introduction to Theory of Computation
Extensions and Restrictions of Turing Machines
Turing Machine
Computing Functions with Turing Machines
Theory of Computation Lecture 22: Turing Machines III
Turing Machines 2nd 2017 Lecture 9.
Chapter 9 TURING MACHINES.
Chapter 3: The CHURCH-Turing thesis
By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
Computing Functions with Turing Machines
The Off-Line Machine Input File read-only (once) Input string
Add or Subtract? x =.
P.V.G’s College of Engineering, Nashik
Chapter 17 Theory of Computation.
Homework Due Friday.
Adding and Subtracting
Homework Due Friday.
Formal Definitions for Turing Machines
Homework Due Friday.
Homework Due Friday.
Presentation transcript:

Turing Machine Read/Write – Move Left/Right BB Read/Write Head State Qi

State Diagram for Modulus 3 shows only the tape input Q0 Q1 Q2 Start Q3 Q4 B B B B,0,1

Turing Machine Program To Compute Values Modulus 3 State, Write, Direction State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3 Halt Halt Halt Q43,1,L3,1,L3,1,L

Modulus 3 53 % 3 BB State Q0 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L New State – Write B

Modulus 3 53 % 3 BBB10101 State Q1 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L

Modulus 3 53 % 3 BBBB0101 State Q0 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L Write B

Modulus 3 53 % 3 BBBBB101 State Q0 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L New State – Write B

Modulus 3 53 % 3 BBBBBB01 State Q1 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L New State – Write B

Modulus 3 53 % 3 BBBBBBB1 State Q2 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L Write B

Modulus 3 53 % 3 BBBBBBBB State Q2 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L New State – Write 0

Modulus 3 53 % 3 B0BBBBBB State Q4 State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L New State – Write 1

Modulus 3 53 % 3 B0BBBBB1 Q3 Halt State B 0 1 Q03,0,L,0,B,R1,B,R Q13,1,L2,B,R0,B,R Q24,0,L1,B,R2,B,R Q3Halt Halt Halt Q43,1,L3,1,L3,1,L

Turing Machine Program To Add Unary Numbers State, Write, Direction State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3 3,1,Halt Halt3,1,L

Adding Two Unary Numbers = 5 BB State Q0 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB State Q0 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB State Q0New State – Write B State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11B111 State Q1 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11B111 State Q1 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11B111 State Q1 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11B111 State Q1New State State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11B111 State Q2 New State – Write B State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11B11B State Q3 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11B11B State Q3 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Adding Two Unary numbers = 5 BB11111B Q3 HALT HALT – Write 1 State B 0 1 Q0Halt1,B,R0,1,R Q12,B,L Halt1,1,R Q2Halt Halt3,B,L Q3- 1,Halt Halt3,1,L

Turing Machine Program To Subtract Unary Numbers State, Write, Direction State B 0 1 Q01,B,L0,0,R0,1,R Q1 1,B,Halt 1,B,Halt2,B,L Q23,B,R 2,0,L2,1,L Q3 3,B,Halt 3,B,Halt0,B,R

Turing Machine with Halt State Program To Subtract Unary Numbers State, Write, Direction State B 0 1 Q01,B,L0,0,R0,1,R Q1 1,B,4 1,B,42,B,L Q23,B,R 2,0,L2,1,L Q33,B,4 3,B,40,B,R Q4 Halt Halt Halt

Subtracting Two Unary Numbers 5 − 2 = 3 BB State Q0 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB State Q0 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R...

Subtracting Two Unary Numbers 5 − 2 = 3 BB State Q1 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B State Q2 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B State Q2 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B State Q2 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R...

Subtracting Two Unary Numbers 5 − 2 = 3 BB B State Q3 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B B State Q0 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B B State Q0 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R...

Subtracting Two Unary Numbers 5 − 2 = 3 BB B B State Q1 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B 11 0B B State Q2 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B 11 0B B State Q2 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R...

Subtracting Two Unary Numbers 5 − 2 = 3 BB B 11 0B B State Q3 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B B1 0B B State Q0 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B B1 0B B State Q0 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 2,1,L Q3 3,B,Halt 3,B,Halt 0,B,R...

Subtracting Two Unary Numbers 5 − 2 = 3 BB B B1 0B B Q1 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 1,1,L Q3 3,B,Halt 3,B,Halt 0,B,R

Subtracting Two Unary Numbers 5 − 2 = 3 BB B B1 BB B Q1 HaltWrite Blank 1 1 State B 0 1 Q0 1,B,L 0,0,R 0,1,R Q1 1,B,Halt 1,B,Halt 2,B,L Q2 3,B,R 2,0,L 1,1,L Q3 3,B,Halt 3,B,Halt 0,B,R