0% found this document useful (0 votes)
24 views5 pages

Understanding the Post Correspondence Problem

This lecture discusses the Post Correspondence Problem (PCP), an undecidable problem that can be related to Turing machines. It explains how reducibility is used to show that if a solution exists for PCP, it can be used to solve the undecidable problem AT M. The lecture ultimately proves that PCP is undecidable by constructing instances that simulate Turing machine computations.

Uploaded by

Soumabha Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views5 pages

Understanding the Post Correspondence Problem

This lecture discusses the Post Correspondence Problem (PCP), an undecidable problem that can be related to Turing machines. It explains how reducibility is used to show that if a solution exists for PCP, it can be used to solve the undecidable problem AT M. The lecture ultimately proves that PCP is undecidable by constructing instances that simulate Turing machine computations.

Uploaded by

Soumabha Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lecture 21:

An Undecidable/ Uncomputable Problem: The


Post Correspondence Problem (PCP)

Lecturer: Debanjan Bhowmik, Assistant Professor,


Department of Electrical Engineering,
Indian Institute of Technology Delhi
Scribed by: Het Patel and Shambhav Tewari

1 Introduction
In the previous lectures, we have looked at several undecidable languages: AT M ,
HALTT M , ET M , etc. However, these languages are defined strictly within the
realm of automata and Turning-machine theory. In this lecture, we will explore
the phenomenon of undecidability outside the realm of problems concerning au-
tomata and Turing machines, i.e., we will look at a problem which can be con-
sidered as puzzle: the Post Correspondence Problem (PCP). We will ultimately
show its connection with Turing machines and show that solving this puzzle is
equivalent to deciding AT M . Since we already know that AT M is undecidable,
by equivalence/ reduction, we show here that this puzzle is uncomputable for
some cases.

2 Reducibility
As we have seen in the previous lecture, a reduction is a way of converting
one problem to another problem in such a way that a solution to the second
problem can be used to solve the first problem. Reducibility always involves
two problems, which we call A and B. If A reduces to B, we can use a solution
to B to solve A.
Reducibility plays an important role in classifying problems by decidability,
and later in complexity theory as well. When A is reducible to B, solving A
cannot be harder than solving B because a solution to B gives a solution to
A. In terms of computability theory, if A is reducible to B and B is decidable,
A also is decidable. Equivalently, if A is undecidable and reducible to B, B
is undecidable. This last version is key to proving that various problems are
undecidable, including the PCP problem we deal with here.

1
3 Post Correspondence Problem
3.1 Definition of the problem
Let A be an alphabet with at least two symbols. The input of the problem
consists of two finite lists (of length N) a1 , ..., aN and b1 , ..., bN of words over A.
The task is to pick a sequence of indices (repetition allowed) (ik )1≤k≤K with
K ≥ 1 and 1 ≤ ik ≤ N ∀k such that
ai1 ...aiK = bi1 ...biK (1)
The decision problem then is to decide if such a solution exists or not, for the
given two lists above. We will prove here that this problem is unsolvable by any
algorithm.
Example 1: Let the alphabet A = {0, 1} and the word lists (N = 3) be:
a1 a2 a3 b1 b2 b3
0 01 110 100 00 11
A solution to this problem would be the index sequence (3, 2, 3, 1) , because
a3 a2 a3 a1 = 110 · 01 · 110 · 0 = 110011100 = 11 · 00 · 11 · 100 = b3 b2 b3 b1 (2)
Furthermore, since (3, 2, 3, 1) is a solution, so are all of its ”repetitions”, such
as (3, 2, 3, 1, 3, 2, 3, 1), etc.; that is, when a solution exists, there are infinitely
many solutions of this repetitive kind.
However, if the two lists had consisted of only a2 , a3 and b2 , b3 from those
sets, then there would have been no such index sequence (the last digit of any
such a string is not the same as the digit before it, whereas b only constructs
pairs of the same digit).
An instance of the PCP is a set P of two finite lists of length N. The problem
is to determine whether P has a solution index sequence as described above. In
other words, an instance of the PCP is a set of N dominos, each with two strings
on it - a numerator strings and a denominator string: [ ab11 ],...,[ abNN ] The task is to
arrange the dominos (repetition allowed) in such a way that the concatenation
of the numerator strings (according to the solution index sequence) is the same
as that of the denominator strings.
We can express the problem as a language as:

P CP = {< P > |P is an instance of


the P ost Correspondence P roblem with a solution/match} (3)
For a given instance, the instance having a solution (also called a match) is
the same as saying that the string/ instance belongs to the language PCP above.
Similarly, the instance not having a solution/ match means it doesn’t belong to
PCP. Thus, given an instance (a set of N dominoes each with a numerator string
and a denominator string), the ability of finding out whether that instance has
a match is same as the ability of deciding the language PCP. We show in this
lecture PCP is undecidable, i.e., given an instance, we will not be able to tell
100 percent of the times if that instance has a match or not.

2
3.2 Computation Histories
Computation History (CH) is a formal way of representing the computation of
a Turing machine M on a particular input w. It is simply the sequence of config-
urations that the machine goes through as it processes the input. An accepting
computation history for M on w is a sequence of configurations, C1 , C2 , ..., Cl ,
where C1 is the start configuration of M on w, and Cl is an accepting configu-
ration of M, and each Ci legally follows from Ci1 according to the rules of M.
A rejecting computation history for M on w is defined similarly, except that Cl
is a rejecting configuration.
If M does not halt on w, no accepting or rejecting CH exists for M on w.
Also, M accepts w iff there is an accepting CH of M on w.
Computation History will prove to be a powerful tool when dealing with
problems like PCP.

