Lecture 23 (More undecidability), 4/17/06
Concepts, definitions (in italics):
1) If B is recognizable, so is A
2) If A is not recognizable, so is B
Each element of P is a TM description
P
is not trivial. That is, there exist TMs in P, and
there exist TMs not in P
(in other words, there exist M1, M2 such that M1ÎP, but M2ÏP)
Whenever L(M1) = L(M2) then either both Î P or neither Î P
(see another definition in problem 5.22)
Reading:
Skills:
Notes:
Some problem is (not) co-recognizable == its complement is (not) recognizable. If a problem A is not decidable, it is possible that A is co-recognizable, and that it is recognizable, but not both. Can use mapping reductions to prove (by contradiction) that something is not recognizable. A mapping reduction from L1 to L2 is the same as a mapping reduction from the complement of L1 to the complement of L2 Mapping reduction from ATM to EQTM to show that EQTM is not recognizable.
ATM Recognizer (M,w)
{
1) create M1, M2 as follows
M1(x) {
Reject x;
}
M2(X) {
Simulate M on w
If M accepts w, we accept x; otherwise, we do not
}
2) return EQTM -recognizer (M1,M2)
}
ATM recognizer should return
L(M1)
L(M2)
EQTM recognizer
M accepts w
Reject or loop
Ø
∑*
Reject or loop
M does not accept w
Accept
Ø
Ø
Accept
M1(X) {
Accept x;
}
M2(X) {
Simulate M on w
If M accepts w, we
accept X
}
2)
return
EQTM-recognizer (M1,M2)
}
|
|
ATM recognizer should return |
L(M1) |
L(M2) |
EQTM recognizer |
|
M accepts w |
Reject or Loop |
∑* |
∑* |
Reject or loop |
|
M does not accept w |
Accept |
∑* |
Ø |
Accept |
1) Suppose P is decidable, i.e. there exists a valid P-DECIDER algorithm.
2) Let M-empty be some TM that rejects everything (its language is empty).
case 1: If M-empty
is not in P, let M0 be some TM in P;
case 2: if M-empty is in P, let M0 be some TM not in P
(as P is non-trivial there must be one in either case).
3) Here is a valid reduction from ATM-DECIDER to P-DECIDER:
ATM-DECIDER(M,w)
{
1. Create M1 as followsM1(X) {
run M on w
if M accepts, run M0 on X
else reject (or loop)
}Here is a table for the case when M-empty is not in P; the table for the case when M-empty is in P will reverse accepts and rejects in the 4th column, but be the same otherwise.2. return P-DECIDER(M1) if M-empty is not in P,
or its negation if M-empty is in P
}
ATM decider
should returnL(M1)
P_decider (M1)
M accept w
Accept
same as L(M0)
Accept M1
(because it accepts M0, and L(M1) = L(M0))M not accept w
Reject
Ø,
same as L(Mempty)Reject M1
(because it rejects Mempty and L(M1) = L(Mempty))4) This is a valid mapping reduction from ATM to P. Since ATM is not decidable, so is P.
Big conclusion: there are many software tools that cannot be constructed perfectly -- they may be useful, but there is always some input (program) out there on which they will fail.