Chapter 6
Chapter 6
Turing Machine
Introduction
We have encountered some fundamental ideas, in particular
the concepts of regular and context-free languages and their
association with finite automata and pushdown accepters. Our
study has revealed that the regular languages form a proper
subset of the context-free languages, and therefore, that
pushdown automata are more powerful than finite automata.
We also saw that context-free languages, while fundamental
to the study of programming languages, are limited in scope.
Some simple languages such as {anbncn} and ww are not
context-free. This prompts us to look beyond context-free
Languages and investigate how one might define new
Language families that include these examples. To do so, we
return to the general picture of an automaton.
We can expect to discover even more powerful language
families if we give the automaton more flexible storage.
Chomsky Hierarchy
Cont’d…
Definition
This tap is divided into cells, each of which is capable of holding one symbol.
Associated with the tape is a read-write head that can travel right or left.
On the tape and that can read and write a single symbol on each move.
whatever input and output is necessary will be done on the machine's tape.
2. The Turing machine is deterministic in the sense that δ defines at most one
move for each configuration.
3. There is no special input file. We assume that at the initial time the tape
has some specified content. Some of this may be considered input.
Similarly, there is no special output device. Whenever the machine halts,
some or all of the contents of the tape may be viewed as output.
Cont’d…
Comparison with the previous
automaton:
Cont’d…
The Tape
Input String
Cont’d…
Halting
Cont’d...
Cont’d…
2. Turing Machines as Language Accepters
Turing machines can be viewed as accepter in the following
sense.
A string w is written on the tape, with blanks filling out the
unused portions. The machine is started in the initial state q0
with the read-write head positioned on the leftmost symbol of
w. If after a sequence of moves, the Turing machine enters a
final state and halts, then w is considered to be accepted.
Cont’d…
The definition tells us what must happen when w Є M(L) It says nothing
about the outcome for any other input. When w is not in L(M), One of two
things can happen: the machine can halt in a non final state or it can enter
an infinite loop and never halt. Any string for which M does not halt is by
definition not in L(M).
Cont’d…
Cont’d…
Example:- Design a Turing machine that accepts L= {anbncn :
n≥1}
Notice that even though {anbn} is a context-free language and
{anbncn} is not, they can be accepted by Turing machines with
very similar structures
Conclusion :- Turing machine can recognize some languages
that are not context-free, a first indication that Turing
machines are more powerful than pushdown automata.
Chapter 7: Computational complexity