the post correspondence problem (pcp), introduced by emil post in 1946, is an undecidable decision problem. the pcp problem over an alphabet ∑ is stated as follows −
given the following two lists, m and n of non-empty strings over ∑ −
m = (x1, x2, x3,………, xn)
n = (y1, y2, y3,………, yn)
we can say that there is a post correspondence solution, if for some i1,i2,………… ik, where 1 ≤ ij ≤ n, the condition xi1 …….xik = yi1 …….yik satisfies.
example 1
find whether the lists
m = (abb, aa, aaa) and n = (bba, aaa, aa)
have a post correspondence solution?
solution
x1 | x2 | x3 | |
---|---|---|---|
m | abb | aa | aaa |
n | bba | aaa | aa |
here,
x2x1x3 = ‘aaabbaaa’
and y2y1y3 = ‘aaabbaaa’
we can see that
x2x1x3 = y2y1y3
hence, the solution is i = 2, j = 1, and k = 3.
example 2
find whether the lists m = (ab, bab, bbaaa) and n = (a, ba, bab) have a post correspondence solution?
solution
x1 | x2 | x3 | |
---|---|---|---|
m | ab | bab | bbaaa |
n | a | ba | bab |
in this case, there is no solution because −
| x2x1x3 | ≠ | y2y1y3 | (lengths are not same)
hence, it can be said that this post correspondence problem is undecidable.