Académique Documents
Professionnel Documents
Culture Documents
Lecture #12
Sarmad Abbasi
Virtual University
Theory of Computation
1 / 42
Theory of Computation
2 / 42
Theory of Computation
3 / 42
Theory of Computation
4 / 42
This list is called a match if reading of the top symbols gives us the
same string as reading of the bottom symbols.
Theory of Computation
5 / 42
Theory of Computation
6 / 42
Lets look at another collection (now, written in a less fancy way). This
collection has three dominos.
abc ca acc
ab a ba
Theory of Computation
7 / 42
Theory of Computation
8 / 42
Theory of Computation
9 / 42
Theorem
PCP is undecidable.
How will we prove this theorem?
We will show that if PCP is decidable then we can use the decider for
PCP to construct a decider for A TM .
Theory of Computation
10 / 42
Theory of Computation
11 / 42
Theory of Computation
12 / 42
Once again the main idea is that given a TM M and an input w we will
describe a collection P 0 of dominos such that
M accepts w if and only if P 0 has a match starting with the first domino.
The main idea is that we will make a collection so that the only way to
find a match will be to simulate a computation of M on w.
In fact a match will correspond to an accepting computation history of
M on w.
The construction is going to be in 7 parts.
Theory of Computation
13 / 42
Theory of Computation
14 / 42
Part 1:
Put
#
#q0 w1 w2 wn #
Theory of Computation
15 / 42
Part 2:
For every a, b and q, r Q where q 6= qr if
(q, a) = (r , b, R),
put
h qa i
br
in
P 0.
Theory of Computation
16 / 42
Part 3:
For every a, b, c and q, r Q where q 6= qr if
(q, a) = (r , b, L),
put
h cqa i
rcb
in
P 0.
Theory of Computation
17 / 42
Part 4:
For every a put
hai
a
in
P 0.
Theory of Computation
18 / 42
Theory of Computation
19 / 42
Theory of Computation
20 / 42
Theory of Computation
21 / 42
Part 5:
Put
#
#
and
#
#
The first one allows us to copy the # symbol that marks the
separation of the configurations.
Theory of Computation
22 / 42
Theory of Computation
23 / 42
Once again note that the top has the first two configurations of M and
the bottom has the first three.
Lets look at what happens when the machine moves to the left. Say
we have
(q5 , 0) = (q9 , 2, L)
then we put the dominos
0q5 0 1q5 0 2q5 0 q5 0
q9 02 q9 12 q9 22 q9 2
Theory of Computation
24 / 42
#20q5 00#
#20q5 00#2q9 020#
Theory of Computation
25 / 42
Theory of Computation
26 / 42
We will only allow the top string to catchup with the bottom one if we
go into an accept state.
Part 6:
For every a put
aqa
qa
and
qa a
qa
in P 0 .
Theory of Computation
27 / 42
qa 0
qa
to get to
#
#21qa 2#
Theory of Computation
28 / 42
Finally we add
Part 7:
qa ##
#
in P 0 .
Which will allow us to complete the match.
Theory of Computation
29 / 42
The first domino has the initial configuration on the bottom and
only a # on the top.
To copy any configuration on the top. We are forced to put the next
configuration on the bottom.
When we reach the final state. We allow the top to catch up with
the bottom string.
Theory of Computation
30 / 42
If M loops forever on w then the top string will never catch up with
the bottom string.
Theory of Computation
31 / 42
Theorem
If P 0 is constructed as described then it has a match if and only if M
accepts w.
Theory of Computation
32 / 42
Run R on P 0 .
If R accepts, accept.
If R rejects, reject.
Theory of Computation
33 / 42
Theorem
PCP is undecidable.
However, P 0 is an instance of MPCP. In fact, if we remove the
restriction that the match should start with the first domino it has a very
short match.
Now, we can convert this instance of MPCP to an instance of PCP as
follows:
Let u = u1 u2 un be a string. Let us define ?u, u?, ?u? to be
?u = u1 u2 u3 un
u? = u1 u2 u3 un
?u? = u1 u2 u3 un
Theory of Computation
34 / 42
Theory of Computation
35 / 42
?t1
?t2
?t3
?tk
?
,
,
,...,
?b1 ?
b2 ?
b3 ?
bk ? ?
In this collection any match will start with the first domino. Since, it is
the only one that has the same first character on the top and bottom.
So, we dont have to insist that the match has to start with the first
domino. It is built into the collection.
Other than forcing the first domino to start the match the s do not put
any restrictions. They simply interleave with the symbols.
?
?
allows the top string to add an extra at the end of the match!
Theory of Computation
36 / 42
Theorem
PCP is undecidable.
Assume that PCP is decidable. Let us say we have a decider R for
PCP. Consider the following decider S
1
Run R on P.
If R accepts, accept.
If R rejects, reject.
Theory of Computation
37 / 42
Computable Functions
Now we will consider TMs that compute functions. So the TM has an
input tape and an output tape. A diagram of the machine looks like as
follows:
Theory of Computation
38 / 42
Computable Functions
Theory of Computation
39 / 42
Computable Functions
Theory of Computation
40 / 42
Reducibility
Let A be a language. We say A is mapping reducible to B, written as
A m B
if there is a computable function f : such that for every w
w A f (w) B.
Here is a diagram:
Theory of Computation
41 / 42
Reducibility
Theory of Computation
42 / 42