Title: Tackling Post
1Tackling Posts Correspondence Problem
- Ling Zhao
- Department of Computing Science
- University of Alberta
- July 31, 2001
2Preconceptions
- Easy to state, impossible to solve!
- Some instances can be solved
- Purely theoretical problem before
- A few solving methods were raised recently
Lorentz, R.J., Creating difficult instances of
the Post Correspondence Problem, (CG2000),
145-159, 2000.
3An example of a PCP instance
- Rules
- Select pairs
- Make the concatenated top string and bottom
string identical
1001100100100 1001100100100
Instance solved!
4Definitions
Given an alphabet ? 0, 1, one instance of
Posts correspondence problem of size s is a
finite set of pairs of strings (gi , hi) ( i
1s, s ? 1) over the alphabet ?. A solution of
length n ? 1 to this instance is a sequence i1 i2
... in of selections such that the strings gi1gi2
... gin and hi1hi2 ... hin formed by
concatenation are identical.
Size the number of pairs Width the length
of longest string Optimal solution the solution
with shortest length Optimal length the length
of the optimal solution Configuration the longer
portion that one side goes beyond the other.
Configuration is either at
the top or at the bottom.
5Theoretical place
- Raised by Emil L. Post in 1946 as an classic
undecidable problem - Bounded version is NP-complete
- The PCP of size 2 is decidable
- The PCP of size 7 is undecidable
- Open problem decidability of PCP of size between
3 and 6 - Application to prove the undecidability of other
problems
6Facts Motivations
- Some PCP instances have no solutions
- Some instances have solutions
- Some instances have more than one optimal
solution - Only a small portion of instances have long
optimal solutions (the difficult instances).
7Progress in three directions
- Searching optimal solutions efficiently and
quickly - Prove instances with no solutions
- Creating difficult instances
8Search optimal solutions
- Basically a single-agent search problem
- Traditional search techniques and methods can be
migrated to solve PCP instances - Due to the special characteristics of PCP, some
new application-dependent methods are invented
9Search optimal solutions (contd)
- Iterative-deepening depth-first search
- Cache scheme
- Mask method
- Bidirectional probing
- Heuristic pruning
10Mask method
Mask method use the possibility of ending the
configurations on one side to prune nodes
Critical configuration a non-empty configuration
that can be fully matched or be turned over.
Two critical configurations at the top 1
and 10
11Mask method
- 1 2 3 4
- 01 00 1 001
- 0 011 101 1
- Find all critical configurations
- Test whether these configuration are valid, i.e.,
possible to be generated
- Only one critical configuration at the top exist
10. - It can not be generated because configuration
01 at the bottom in its reversal can not lead
to a solution - It has the top mask
Reversal
1 2 3 4 10 00 1 100 0
110 101 1
12Bidirectional pruning
- Let P (gi , hi ) ( i 1s) be a PCP instance.
Ps reversal is (giR, hiR) ( i 1s), while
giR, hiR are the reversals of string gi and hi
respectively. - A PCP instance has the same solvability as its
reversal in the sense that it has a solution if
and only if its reversal has, and it has the same
number of optimal solutions and the same optimal
length as its reversal.
13Bidirectional pruning
- Solving any direction is enough
- Yet search difficulties in two directions may
differ greatly - Using probing scheme to decide which direction is
promising - Predicting correctly in most cases because of the
stable branching factors
14Heuristic pruning
- Learned from the well-known search algorithms
such as A and IDA - But use the heuristic value to prune hopeless
nodes
c a configuration g(c) current depth
for c h(c) heuristic value for c if (
g(c) h(c) gt depth threshold ) then c can be
pruned
15Heuristic pruning example
- Suppose a configuration in the top has 81 bits
and its depth is 60. - Search depth threshold is 100.
- The maximum shrinking length in every step is 2.
- Impossible to get a solution below depth 100.
This configuration can be pruned.
16Heuristic pruning facts
- The simple heuristic can reduce the number of
visited node by roughly 80 - Complicated heuristic value can be obtained by
pre-computing the matching results of shorter
configurations (similar to the pattern database
in 15-puzzle). - Influence the use of move ordering
17Prove instances with no solutions
- Filters
- Mask method
- Exclusion method
- Pattern method
18Filters
2. Length balance filter
101 1 01 10 01 0
3. Element balance filter
19Mask method
- The mask method is also useful to prove an
instance has no solutions - the masks of one instance and its reversal are
interdependent. The discovering process of masks
need to be iterated until no changes come out.
20Exclusion method
- Basic idea exclude pairs that can not be used
1 2 3 1 0 101 0 001
1
When starting from pair 2, the following
selection can only be pair 1 or pair 2. Reason
Any combinations of the bottom strings in pair 1
and pair 2 can not generate a substring 101,
the top string in pair 3.
21Pattern method
- Basic idea If a configuration has a prefix, and
any path starting from it always generates a
configuration having such prefix, it leads to no
solutions.
4 types of patterns Type 1 prefix pattern
aA gtaB Type 2 postfix pattern
Aa gt Ba Type 3 infix pattern
AaB gt CaD Type 4 prefix
postfix pattern aAßgtaBß
This method is very difficult to be automated!
22Creating difficult instances
- Combination of a random instance generator and a
solver - A strong PCP solver has more chance to discover
hard PCP instances. - It can find optimal solutions very quickly and
reject instances with no solutions earlier.
23Creating difficult instances
- Use the number of visited nodes and cutoff nodes
as the threshold. - Prohibit instances having one pair consisting of
all zeros or ones. - Neighboring effects replacing the infrequently
used pair in the solution may generate a harder
instance.
Optimal length120
Optimal length200
24Experimental results
- All methods discussed above were implemented
except the pattern method. - Can only give qualitative evaluations on the
improvements derived from the mask method and the
exclusion method. - Bidirectional probing is crucial to some
instances. - Even a simple heuristic function can improve
efficiency greatly.
25Experimental results
- Go through all unexamined instances of size 3 and
width 3. Now in this subclass only one instance
is still unsolved (1). - Strengthen the conjecture that the hardest
instance in this subclass is (2) with optimal
length of 75.
(1)
(2)
26Experimental results
- Create more than 100 hard instances of size 4 and
width 4 with optimal lengths more than 100. - Two instances set new PCP instance records
Optimal length216 hardest in PCP3,4
Optimal length256 hardest in PCP4,4
27Difficulties Differences
- Theoretically not all instances can be solved by
a program. - Unbounded search space is different from the
normal single-agent search problems or two-play
games. - Small branching factor. For an instance in
PCP3, typically its branching factor is a
little more than 1.
28Speculations
- The mask method, the exclusion method and
bidirectional probing are done earlier in the
solving scheme and cost little overhead. - The more properties discovered, the easier to
solve!
29Whats the use of PCP?
- Provide a new and different test bed for search
enhancements iterative deepening, cache scheme,
heuristic pruning, bidirectional search, etc. - The data gathered through practical approaches
may result in the breakthrough in theory, i.e.,
proving the decidablity of PCP3.
30Future work
- One instance is still unresolved.
- The pattern method need automated
- Incorporate more enhancements, e.g. complicated
heuristic and bidirectional search. - Continue examining the subclasses PCP3,4,
PCP3,5 and so on.
31Links
- PCP websites
- http//www.cs.ualberta.ca/zhao/PCP/in
tro.htm - http//www.informatik.uni-leipzig.de/
pcp/ - PCP Paper
- Tackling Posts correspondence problem