1. 1
CHAPTER 1
INTRODUCTION
A Turing Machine is the mathematical tool equivalent to a digital computer. It was suggested
by the mathematician Turing in the 1930s, and has been since then the most widely used
model of computation in computability and complexity theory. According to Turing’s
hypothesis, a function is algorithmically computable if and only if it is computable by a
Turing machine .There are problems that cannot be solved by a Turing machine, thus, these
problems cannot be solved by a modern computer program[1]. The Turing machine is not
intended as practical computing technology, but rather as a hypothetical device representing a
computing machine. It helps computer scientists understand the limits of mechanical
computation.
1.1 HISTORICAL DEVELOPMENT
Robin Gandy, a student of Alan Turing and his lifelong traced the lineage of the notion of
"calculating machine"[2]. According to him the functions which can be calculated by the
arithmetic functions (+, - and x), sequence of operations and repetition of operations are
precisely those which are Turing computable.
With regards to Hilbert's problems posed by David Hilbert in 1900, an aspect of problem 10
had been floating about for almost 30 years before it was framed precisely. His tenth problem
was given a Diophantine equation with any number of unknown quantities and with rational
integral coefficients: To devise a process according to which it can be determined in a finite
number of operations whether the equation is solvable in rational integers. In 1937 Turing did
prove with his computational-machine model that the Hilbert’s problem can have no solution.
Therefore to show that there can be no general process for determining whether a given
formula U of the functional calculus K is provable, i.e. that there can be no machine which,
supplied with any one U of these formulae, will eventually say whether U is provable. later
he proved that a function is effectively calculable if its values can be found by some purely
mechanical process.
In the early to mid-1950s Hao Wang and Marvin Minsky reduced the Turing machine to a
simpler form; simultaneously European researchers were reducing the new-fangled electronic
computer to a computer-like theoretical object equivalent to what was now being called a
2. 2
"Turing machine". In the late 1950s and early 1960s, the coincidentally parallel developments
of Melzak and Lambek, and Shepherdson and Sturgis carried the European work further and
reduced the Turing machine to a more friendly, computer-like abstract model called the
counter machine; later between 1960s this work was carried even further with the register
machine and random access machine models—but basically all are just multi-tape Turing
machines with an arithmetic-like instruction set.
1.2 PRESENT SCENARIO
Today, the counter, register and random-access machines and their sire the Turing machine
continue to be the models of choice for theorists investigating questions in the theory of
computation. In particular, computational complexity theory makes use of the Turing
machine. Depending on the objects one likes to manipulate in the computations, two models
have obtained a dominant position in machine-based complexity theory: the off-line
multitape Turing machine which represents the standard model for string-oriented
computation, and the RAM model Only in the related area of analysis of algorithms this role
is taken over by the RAM model.
3. 3
CHAPTER 2
GENERAL MODEL
A Turing machine is a hypothetical device that manipulates symbols on a strip of tape
according to a table of rules. Despite its simplicity, a Turing machine can be adapted to
simulate the logic of any computer algorithm, and is particularly useful in explaining the
functions of a CPU inside a computer.
2.1 OVERVIEW
The Turing machine mathematically models a machine that mechanically operates on a tape
as shown in fig1. On this tape are symbols, which the machine can read and write, one at a
time, using a tape head. Operation is fully determined by a finite set of elementary
instructions such as "in state q0, if the symbol seen is 0, write a 1; if the symbol seen is 1,
change into state q2; in state q3, if the symbol seen is 0, write a 1 and change to state q5;" etc.
The machine consists of an infinite length tape consisting of cells. Each cell consists of
symbols for a finite alphabet. The empty cells are assumed to be filled with blank symbols .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 .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.
A finite table of instructions that, given the state the machine is currently in and the symbol it
is reading on the tape tells the machine to do the following in sequence: Either erases or
writes a symbol, move the head, assume the same or a new state as prescribed[].
Fig1: Turing Machine
4. 4
The operation of a Turing machine proceeds as follows:
The Turing machine reads the tape symbol that is under the tape head. This symbol is
referred to as the current symbol. Then it uses its transition function to map the current state
and current symbol to the following: the next state, the next symbol and the movement for the
tape head. If the transition function is not defined for the current state and current symbol,
then the machine crashes otherwise the Turing machine changes its state to the next state,
which was returned by the transition function. Next the machine overwrites the current
symbol on the tape with the next symbol, which was returned by the transition function.
Then the Turing machine moves its tape head one symbol to the left or to the right, or does
not move the tape head, depending on the value of the 'movement' that is returned by the
transition function. If the Turing machine's state is a halt state, then the Turing machine halts.
Otherwise, repeat the operation again.
2.2 MATHEMETICAL REPRESENTATION
A Turing machine is a septuple
M= (Q, Γ, b, Σ, δ,q0 ,F) ……………………………………………………………....(1)
Where
Q is a finite & non empty set of states,
Γ is a finite, non-empty set of the tape alphabet/symbols,
b ∈ Γ is the blank symbol,
∑ ⊆ Γ is input alphabet,
δ :Q×T→Q×T×{L,R} is a transition function ,the value of δ(q, X) is either undefined
or a triple consisting of new state ,replacement symbol and direction of head motion,
q0 ∈ Q is start state and F ⊆ Q is set of accepting states[3][4].
Anything that operates according to these specifications is a Turing machine. One move in
Turing machine does the following:
δ (q, X)=(p, Y ,D)………………………………………………………………………..(2)
Where q is current state
X is current symbol on tape pointed by tape head.
After the move, X is replaced with symbol Y. If D=“L”, the tape head moves “left” by one
position. Alternatively, D=“R” the tape head moves “right” by one position.
2.3 STATE DIAGRAM
5. 5
Instruction set can also be expressed using a State Transition Diagram.
In a state transition diagram circle represents a state, arrows represent state transitions, Each
arrow also represents one instruction. Arrow is also labelled with: current symbol, new
symbol and direction.
EXAMPLE:
Here is a Turing machine that checks its third symbol is 0, accept is so and otherwise runs
forever.
M=({p ,q ,r ,s ,t},{0,1,},{0,1,B}, p, B,{s})
δ (p, X) = (q, X, R) for X=0,1
δ (q, X) = (r, X ,R) for X=0,1
δ (r,0) = (s,0,L)
δ (r,1) = (t,1,R)
δ (t ,X) = (t ,X,R) for X=0,1,B
State diagram of above example is shown in fig2.
Fig2: state diagram
6. 6
CHAPTER: 3
GENERAL TYPES
There are a number of other types of Turing machines in addition to the one we have seen
such as Turing machines with multiple tapes, ones having one tape but with multiple heads,
ones with two dimensional tapes, nondeterministic Turing machines etc. It turns out that
computationally all these Turing machines are equally powerful. That is, what one type can
compute any other can also compute[2]. However, the efficiency of computation, that is, how
fast they can compute, may vary.
3.1 MULTAPE TURING MACHINE
A Multi-tape Turing machine is like an ordinary Turing machine with several tapes. Each
tape has its own head for reading and writing. Initially the input appears on tape 1,and the
others start out blank .This model intuitively seems much more powerful than the single-tape
model, but any multi-tape machine, no matter how large the k, can be simulated by a single-
tape machine using only quadratically more computation time. Thus, multi-tape machines
cannot calculate any more functions than single-tape machines, and none of the robust
complexity classes (such as polynomial time) are affected by a change between single-tape
and multi-tape machines.
3.2 DETERMINISTIC & NON-DETERMINISTIC
In a deterministic Turing machine, the set of rules prescribes at most one action to be
performed for any given situation. A NTM, by contrast, may have a set of rules that
prescribes more than one action for a given situation. For example, a non-deterministic
Turing machine may have both "If you are in state 2 and you see an 'A', change it to a 'B' and
move left" and "If you are in state 2 and you see an 'A', change it to a 'C' and move right" in
its rule set.
An ordinary DTM has a transition function that, for a given state and symbol under the tape
head, specifies three things: the symbol to be written to the tape, the direction (left or right) in
which the head should move, and the subsequent state of the finite control. For example, an X
on the tape in state 3 might make the DTM write a Y on the tape, move the head one position
to the right, and switch to state 5.A NTM differs in that the state and tape symbol no longer
7. 7
uniquely specify these things; rather, many different actions may apply for the same
combination of state and symbol. For example, an X on the tape in state 3 might now allow
the NTM to write a Y, move right, and switch to state 5 or to write an X, move left, and stay
in state 3. How does the NTM "know" which of these actions it should take? There are two
ways of looking at it. One is to say that the machine is the "luckiest possible guesser"; it
always picks the transition that eventually leads to an accepting state, if there is such a
transition. The other is to imagine that the machine "branches" into many copies, each of
which follows one of the possible transitions. Whereas a DTM has a single "computation
path" that it follows, an NTM has a "computation tree". If at least one branch of the tree halts
with an "accept" condition, we say that the NTM accepts the input[5].
3.3 REGISTER MACHINE MODELS
The register machine gets its name from its use of one or more registers. In contrast to the
tape and head used by a Turing machine, the model uses multiple, uniquely addressed
registers, each of which holds a single positive integer[6].
3.3.1 COUNTER MACHINE
A counter machine is an abstract machine used in formal logic and theoretical computer
science to model computation. It is the most primitive of the four types of register machines.
A counter machine comprises a set of one or more unbounded registers, each of which can
hold a single non-negative integer, and a list of (usually sequential) arithmetic and control
instructions for the machine to follow.
3.3.2 RANDAM ACCESS MACHINE
There are a couple serious defects in his register machine model: (i) Without a form of
indirect addressing it is not possible to easily show the model is Turing equivalent, (ii) The
program and registers were in different spaces, so self-modifying programs would not be
easy. When indirect addressing was added to his model a random access machine model was
created. Unlike the RASP model, the RAM model does not allow the machine's actions to
modify its instructions. Sometimes the model works only register-to-register with no
accumulator, but most models seem to include an accumulator.
8. 8
3.3.3 RANDAM ACCESS STORED PROGRAM MODEL
The RASP is a RAM with the instructions stored together with their data in the same space
i.e. sequence of registers. It had a "mill" - an accumulator, but now the instructions were in
the registers with the data so-called von Neumann architecture. When the RASP has
alternating even and odd registers the even holding the "operation code" (instruction) and the
odd holding its "operand" (parameter), then indirect addressing is achieved by simply
modifying an instruction's operand. The RASP models allow indirect as well as direct-
addressing; some allow "immediate" instructions too, e.g. "Load accumulator with the
constant 3".
3.3.4 POINTER MACHINE
It is a blend of counter machine and RAM models. Less common and more abstract than
either model. Instructions are in the finite state machine in the manner of the Harvard
architecture.
3.4 UNIVERSAL TURING MACHINE
UTM is a Turing machine that can simulate an arbitrary Turing machine on arbitrary input. It
achieves this by reading both the description of the machine to be simulated as well as the
input thereof from its own tape. it is considered to be the origin of stored program computer.
Every Turing machine computes a certain fixed partial computable function from the input
strings over its alphabet. In that sense it behaves like a computer with a fixed program.
However, we can encode the action table of any Turing machine in a string. Thus we can
construct a Turing machine that expects on its tape a string describing an action table
followed by a string describing the input tape, and computes the tape that the encoded Turing
machine would have computed[7].
9. 9
CHAPTER 4
CONCLUSION
The Turing Machine is the most comprehensive, deep, and accessible model of computation
extant, and its associated theories allow many ideas involving "complexity" to be profitably
discussed. In providing a sort of atomic structure for the concept of computation, it has led to
new mathematical investigations. One development of the last 30 years , is that of classifying
different problems in terms of their complexity. It gives a platform-independent way of
measuring this complexity. Nowadays computer can be used to simulate the working of a
Turing machine, and so see on the screen. It can have various applications such as
enumerator, function computer. Universal Turing Machine can be used to simulate all type of
other turing machines.
10. 10
REFERENCE
1. Introduction to Turing Machines, B2B integration solutions from unidex,
https://www.unidex.com/turing/tm_intro.htm (as on august-19-2013)
2. Wikipedia, turing machine, ,
https://en.wikipedia.org/wiki/Turing_machine (as on august-19-2013)
3.Ananth Kalyanaraman, turing machine, lecture notes, cpt s 317, school of eecs Washington,
state university, http://www.eecs.wsu.edu/~ananth/CptS317/Lectures/TuringMachines.pdf(as
on august-19-2013)
4. Tim Sheard, CS581 Theory of Computation, Portland state university,
,http://web.cecs.pdx.edu/~sheard/course/CS311/Fall2012/ppt/TuringMachines.pdf(as on
august-19-2013)
5. http://en.wikipedia.org/wiki/Non-deterministic_Turing_machine (as on august-19-2013))
6. internet,http://www.cs.odu.edu/~toida/nerzic/390teched/tm/othertms.html(as on august-20-
2013)
7. Manolis Kamvysselis, universal turing machine,,
https://web.mit.edu/manoli/turing/www/turing.html (as on august-19-2013)
8. John C. Martin, Introduction to languages and theory of computation, 2nd
edition, TMH.