3.3 Undecidability of PCP


We have already seen that AT M is an undecidable language. In order to prove
that P CP is undecidable, it suffices to show that we can reduce AT M to P CP .
Thus, we will show that if we can decide P CP , then we can decide AT M . Given
any Turing machine M and input w, we construct an instance PM,w such that
PM,w has a solution index sequence (or match) iff M accepts w. That is, PM,w
has a match iff there is an accepting CH of M on w. So, if we can determine
whether the instance has a match, we would be able to determine whether M
accepts w. For this purpose, we choose the dominos in PM,w so that making a
match forces a simulation of M to occur. To force simulation of M, we make 2
modifications to Turing Machine M and one change to our PCP problem:
1. M on input w never attempts to move the tape head beyond the left end
of input tape.
2. If input w is the empty string , then we use the string in place of w.
3. We modify the PCP problem to require that the first index in the solution
index sequence is 1, i.e. the match starts with the first domino.
We call this problem the Modified Post Correspondence Problem (MPCP).

M P CP = {< D > |D is an instance of the P CP


with a match that starts with f irst domino} (4)
We will now prove the undecidability of PCP by first proving that MPCP is
undecidable and then proving that MPCP can be reduced to PCP.

Proof: Let TM R decide the PCP and construct S deciding AT M . S


constructs an instance of the PCP PM,w (=P) that has a match iff
M = (Q, Σ, Γ, δ, q0 , qaccept , qreject ) accepts w = w1 w2 ...wn . We will firstly show
the construction of an instance P 0 of the MPCP by S. We do it through the
following parts:

3
1. First domino of the match: Put [ #q0 w1 w#2 ...wn # ] into P 0 as the first
domino [ ab11 ] (this will be, by definition, the first domino of the match). The
bottom string corresponds to the first configuration in the configuration
history of M while M works on w = w1 w2 ...wn
2. A transition of the TM M for the tape head moving right: For
every a, b ∈ Γ and every q, r ∈ Q where q 6= qreject , if δ(q, a) = (r, b, R),
put [ qa 0
br ] into P . This handles head motions to the right.

3. A transition of the TM M for the tape head moving left: For


every a, b, c ∈ Γ and every q, r ∈ Q where q 6= qreject , if δ(q, a) = (r, b, L),
put [ cqa 0
rcb ] into P . This handles head motions to the left.

4. Taking care of the contents of the tape where the tape head isn’t
there: For every a ∈ Γ, put [ aa ] into P 0 . This handles the tape cells not
adjacent to the head.
5. Note that only the first domino’s numerator has a # while there are two
#0 s from the first domino itself. So, we need to add one more domino for
copying the symbol. In addition to that, we need to add a blank symbol
at the end of the configuration to simulate the infinitely many blanks to
#
the right. So, put [ # ] and [ # 0
# ] into P .
aq q a
accept
6. For every a ∈ Γ, put [ qaccept ] and [ qaccept
accept
] into P 0 . These dominos have
the effect of adding ”pseudo-steps” of the TM after it has halted, where
the head ”eats” adjacent symbols until none are left.
qaccept ##
7. Finally, we add the domino [ # ] into P 0 and complete the match.

Thus, we conclude the construction of P 0 . We will now convert to P 0 to P , an


instance of PCP that still stimulates M on w.
For u = u1 u2 ...un , define $u = ∗u1 ∗ u2 ∗ u3 ∗ ... ∗ un , u$ = u1 ∗ u2 ∗ u3 ∗
... ∗ un ∗, and $u$ = ∗u1 ∗ u2 ∗ u3 ∗ ... ∗ un ∗. Now, for the conversion: If P 0
were the collection {[ ab11 ], [ ab22 ], [ ab33 ], ..., [ abkk ]}, we define P to be the collection
$a1 $ak
{[ $b1$
], [ $a $a3 $Ω
b2 $ ], [ b3 $ ], ..., [ bk $ ], [ Ω ]}. Note that the only domino that could start a
2

match is the first one because it is the only one whose denominator starts with
a ∗ while all numerators start with a ∗. Adding ∗’s does not have any other
effect on the match. We add the last domino to allow the numerator string to
add the extra ∗ at the end of the match.
Example: Let Γ = {0, 1, 2, }, and w be the string 0100. Corresponding
to the TM M , let a transition be: δ(q0 , 0) = (q7 , 2, R). So, part 1 places the
#
domino [ #q0 0100# ] in P 0 , and the match begins:

numStr = #

denomStr = #q0 0100#

4
q0 0
In addition, part 2 places the domino [ 2q 7
] (corresponding to the above transi-
tion), and part 4 places the dominos [ 0 ], [ 11 ], [ 22 ], and [ ]. Using parts 2,4, and
0

5, we extend our match to:

numStr = # · q0 0 · 1 · 0 · 0 · #

denomStr = #q0 0100# · 2q7 · 1 · 0 · 0 · #


If δ(q7 , 1) = (q5 , 0, R) then we have the domino [ q0q7 15 ] by part2. So, the latest
partial match extends to:

numStr = ...2 · q7 1 · 0 · 0 · #

denomStr = ...(2q7 · 1 · 0 · 0 · #) · 2 · 0q5 · 0 · 0 · #


Continuing this further till we reach the accept state by using dominos from
only parts 2, 3, 4, and 5. Then, we will use dominos from part 6 and then
finally we will add domino from part 7. Thus, making a match can force the
simulation of M to occur. We can now convert this P 0 to an instance of PCP
by using the simple technique described above.

4 References
1. Michael Sipser’s ”Introduction to the Theory of Computation” (Chapter
5.3)

You might also like