3. TURING MACHINE
Introduced by Alan Turing in 1936.
A simple mathematical model of a computer.
Models the computing capability of computer.
A Turing machine (TM) is a finite-state machine with an infinite
tape and a tape head that can read or write one tape cell and move
left or right.
It normally accepts the input string, or completes its
computation, by entering a final or accepting state.
Tape is use for input and working storage.
4. Turing machine consists of:
• A tape divided into cells, one next to the other. Each cell contains a
symbol from some finite alphabet. The alphabet contains a
special blank symbol (here written as '0') and one or more other
symbols. The tape is assumed to be arbitrarily extendable to the left
and to the right, i.e., the Turing machine is always supplied with as
much tape as it needs for its computation. Cells that have not been
written before are assumed to be filled with the blank symbol. In
some models the tape has a left end marked with a special symbol;
the tape extends or is indefinitely extensible to the right.
5. • A head that can read and write symbols on the tape and
move the tape left and right one (and only one) cell at a
time. In some models the head moves and the tape is
stationary.
• A state register that stores the state of the Turing machine,
one of finitely many. Among these is the special start
state with which the state register is initialized. These
states, writes Turing, replace the "state of mind" a person
performing computations would ordinarily be in.
6. • A finite table of instructions that, given the state(qi) the
machine is currently in and the symbol(aj) it is reading on
the tape (symbol currently under the head), tells the
machine to do the following in sequence (for the 5-tuple
models):
oEither erase or write a symbol (replacing aj with aj1).
oMove the head (which is described by dk and can have
values: 'L' for one step left or 'R' for one step right or 'N'
for staying in the same place).
oAssume the same or a new state as prescribed (go to state
qi1).
7. Formal Definition of a TM
1. Q - the set of states.
2. - the input alphabet.
3. - the tape alphabet
4. :QQ{L,R} - the transition
function.
5. q0 - the start state.
6. qacceptQ - the accept state.
7. qrejectQ - the reject state.
9. Multi-tape Turing Machines:-
• A multitape Turing machine is like an ordinary TM but it has
several tapes instead of one tape.
• Initially the input starts on tape 1 and the other tapes are blank.
• The transition function is changed to allow for reading, writing,
and moving the heads on all the tapes simultaneously.
▫ This means we could read on multiples tape and move in
different directions on each tape as well as write a different
symbol on each tape, all in one move.
10. Multi-Tape Turing Machines:-
a a b a b b _ . . .
b b b b b _ _ . . .
b a a b a _ _ . . .
The input is written on the first
tape
11. Multi-Tape Turing Machines:-
1. Q - the set of states.
2. - the input alphabet.
3. - the tape alphabet
4. :QkQ({L,R})k - the transition
function, where k (the number of tapes) is
some constant.
5. q0 - the start state.
6. qacceptQ - the accept state.
7. qrejectQ - the reject state.