Module 7 Automata
Module 7 Automata
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 relationship between RE
and REC languages can be shown in Figure 1.
UNSOLVABLE PROBLEM
For an undecidable language, there is no Turing Machine which accepts the
language and makes a decision for every input string w (TM can make
decision for some input string though). A decision problem P is called
“undecidable” if the language L of all yes instances to P is not decidable.
Undecidable languages are not recursive languages, but sometimes, they
may be recursively enumerable languages.
Example
The halting problem of Turing machine
Language Decidability
A language is called Decidable or Recursive if there is a Turing machine
which accepts and halts on every input string w. Every decidable language
is Turing-Acceptable.
For a decidable language, for each input string, the TM halts either at the
accept or the reject state as depicted in the following diagram −
Turing Machine Halting Problem
Input − A Turing machine and an input string w.
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 −
Theorem
Property 1 − If M1 and M2 find out the same language, then either <M1> <M2> ∈ L or <M1>
<M2> ∉ L
Property 2 − For some M1 and M2 like that <M1> ∈ L and <M2> ∉ L
Proof −
If X accepts w, then
L(W) = L(X2) and <W> ∉ P
PP Problems
As the name says these problems can be solved in polynomial time,
i.e.; O(n)O(n), O(n2)O(n2) or O(nk)O(nk), where kk is a constant.
NPNP Problems
Some think NPNP as Non-Polynomial. But actually it is Non-deterministic
Polynomial time. i.e.; “yes/no” instances of these problems can be solved in
polynomial time by a non-deterministic Turing machine and hence can take up
to exponential time (some problems can be solved in sub-exponential but
super polynomial time) by a deterministic Turing machine. In other words
these problems can be verified (if a solution is given, say if it is correct or
wrong) in polynomial time by a deterministic Turing machine (or equivalently
our computer). Examples include all P problems. One example of a problem
not in PP but in NPNP is Integer Factorization.