Professional Documents
Culture Documents
Lecture 11
Lecture 11
Lecture #10
Sarmad Abbasi
Virtual University
Theory of Computation
1 / 35
Theory of Computation
2 / 35
Let us define
ATM = {hM, wi : M is a TM that accepts w}.
This is called the acceptance problem for TMs or the halting problem.
We also call this the Halting Problem. We showed that this problem is
undecidable.
Theory of Computation
3 / 35
Theorem
ATM is not decidable.
The language ATM is undecidable. There is no TH H such that on input
hM, wi
1
H accepts if M accepts w.
Theory of Computation
4 / 35
On input hMi.
Theory of Computation
5 / 35
Theory of Computation
6 / 35
Russells Paradox
Question
Does the barber of Seville shaves himself.
Theory of Computation
7 / 35
Russells Paradox
Students are asked to make a list in which they can include the names
of anyone (including themselves) in a class room. Is there a particular
student wrote the names of those people in the class who did not
include their own names in their own list?
Question
Does that particular student write his/her own name on his/her list?
Theory of Computation
8 / 35
Russells Paradox
Question
Does F enumerate its own description?
Theory of Computation
9 / 35
Russells Paradox
D that accepts (the description of) those TMs that do not accept
their own description.
Barber who shaves all those people who do not shave themselves.
Student who lists all those students who do not list themselves.
Theory of Computation
10 / 35
Reducibility
Suppose u have a language B in your mind and you can prove that
If I can make a decider for B the I can make a decider for the halting
problem.
Theory of Computation
11 / 35
Reducibility
Now suppose some one claims that they have a decider for the
language B. Then I can claim that I have a decider for ATM . Which is
absurd.
From this we can conclude that B is also undecidable as we know that
ATM is undecidable.
Theory of Computation
12 / 35
Reducibility
Theorem
HALTTM is undecidable.
Theory of Computation
13 / 35
Reducibility
Theory of Computation
14 / 35
Reducibility
If R rejects, reject.
Theory of Computation
15 / 35
Theorem
ETM is undecidable.
Theory of Computation
16 / 35
Emptiness problem
Suppose that ETM is decidable and R decides ETM . R accepts hMi if the
language of M is empty. We can use R to make a decider S for ATM .
We know that ATM is undecidable. We have a contradiction and that is
why R cannot exist. How can we construct S?
Theory of Computation
17 / 35
Emptiness problem
S gets hM, wi as an input. The first idea is to run R on input hMi and
check if it accepts. If it does, we know that L(M) is empty and therefore
that M does not accept w. But, if R rejects we only know that the
language of R is not empty. We do not know anything about what it
does on w. So the idea does not work. We have to come up with
another idea.
Theory of Computation
18 / 35
Emptiness problem
On input x
If x 6= w, reject.
What is L(M1 )?
Theory of Computation
19 / 35
Emptiness problem
L(M1 ) =
,
if M does not accept w;
{w}, if M accepts w.
Theory of Computation
20 / 35
Emptiness problem
Construct M1
Run R on hM1 i
Theory of Computation
21 / 35
Emptiness problem
S is a decider for ATM . Since S does not exist we conclude that R does
not exist. So ETM is undecidable.
Theory of Computation
22 / 35
Theorem
REGTM is undecidable.
Theory of Computation
23 / 35
Theory of Computation
24 / 35
Theory of Computation
25 / 35
On input x
If x = 0n 1n then accept.
What is L(M2 )?
Theory of Computation
26 / 35
L(M2 ) =
Theory of Computation
27 / 35
Construct M2
Run R on hM2 i
Theory of Computation
28 / 35
S is a decider for ATM . Since S does not exist we conclude that R does
not exist. So REGTM is undecidable.
Theory of Computation
29 / 35
So far we have only used ATM to show that other problems are
undecidable. Let us do something different. Let us define:
EQTM = {hM1 , M2 i : L(M1 ) = L(M2 )}.
Theorem
EQTM is undecidable.
Theory of Computation
30 / 35
Theory of Computation
31 / 35
Theory of Computation
32 / 35
On input hMi
1
Run R on hM, M0 i
Theory of Computation
33 / 35
Theory of Computation
34 / 35
As you can see the input portion of the tape is the only tape that the
LBA is allowed to move its head on.
Theory of Computation
35 / 35