Professional Documents
Culture Documents
C OMPUTATION
P OST C ORRESPONDENCE P ROBLEM
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
P ROOF
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
P ROOF
For any w define M1 as
M1 = On input x:
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
P ROOF
For any w define M1 as
M1 = On input x:
1 If x 6= w, reject.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
P ROOF
For any w define M1 as
M1 = On input x:
1 6 w, reject.
If x =
2 If x = w, run M on input w and accept if M does.
T HEOREM 5.2
ETM = {hMi | M is a TM and L(M) = } is undecidable.
P ROOF
For any w define M1 as
M1 = On input x:
1 6 w, reject.
If x =
2 If x = w, run M on input w and accept if M does.
Note that M1 either accepts w only or nothing!
P ROOF CONTINUED
P ROOF CONTINUED
Assume R decides ETM
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
1 Use hM, wi to construct M1 above.
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
1 Use hM, wi to construct M1 above.
2 Run R on input hM1 i
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
1 Use hM, wi to construct M1 above.
2 Run R on input hM1 i
3 If R accepts, reject, if R rejects, accept.
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
1 Use hM, wi to construct M1 above.
2 Run R on input hM1 i
3 If R accepts, reject, if R rejects, accept.
So, if R decides L(M1 ) is empty,
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
1 Use hM, wi to construct M1 above.
2 Run R on input hM1 i
3 If R accepts, reject, if R rejects, accept.
So, if R decides L(M1 ) is empty,
then M does NOT accept w,
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
1 Use hM, wi to construct M1 above.
2 Run R on input hM1 i
3 If R accepts, reject, if R rejects, accept.
So, if R decides L(M1 ) is empty,
then M does NOT accept w,
else M accepts w.
P ROOF CONTINUED
Assume R decides ETM
S defines below uses R to decide on ATM
S = On input hM, wi
1 Use hM, wi to construct M1 above.
2 Run R on input hM1 i
3 If R accepts, reject, if R rejects, accept.
So, if R decides L(M1 ) is empty,
then M does NOT accept w,
else M accepts w.
If R decides ETM then S decides ATM Contradiction.
L EMMA
Let M be a LBA with q states, g symbols in the tape alphabet. There are
exactly qng n distinct configurations for a tape of length n.
L EMMA
Let M be a LBA with q states, g symbols in the tape alphabet. There are
exactly qng n distinct configurations for a tape of length n.
P ROOF .
L EMMA
Let M be a LBA with q states, g symbols in the tape alphabet. There are
exactly qng n distinct configurations for a tape of length n.
P ROOF .
The machine can be in one of q states.
L EMMA
Let M be a LBA with q states, g symbols in the tape alphabet. There are
exactly qng n distinct configurations for a tape of length n.
P ROOF .
The machine can be in one of q states.
The head can be on one of the n cells.
L EMMA
Let M be a LBA with q states, g symbols in the tape alphabet. There are
exactly qng n distinct configurations for a tape of length n.
P ROOF .
The machine can be in one of q states.
The head can be on one of the n cells.
At most g n distinct strings can occur on the tape.
L EMMA
Let M be a LBA with q states, g symbols in the tape alphabet. There are
exactly qng n distinct configurations for a tape of length n.
P ROOF .
The machine can be in one of q states.
The head can be on one of the n cells.
At most g n distinct strings can occur on the tape.
T HEOREM 5.9
ALBA = {hM, wi | M is an LBA that accepts string w} is decidable.
( Lecture 17) Slides for 15-453 Spring 2011 8 / 28
C OMPUTATION OVER C OMPUTATION H ISTORIES
Now for a really wild and crazy idea!
A match is a list of these dominos so that when concatenated the top and
the bottom strings are identical. For example,
a b ca a abc abcaaabc
=
ab ca a ab c abcaaabc
A match is a list of these dominos so that when concatenated the top and
the bottom strings are identical. For example,
a b ca a abc abcaaabc
=
ab ca a ab c abcaaabc
abc ca acc
The set of dominos ab , a , ba , does not have a solution.
M ATCH
Given a PCP instance P, a match is a nonempty sequence
i1 , i2 , . . . , i`
Q UESTION :
Does a given PCP instance P have a match?
Q UESTION :
Does a given PCP instance P have a match?
L ANGUAGE FORMULATION :
PCP = {hPi | P is a PCP instance and it has a match}
Q UESTION :
Does a given PCP instance P have a match?
L ANGUAGE FORMULATION :
PCP = {hPi | P is a PCP instance and it has a match}
T HEOREM 5.15
PCP is undecidable.
Q UESTION :
Does a given PCP instance P have a match?
L ANGUAGE FORMULATION :
PCP = {hPi | P is a PCP instance and it has a match}
T HEOREM 5.15
PCP is undecidable.
Proof: By reduction using computation histories. If PCP is decidable then so
is ATM . That is, if PCP has a match, then M accepts w.
For input hM, wi of ATM , construct an MPCP instance such that M accepts w
iff P 0 has a match starting with domino 1
For input hM, wi of ATM , construct an MPCP instance such that M accepts w
iff P 0 has a match starting with domino 1
The first part of the proof proceeds in 7 stages where we add different
types of dominos to P 0 depending on the TM
M = (Q, , , , q0 , qaccept , qreject ).
For input hM, wi of ATM , construct an MPCP instance such that M accepts w
iff P 0 has a match starting with domino 1
The first part of the proof proceeds in 7 stages where we add different
types of dominos to P 0 depending on the TM
M = (Q, , , , q0 , qaccept , qreject ).
Using the dominos, we try to construct an accepting computation history
for M accepting w.
#
# q0 0 1 0 0 #
# q0 0
# q0 0 1 0 0 # 2 q7
q0 0
Part 2 places the domino 2q7
# q0 0 1 0 0
# q0 0 1 0 0 # 2 q7 1 0 0
q0 0
Part 2 places the domino 2q7
0 1 2 t
Part 4 places the dominos 0 1 2 and t into P 0 so we can
extend the match.
# q0 0 1 0 0 #
# q0 0 1 0 0 # 2 q7 1 0 0 #
q0 0
Part 2 places the domino 2q7
0 1 2 t
Part 4 places the dominos 0 1 2 and t into P 0 so we can
extend the match.
#
Part 5 puts in the domino #
# q0 0 1 0 0 #
# q0 0 1 0 0 # 2 q7 1 0 0 #
q0 0
Part 2 places the domino 2q7
0 1 2 t
Part 4 places the dominos 0 1 2 and t into P 0 so we can
extend the match.
#
Part 5 puts in the domino #
# q0 0 1 0 0 #
# q0 0 1 0 0 # 2 q7 1 0 0 #
q0 0
Part 2 places the domino 2q7
0 1 2 t
Part 4 places the dominos 0 1 2 and t into P 0 so we can
extend the match.
#
Part 5 puts in the domino #
# q0 0 1 0 0 #
# q0 0 1 0 0 # 2 q7 1 0 0 #
q0 0
Part 2 places the domino 2q7
0 1 2 t
Part 4 places the dominos 0 1 2 and t into P 0 so we can
extend the match.
#
Part 5 puts in the domino #
Just before these apply the upper and lower strings are like
... #
. . . # 2 1 qaccept 0 2 #
Just before these apply the upper and lower strings are like
... #
. . . # 2 1 qaccept 0 2 #
After using these dominos, we end up with
... #
. . . # qaccept #
Just before these apply the upper and lower strings are like
... #
. . . # 2 1 qaccept 0 2 #
After using these dominos, we end up with
... #
. . . # qaccept #
7 Finally we add the domino
qaccept ##
#
to complete the match.
( Lecture 17) Slides for 15-453 Spring 2011 17 / 28
PCP P ROOF S UMMARY OF PART 1
This concludes the construction of P 0 .
The only domino that could possibly start a match is the first one!
The only domino that could possibly start a match is the first one!
The last domino just adds the missing ? at the end of the match.
The only domino that could possibly start a match is the first one!
The last domino just adds the missing ? at the end of the match.
C ONCLUSION
PCP is undecidable!
MA = On input hIA i
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
a) Either
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
a) Either
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
a) Either b) or
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
a) Either b) or
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
a) Either b) or
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
a) Either b) or
MA = On input hIA i
1. Algorithmically construct an input hIB i for MB , such that
a) Either b) or
I DEA
Turing Machines can also compute function f : .
I DEA
Turing Machines can also compute function f : .
C OMPUTABLE F UNCTION
A function f : is a computable function if and only if there exists a
TM Mf , which on any given input w
I DEA
Turing Machines can also compute function f : .
C OMPUTABLE F UNCTION
A function f : is a computable function if and only if there exists a
TM Mf , which on any given input w
always halts, and
I DEA
Turing Machines can also compute function f : .
C OMPUTABLE F UNCTION
A function f : is a computable function if and only if there exists a
TM Mf , which on any given input w
always halts, and
leaves just f (w) on its tape.
I DEA
Turing Machines can also compute function f : .
C OMPUTABLE F UNCTION
A function f : is a computable function if and only if there exists a
TM Mf , which on any given input w
always halts, and
leaves just f (w) on its tape.
Examples:
def
Let f (w) = ww be a function. Then f is computable.
I DEA
Turing Machines can also compute function f : .
C OMPUTABLE F UNCTION
A function f : is a computable function if and only if there exists a
TM Mf , which on any given input w
always halts, and
leaves just f (w) on its tape.
Examples:
def
Let f (w) = ww be a function. Then f is computable.
def
Let f (hn1 , n2 i) = hni where n1 and n2 are integers and n = n1 n2 . Then
f is computable.
T HEOREM 5.22
If A <m B and B is decidable, then A is decidable.
T HEOREM 5.22
If A <m B and B is decidable, then A is decidable.
P ROOF
Let M be a decider for B and f be a mapping from A to B. Then N decides A.
N = On input w
T HEOREM 5.22
If A <m B and B is decidable, then A is decidable.
P ROOF
Let M be a decider for B and f be a mapping from A to B. Then N decides A.
N = On input w
1 Compute f (w)
T HEOREM 5.22
If A <m B and B is decidable, then A is decidable.
P ROOF
Let M be a decider for B and f be a mapping from A to B. Then N decides A.
N = On input w
1 Compute f (w)
2 Run M on input f (w) and output whatever M outputs.
T HEOREM 5.22
If A <m B and B is decidable, then A is decidable.
P ROOF
Let M be a decider for B and f be a mapping from A to B. Then N decides A.
N = On input w
1 Compute f (w)
2 Run M on input f (w) and output whatever M outputs.
T HEOREM 5.22
If A <m B and B is decidable, then A is decidable.
P ROOF
Let M be a decider for B and f be a mapping from A to B. Then N decides A.
N = On input w
1 Compute f (w)
2 Run M on input f (w) and output whatever M outputs.
T HEOREM
ATM <m HALTTM
T HEOREM
ATM <m HALTTM
P ROOF .
Construct a computable function f which maps hM, wi to hM 0 , w 0 i such that
Mf = On input hM, wi
T HEOREM
ATM <m HALTTM
P ROOF .
Construct a computable function f which maps hM, wi to hM 0 , w 0 i such that
Mf = On input hM, wi
1. Construct the following machine M 0 :
M 0 = On input x
T HEOREM
ATM <m HALTTM
P ROOF .
Construct a computable function f which maps hM, wi to hM 0 , w 0 i such that
Mf = On input hM, wi
1. Construct the following machine M 0 :
M 0 = On input x
1. Run M on x.
T HEOREM
ATM <m HALTTM
P ROOF .
Construct a computable function f which maps hM, wi to hM 0 , w 0 i such that
Mf = On input hM, wi
1. Construct the following machine M 0 :
M 0 = On input x
1. Run M on x.
2. If M accepts accept
T HEOREM
ATM <m HALTTM
P ROOF .
Construct a computable function f which maps hM, wi to hM 0 , w 0 i such that
Mf = On input hM, wi
1. Construct the following machine M 0 :
M 0 = On input x
1. Run M on x.
2. If M accepts accept
3. If M rejects enter a loop.
T HEOREM
ATM <m HALTTM
P ROOF .
Construct a computable function f which maps hM, wi to hM 0 , w 0 i such that
Mf = On input hM, wi
1. Construct the following machine M 0 :
M 0 = On input x
1. Run M on x.
2. If M accepts accept
3. If M rejects enter a loop.
2. Output hM 0 , wi.
T HEOREM 5.24
If A <m B and B is Turing-recognizable, then A is Turing-recognizable.
T HEOREM 5.24
If A <m B and B is Turing-recognizable, then A is Turing-recognizable.
P ROOF
Essentially the same as the previous proof.
S UMMARY OF T HEOREMS
Assume that A <m B. Then
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
2 If A is undecidable then B is undecidable.
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
2 If A is undecidable then B is undecidable.
3 If B is Turing-recognizable then A is Turing-recognizable.
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
2 If A is undecidable then B is undecidable.
3 If B is Turing-recognizable then A is Turing-recognizable.
4 If A is not Turing-recognizable then B is not Turing-recognizable.
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
2 If A is undecidable then B is undecidable.
3 If B is Turing-recognizable then A is Turing-recognizable.
4 If A is not Turing-recognizable then B is not Turing-recognizable.
5 A <m B
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
2 If A is undecidable then B is undecidable.
3 If B is Turing-recognizable then A is Turing-recognizable.
4 If A is not Turing-recognizable then B is not Turing-recognizable.
5 A <m B
Useful observation:
Suppose you can show ATM <m B
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
2 If A is undecidable then B is undecidable.
3 If B is Turing-recognizable then A is Turing-recognizable.
4 If A is not Turing-recognizable then B is not Turing-recognizable.
5 A <m B
Useful observation:
Suppose you can show ATM <m B
This means ATM <m B
S UMMARY OF T HEOREMS
Assume that A <m B. Then
1 If B is decidable then A is decidable.
2 If A is undecidable then B is undecidable.
3 If B is Turing-recognizable then A is Turing-recognizable.
4 If A is not Turing-recognizable then B is not Turing-recognizable.
5 A <m B
Useful observation:
Suppose you can show ATM <m B
This means ATM <m B
Since ATM is Turing-unrecognizable then B is Turing-unrecognizable.
T HEOREM 5.30
EQTM = {hM1 , M2 i | M1 and M2 are TMs and L(M1 ) = L(M2 )} is neither Turing
recognizable nor co-Turing-recognizable.
T HEOREM 5.30
EQTM = {hM1 , M2 i | M1 and M2 are TMs and L(M1 ) = L(M2 )} is neither Turing
recognizable nor co-Turing-recognizable.
P ROOF I DEA
We show
T HEOREM 5.30
EQTM = {hM1 , M2 i | M1 and M2 are TMs and L(M1 ) = L(M2 )} is neither Turing
recognizable nor co-Turing-recognizable.
P ROOF I DEA
We show
ATM <m EQTM
T HEOREM 5.30
EQTM = {hM1 , M2 i | M1 and M2 are TMs and L(M1 ) = L(M2 )} is neither Turing
recognizable nor co-Turing-recognizable.
P ROOF I DEA
We show
ATM <m EQTM
ATM <m EQTM
T HEOREM 5.30
EQTM = {hM1 , M2 i | M1 and M2 are TMs and L(M1 ) = L(M2 )} is neither Turing
recognizable nor co-Turing-recognizable.
P ROOF I DEA
We show
ATM <m EQTM
ATM <m EQTM
These then imply the theorem.