Lecture 15-16
Lecture 15-16
(CS F351)
BITS Dr. Raghunath
CS&IS Dept.
Pilani
Hyderabad Campus
It has a tape head that can read and write symbols and move
around the tape.
Turing Machines
How it is different from finite automata
The read-write head can move both to the left and to the right
Suppose
If then is taken to be .
If , then there is no next ID.
If then new ID will be
Suppose
Language accepted by a TM
We say that an ID yields ID in one move, we write .
Initially, the input appears on the first tape, and the other
tapes are blank.
Multi-tape Turing machine
TM to accept
Solution:
Idea:
Multi-tape Turing machine
TM to find the sum of two binary numbers.
Source: https://www.ccs.neu.edu/home/vkp/390-fl07/TM-Variants.pdf
Multi-tape TM vs Single-tape TM
Theorem: For every -tape TM, there is an equivalent (single-tape) TM.
Proof:
To simulate a single move, scans its tape from the first to the st in order to
determine the symbols under the virtual head.
Then makes a second pass to update the tapes according to the way
that ’s transition function indicates.
If at any point moves one of the virtual heads to the right onto athis action
signifies that has moved the corresponding head on the previously unread
blank portion of that tape. So writes a blank symbol on this tape cell and
shifts the tape contents, from this cell until the rightmost , one unit to the
right. Then it continues the simulation as before.
Non-deterministic Turing Machine
Transition function:
2. Use tape 2 to simulate N on the computation path from the root to the
node represented by the address on tape 3.
• This is done one step at a time by consulting by consulting the next
symbol to the right on the tape 3 after each simulated transition.
• If no more symbols remain on tape 3 or if this nondeterministic choice
is invalid, abort this branch by going to step 4.
4. Replace the string on tape 3 by the next string in the string ordering. Go to
step 1. ‘’
Thank you