Post correspondence problem


The Post correspondence problem is an undecidable decision problem that was introduced by Emil Post in 1946. Because it is simpler than the halting problem and the Entscheidungsproblem it is often used in proofs of undecidability.

Definition of the problem

Let be an alphabet with at least two symbols. The input of the problem consists of two finite lists and of words over. A solution to this problem is a sequence of indices with and for all, such that
The decision problem then is to decide whether such a solution exists or not.

Alternative definition

This gives rise to an equivalent alternative definition often found in the literature, according to which any two homomorphisms with a common domain and a common codomain form an instance of the Post correspondence problem, which now asks whether there exists a nonempty word in the domain such that
Another definition describes this problem easily as a type of puzzle. We begin with a collection of dominos, each containing two strings, one on each side. An individual domino looks like
and a collection of dominos looks like
The task is to make a list of these dominos so that the string we get by reading off the symbols on the top is the same as the string of symbols on the bottom. This list is called a match. The Post Correspondence Problem is to determine whether a collection of dominos has a match.
For example, the following list is a match for this puzzle.
For some collections of dominos, finding a match may not be possible. For example, the collection
cannot contain a match because every top string is longer than the correspondending bottom string.

Example instances of the problem

Example 1

Consider the following two lists:
α1α2α3
aabbba

β1β2β3
baaaabb

A solution to this problem would be the sequence, because
Furthermore, since is a solution, so are all of its "repetitions", such as, 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 and from those sets, then there would have been no solution.
A convenient way to view an instance of a Post correspondence problem is as a collection of blocks of the form

αi
βi

there being an unlimited supply of each type of block. Thus the above example is viewed as
a
baa

i = 1
ab
aa

i = 2
bba
bb

i = 3
where the solver has an endless supply of each of these three block types. A solution corresponds to some way of laying blocks next to each other so that the string in the top cells corresponds to the string in the bottom cells. Then the solution to the above example corresponds to:
bba
bb

i1 = 3
ab
aa

i2 = 2
bba
bb

i3 = 3
a
baa

i4 = 1

Example 2

Again using blocks to represent an instance of the problem, the following is an example that has infinitely many solutions in addition to the kind obtained by merely "repeating" a solution.
bb
b

1
ab
ba

2
c
bc

3
In this instance, every sequence of the form is a solution :
bb
b

1
ab
ba

2
ab
ba

2
ab
ba

2
c
bc

3

Proof sketch of undecidability

The most common proof for the undecidability of PCP describes an instance of PCP that can simulate the computation of an arbitrary Turing machine on a particular input. A match will occur if and only if the input would be accepted by the Turing machine. Because deciding if a Turing machine will accept an input is a basic undecidable problem, PCP cannot be decidable either. The following discussion is based on Michael Sipser's textbook Introduction to the Theory of Computation.
In more detail, the idea is that the string along the top and bottom will be a computation history of the Turing machine's computation. This means it will list a string describing the initial state, followed by a string describing the next state, and so on until it ends with a string describing an accepting state. The state strings are separated by some separator symbol. According to the definition of a Turing machine, the full state of the machine consists of three parts:
Although the tape has infinitely many cells, only some finite prefix of these will be non-blank. We write these down as part of our state. To describe the state of the finite control, we create new symbols, labelled q1 through qk, for each of the finite state machine's k states. We insert the correct symbol into the string describing the tape's contents at the position of the tape head, thereby indicating both the tape head's position and the current state of the finite control. For the alphabet, a typical state might look something like:
101101110q700110.
A simple computation history would then look something like this:
q0101#1q401#11q21#1q810.
We start out with this block, where x is the input string and q0 is the start state:
q0x#

The top starts out "lagging" the bottom by one state, and keeps this lag until the very end stage. Next, for each symbol a in the tape alphabet, as well as #, we have a "copy" block, which copies it unmodified from one state to the next:
a
a

We also have a block for each position transition the machine can make, showing how the tape head moves, how the finite state changes, and what happens to the surrounding symbols. For example, here the tape head is over a 0 in state 4, and then writes a 1 and moves right, changing to state 7:
q40
1q7

Finally, when the top reaches an accepting state, the bottom needs a chance to finally catch up to complete the match. To allow this, we extend the computation so that once an accepting state is reached, each subsequent machine step will cause a symbol near the tape head to vanish, one at a time, until none remain. If qf is an accepting state, we can represent this with the following transition blocks, where a is a tape alphabet symbol:
qfa
qf

aqf
qf

There are a number of details to work out, such as dealing with boundaries between states, making sure that our initial tile goes first in the match, and so on, but this shows the general idea of how a static tile puzzle can simulate a Turing machine computation.
The previous example
q0101#1q401#11q21#1q810.
is represented as the following solution to the Post correspondence problem:
q0101#

q01
1 q4

0
0

1
1

#
#

1
1

q4 0
1 q2

1
1

#
#

1
1

1 q21
q810

#
#

1 q8
q8

1
1

0
0

#
#

q8 1
q8

0
0

#
#

q8 0
q8

#
#

q''8

#
#

...

Variants

Many variants of PCP have been considered. One reason is that, when one tries to prove undecidability of some new problem by reducing from PCP, it often happens that the first reduction one finds is not from PCP itself but from an apparently weaker version. Also note that if one removes correspondence, the .