- Automata Theory Tutorial
- Automata Theory - Home
- Automata Theory Introduction
- Deterministic Finite Automaton
- Non-deterministic Finite Automaton
- NDFA to DFA Conversion
- DFA Minimization
- Moore & Mealy Machines
- Classification of Grammars
- Introduction to Grammars
- Language Generated by Grammars
- Chomsky Grammar Classification
- Regular Grammar
- Regular Expressions
- Regular Sets
- Arden's Theorem
- Constructing FA from RE
- Pumping Lemma for Regular Grammar
- DFA Complement
- Context-Free Grammars
- Context-Free Grammar Introduction
- Ambiguity in Grammar
- CFL Closure Properties
- CFG Simplification
- Chomsky Normal Form
- Greibach Normal Form
- Pumping Lemma for CFG
- Pushdown Automata
- Pushdown Automata Introduction
- Pushdown Automata Acceptance
- PDA & Context Free Grammar
- PDA & Parsing
- Turing Machine
- Turing Machine Introduction
- Accepted & Decided Language
- Multi-tape Turing Machine
- Multi-Track Turing Machine
- Non-Deterministic Turing Machine
- Semi-Infinite Tape Turing Machine
- Linear Bounded Automata
- Decidability
- Language Decidability
- Undecidable Language
- Turing Machine Halting Problem
- Rice Theorem
- Post Correspondence Problem
- Automata Theory Useful Resources
- Automata Theory - Quick Guide
- Automata Theory - Useful Resources
- Automata Theory - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.