This document provides an overview of the Turing machine. It describes the Turing machine as an abstract computational model invented by Alan Turing in 1936. A Turing machine consists of an infinite tape divided into cells, a tape head that reads and writes symbols on the tape, and a state table that governs the machine's behavior. The document then explains the formal definition of a Turing machine, provides an example of how it works, discusses properties like decidability and recognizability, and covers modifications like multi-tape and non-deterministic Turing machines. It concludes by discussing the halting problem and explaining how Turing machines demonstrate the power and applications of computational theory.
2. CONTENTS
1. INTRODUCTION
2. TM MODEL
3. FORMAL DEFINITION
4. WORKING WITH EXAMPLE
5. PROPERTIES
6. MODIFICATIONS
7. THE HALTING PROBLEM
8. ADVANTAGES
9. POWER OF TM
10. APPLICATION
3. INTRODUCTION
Invented by esteemed computer scientist ALAN
TURING in 1936
Basically an abstract computational model that
performs computations
Provide a powerful computational model for solving
problems in computer science
Capable of simulating common computers
4. WHAT IS TURING MACHINE ?
Consists of an infinite tape (as the memory)
A tape head (a pointer to the currently inspected
cell of the memory)
And a state transition table(to govern the behavior
of the machine)
5.
6. FORMAL DEFINITION
A TM is a seven-tuple:
M = (Q, Σ, Γ, δ, q0, B, F)
Q A finite set of states
Σ A finite input alphabet set
Γ A finite tape alphabet
B A distinguished blank symbol, which is in Γ
q0 The initial/starting state, q0 is in Q
F A set of final/accepting states, which is a subset of Q
δ A next-move function, which is a mapping
Q x Γ –> Q x Γ x {L,R}
Intuitively, δ(q,s) specifies the next state, symbol to be written,
and the direction of tape head movement by M after reading
symbol s while in state q.
7. WORKING
The machine operates on an infinite memory tape
divided into discrete cells. The machine positions
its head over a cell and reads the symbol there.
Then, as per the symbol and its present place in
user specified instructions , the machine
1. Writes a symbol in the cell, then
2. Either moves the tape one cell right or left
3. Either proceeds to a subsequent instruction or
halts the computation
8. EXAMPLE : TM THAT CHECKS FOR STRING
TO BE PALINDROME
9. PROPERTIES OF TM
Recognizability : A language is recognizable if a TM
accepts when an input string is in the language,
and either rejects or loops forever when an input
string is not in the language.
Decidability : A language is decidable if a TM
accepts strings that are in the language and rejects
that are not in the language. That is, TM will halt on
all inputs.
The Halting Problem is recognizable but
undecidable.
10. MODIFICATIONS IN TM
Multi– tape TM
Multi –track TM
Non– deterministic TM
TM with semi—infinite tape
These all give same performance as the
standard TM gives.
11. MULTI-TAPE TM
δ: Q × Xk→ Q × (X × {Left_shift, Right_shift, No_shift })k
where there is k number of tapes
12. MULTI-TRACK TM
Multi-track Turing machines, a specific type of Multi-
tape Turing machine, contain multiple tracks but
just one tape head reads and writes on all tracks.
Here, a single tape head reads n symbols
from n tracks at one step.
δ is a relation on states and symbols where
δ(Qi, [a1, a2, a3,....]) = (Qj, [b1, b2, b3,....], Left_shift
or Right_shift)
13. NON-DETERMINISTIC TM
In a Non-Deterministic Turing Machine, for every
state and symbol, there are a group of actions the
TM can have. So, here the transitions are not
deterministic.
The computation of a non-deterministic Turing
Machine is a tree of configurations that can be
reached from the start configuration.
An input is accepted if there is at least one node of
the tree which is an accept configuration, otherwise
it is not accepted.
δ is a transition function :
δ : Q × X → P(Q × X × {Left_shift, Right_shift}).
14. TM WITH SEMI-INFINITE TAPE
A Turing Machine with a semi-infinite tape has a left
end but no right end. The left end is limited with an
end marker.
15. THE HALTING PROBLEM
Input − A Turing machine and an input string w.
Problem − Does the Turing machine finish
computing of the string w in a finite number of
steps? The answer must be either yes or no.
Proof − At first, we will assume that such a Turing
machine exists to solve this problem and then we
will show it is contradicting itself. We will call this
Turing machine as a Halting machine that
produces a ‘yes’ or ‘no’ in a finite amount of time. If
the halting machine finishes in a finite amount of
time, the output comes as ‘yes’, otherwise as ‘no’.
The following is the block diagram of a Halting
machine −
17. INVERTED HALTING MACHINE
Now we will design an inverted halting machine
(HM) as −
If H returns YES, then loop forever.
If H returns NO, then halt.
Further, a machine (HM)2 which input itself is
constructed as follows −
If (HM)2 halts on input, loop forever.
Else, halt.
Here, we have got a contradiction. Hence, the
halting problem is undecidable.
18. THE FOLLOWING IS THE BLOCK DIAGRAM OF AN
‘INVERTED HALTING MACHINE’ −
19. ADVANTAGES
Turing machines are similar to finite automata/finite state
machines but have the advantage of unlimited memory.
They are capable of simulating common computers; a
problem that a common computer can solve (given
enough memory) will also be solvable using a Turing
machine, and vice versa.
Simplicity of proofs
As a theoretic model, Turing machines have the charme
of being "simple" in the sense that the current machine
state has only constant size. All the information you
need in order to determine the next machine state
is one symbol and one (control) state number. The
change to the machine state is equally small, adding
only the movement of the machine head.
20. ADVANTAGES
If you're designing some kind of programming
language (or anything else that is meant to
compute things), then you may want to ensure that
it is Turing-complete (i.e., capable of computing
anything that is computable) by implementing a
Turing machine in it.
Classify Problem TM helps to classify decidable
problems into classes of Polynomial Hierarchy.
Suppose we found that the problem is decidable.
Then our target become how efficiently we can
solve it. The efficiency been calculated in number of
steps, extra space used , length of the code/size of
the FSM.
21. TM: INFINITE OR JUST UNLIMITED
At this point we could fall to arguing the
impossibility of the Turing machine because its tape
can’t be infinitely long.
The machine doesn't, in fact, need an infinite tape,
just one that isn't limited in length and this is a
subtle difference.
Imagine if you will that Turing machines are
produced with a very long but finite tape and if the
machine ever runs out of space you can just order
some more tape. This is the difference between the
tape actually being infinitely long or just unlimited…
22. TURING MACHINE: FEEBLE OR POWERFUL
You may think that TM is not really of any importance
because it is a very feeble machine but it can’t be
dismissed like this because Alan Turing thought up the
machine as a model for computation that could be
performed by human easily.
So ,TM is the simplest implementation of computing
and informally we can say that if something can be
computed then it can be done using a TM.
That is, TM is about what can be computed in principle
It actually defines computing, computation and what is
Computable
Compare this aspect with the RAM model (when not used in its
minimalistic form): the next operation may be any of several
operations, which may access any (two) registers. There are also
multiple control structures.
23. APPLICATION
The Church-Turing thesis claims that any computable
problem can be computed by a Turing machine. This means
that a computer more powerful than a Turing machine is not
necessary to solve computable problems. The idea of Turing
completeness is closely related to this. A system is Turing
complete if it can compute every Turing computable function.
A programming language that is Turing complete is
theoretically capable of expressing all tasks accomplishable
by computers; nearly all programming languages are Turing
complete.
To prove that something is Turing complete, it is sufficient to
show that it can simulate some other Turing complete system.
Usually, it is easiest to show that a system can simulate
auniversal Turing machine. A universal Turing machine is a
Turing machine that can simulate any other Turing machine.
24. CONCLUSION
You could say that the computer was invented twice
– once by Charles Babbage and once by Alan
Turing.
While Babbage’s machine was a practical thing but
Turing’s was just a machine of mind.
TM is a model of what is physically computable.
TM might take a little longer to work out on a
problem than the latest PC , but it will give the
same result.
If you have a system that can compute something
then a TM can compute it as well.
What is more so far no system has been found that
can goes beyond a TM.