Академический Документы
Профессиональный Документы
Культура Документы
Jagadeesan
Unit V
Undecidability
Basic Definition
Recursive Language
Yes
No
Yes
Infinite loop
Basic Definition
Decidability
Example :
Basic Definition
Undecidability
A
Example :
Union
Complement
L
Proof :
Let L be a recursive language. Then there exists a TM M that halts on every
string on L.
L = * - L
Since L is recursive there is an algorithm (TM M) to accept L. Now construct
an algorithm (TM M) for L is as follows.
Yes
Yes
No
No
If M halts without accepting the string, then M halts accepting that string
and if M halts on accepting it, M enters into the final state without
accepting it.
Clearly L(M) is the complement of L and thus L is a recursive language.
Proof :
Let L1 and L2 be recursive languages accepted by the TMs M1 and M2
respectively.
Construct a new TM M which first simulates M1. If M1 accepts, then M
accepts. If M1 reject, the simulates M2 and accepts if and only if M2
accepts.
Thus M has both accepting and rejecting criterion. So, M accepts L1 U L2.
recursive
Yes
M1w
No
M2
recursive
Yes
Yes
recursive
No
Proof :
Let L1 and L2 be recursively enumerable languages accepted by the TMs
M1 and M2 respectively.
Construct a new TM M which simultaneously simulates M 1 and M2 on
different tapes.
If M1 or M2 accepts, the M accepts.
recursively enumerable
w
M1
Yes
Yes
M2
Yes
recursively enumerable
Recursive enumerable
Proof :
Let M1 and M2 be the TMs designed for the languages L and L
respectively.
Construct a new TM M which simulates M1 and M2 simultaneously.
If M accepts w if M1 accepts w, M rejects w if M2 accepts w.
w
M1
M
Yes
Yes
Recursive
M2
Yes
No
Proof :
Let M1 and M2 be the TMs designed for the languages L and L
respectively.
Construct a new TM M which simulates M1 and M2 simultaneously.
If M accepts w if M1 accepts w, M rejects w if M2 accepts w.
w
M1
M
Yes
Yes
Recursive
M2
Yes
No
Rices Theorem
Theorem :
Every non-trivial property of RE language is undecidable.
Proof :
Let p be any non-trivial property of RE languages.
Initially assume that is not in p p [L(M), if M does not accept w]. As
p is the non-trivial, there should be some language L having property p
(ie. L=Lp). Here M be a TM ML accepting L.
Let us reduce a universal language Lu to Lp and as Lu is undecidable Lp is
also undecidable.
Turing Machine M can be produced on reduction.
For the reduction algorithm the pair <M,w> can be given as input.
Basically M is a two tape TM such that
One tape is used to simulate TM M for input w. Then input <M,w> is used for
designing the transitions of M.
The Second tape is used to simulate TM ML on input x. Again a pair <M,x> is
used to build the transitions of M.
Rices Theorem
The TM M does the following things :
1. The TM M is simulated for the input w. Then TM M acts as a UTM by
accepting the pair <M,w>.
2. There exists two cases either M accepts w or M does not accept w.
M ignores its input and simulates M on w, if M does not accept w, then M does
not accept x.
If M accepts w, then M simulates ML on x, accepting x iff ML accepts x.
Thus M either accepts or L depending on M.
w
input
x
input
Accept
ML
Accept
Accept
Halting Problem
Input
: <M,w>
Problem : Does M halt on w?
Theorem :
The halting problem is undecidable.
Proof :
Assume for contradiction that halting problem is decidable. Then there is
a TM T that solves the halting problem. i.e. given a description of a TM
M (over the alphabet ) and a string w, TM T writes Yes if M halts on w
and No if M does not halt on w, and then T halts.
Classes P and NP
Class P
P
Class P Problem
A
Classes P and NP
Class NP
NP
Classes NP Problem
A