Post Correspondence Problem
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 = (x_{1}, x_{2}, x_{3},………, x_{n})
N = (y_{1}, y_{2}, y_{3},………, y_{n})
We can say that there is a Post Correspondence Solution, if for some i_{1},i_{2},………… i_{k}, where 1 ≤ i_{j} ≤ n, the condition x_{i1} …….x_{ik} = y_{i1} …….y_{ik} satisfies.
Example 1
Find whether the lists
M = (abb, aa, aaa) and N = (bba, aaa, aa)
have a Post Correspondence Solution?
Solution
x_{1} | x_{2} | x_{3} | |
---|---|---|---|
M | Abb | aa | aaa |
N | Bba | aaa | aa |
Here,
x_{2}x_{1}x_{3} = ‘aaabbaaa’
and y_{2}y_{1}y_{3} = ‘aaabbaaa’
We can see that
x_{2}x_{1}x_{3} = y_{2}y_{1}y_{3}
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
x_{1} | x_{2} | x_{3} | |
---|---|---|---|
M | ab | bab | bbaaa |
N | a | ba | bab |
In this case, there is no solution because −
| x_{2}x_{1}x_{3} | ≠ | y_{2}y_{1}y_{3} | (Lengths are not same)
Hence, it can be said that this Post Correspondence Problem is undecidable.