Turing Machine
Turing Machine
Turing machine:
Turing Machine was invented by Alan Turing in 1936 and it is used to accept Recursive Enumerable
Languages (generated by Type-0 Grammar).
A Turing machine consists of a tape of infinite length on which read and writes operation can be
performed. The tape consists of infinite cells on which each cell either contains input symbol or a special
symbol called blank. It also consists of a head pointer which points to cell currently being read and it can
move in both directions.
It consists of 3 components
Input tape:
The tape is divided into number of cells each cell contains only one input symbol from input
alphabet. The un empty tape is filled with blank characters(B).
Read head:
It is used for communication between input tape ad control unit. In a single step tape head read a
symbol, replace w other symbol and position itself to move left or right ot no move.
Control unit:
It is used to determine reading from input tape or writing into the tape. It contains finite set of
states Q. the states are divided into
q0 on (0,1,R) means on reading zero change it to 1 and right move to one position.
q0 on (1,0,R) means on reading 1 change it to zero and right move to one position.
Transition table:
This is a kind of Turing machines that have one finite control and more than one
tapes each with its own read-write head. It is denoted by a 5-tuple < Q , , ,
q0 , > .
Here, more than one head and tape can be used with in a single tape and single control unit. There are n
heads, but in any state, only one head an move.
This is a TM that have one finite control and one tape which extends infinitely in both directions.
This modes does not provide any additional computational capabilities. This type of TM are as powerful
as one tape TM.
Nondeterministic Turing Machines:
It is similar to NFA. Nondeterministic Turing Machines allows more than an edge leaving from
any state with the same input alphabet.
Offline Tm:
It is special type of multi tape TM. The tape of this machine is read only. The tape consists of finite length
and marker $ on right and C on the Left. It cannot move outside position terminated by $.
Church’s Thesis:
The statement “All the functions which can be defined by human beings can be computed by TM”
was first formulated by Alan Turing and Alonzo church in 1936.
Hypothesis means proposing certain facts. The computation of recursive functions can be done by
following assumptions.
First we will prove certain problems which cannot be solved by using TM. It provides a general
principle for algorithm computation. Every partial recursive function is computable on TM.
Restricted Turing Machine (Counter Machine):
Counter machine is similar to multi stack TM, but the difference between them is that in place of
each stack there is a counter.
Counter holds non negative integers, but we can only distinguish between zero and non-zero counter. $
are used for end marks on the i/p, z0 is a non blank symbol on each tape.
M=(Q, Σ, δ, q0, F)
RE languages or type-0 languages are generated by type-0 grammars. An RE language can be accepted or
recognized by Turing machine which means it will enter into final state for the strings of language and
may or may not enter into rejecting state for the strings which are not part of the language. It means TM
can loop forever for the strings which are not a part of the language. RE languages are also called as
Turing recognizable languages.
A recursive language (subset of RE) can be decided by Turing machine which means it will
enter into final state for the strings of language and rejecting state for the strings which are
not part of the language. e.g.; L= {anbncn|n>=1} is recursive because we can construct a turing
machine which will move to final state if the string is of the form anbncn else move to non-
final state. So the TM will always halt in this case. REC languages are also called as Turing
decidable languages.
The model consists of an input output relation that the machine computes. The input is
given in binary form on the machine's tape, and the output consists of the contents of
the tape when the machine halts.
What determines how the contents of the tape change is a finite state machine (or
FSM, also called a finite automaton) inside the Turing Machine. The FSM is
determined by the number of states it has, and the transitions between them.
At every step, the current state and the character read on the tape determine the next
state the FSM will be in, the character that the machine will output on the tape
(possibly the one read, leaving the contents unchanged), and which direction the
head moves in, left or right.
The problem with Turing Machines is that a different one must be constructed
for every new computation to be performed, for every input output relation.
This is why we instroduce the notion of a universal turing machine (UTM), which
along with the input on the tape, takes in the description of a machine M. The UTM
can go on then to simulate M on the rest of the contents of the input tape. A universal
turing machine can thus simulate any other machine.