<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Methods for Solving the Post Correspondence Problem and Certificate Generation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Akihiro Omori</string-name>
          <email>omori.a.ab@m.titech.ac.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yasuhiko Minamide</string-name>
          <email>minamide@c.titech.ac.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Isabelle/HOL.</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Mathematical and Computing Science, Tokyo Institute of Technology</institution>
          ,
          <addr-line>Tokyo</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <fpage>92</fpage>
      <lpage>98</lpage>
      <abstract>
        <p>Post Correspondence Problem (PCP) is a well-known undecidable problem. Solving instances with solutions is straightforward with exploration algorithms, but proving infeasibility is challenging. This research introduces two methods to demonstrate infeasibility, including generating formal proofs in The Post Correspondence Problem (PCP), proposed by Post in 1946 [1], is undecidable. PCP instances use tiles with two strings on top and bottom.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>100
1
00
In this example, there are three kinds of tiles, each available in infinite quantities. The problem is
to determine whether it is possible to arrange one or more tiles in such a way that the reading of
the top and bottom strings matches. In this particular instance, a solution (indices of arrangement
of tiles) is “1311322”, and this shows that both the top and bottom read “1001100100100”.
1
00</p>
      <p>0
100</p>
      <p>0
100</p>
      <p>
        For instances that have a solution, it is possible to find the solution within finite time using
an exploration algorithm. On the other hand, determining that no solution exists is challenging,
and due to the undecidability of the problem, no general algorithm exists for this purpose.
Previous research has proposed heuristic algorithms for finding solutions [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] and Ling Zhao
(2003) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] attempted to solve all the problems in PCP[
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ] and left 3,170 problems unsolved.
PCP[
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ] refers to a set of all instances where the number of tiles is 3, and the maximum length
of the written strings is 4.
      </p>
      <p>This research makes the following three main contributions.
Japan
CEUR
CEUR
Workshop
Proceedings</p>
      <p>
        ceur-ws.org
ISSN1613-0073
• Propose two novel algorithms to demonstrate that a PCP instance has no solution.
• Solve all problems of PCP[
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ] except for 13 problems.
      </p>
      <p>• Show an example of automatic proof generation for concrete problems.</p>
    </sec>
    <sec id="sec-2">
      <title>2. The First Method: String Constraint Formulation</title>
      <p>We formulate PCP as a string constraint problem.</p>
      <p>Example 2.1 (Example of   and  ℎ). Let PCP instance  = ((1111, 1110), (1101, 1), (11, 1111)) .
We denote the top and bottom strings on the  -th tile by   and ℎ , respectively. Let   and  ℎ be
transducers as defined below. Intuitively, the transducer   outputs  1 for ‘1’,  2 for ‘2’, and does
not accept the empty string. The string  is a solution to the PCP if and only if   ( ) =  ℎ( ) .
 0
1/1111
2/1101
3/11
1/1111


3/11
2/1101
 0</p>
      <p>2/1
1/1110</p>
      <p>2/1
3/1111
1/1110


3/1111
called the string constraint of instance  .</p>
      <p>Regarding the string constraint  of the PCP instance  , the satisfiability is undecidable. We
consider  ′ such that ( )
⟹ 
′( ) and is eficiently decidable. Such
 ′ is referred to as a
relaxation problem (simply relaxation) of  . By showing that  ′ is unsatisfiable, we would like
to show that  is also unsatisfiable. For example, considering only the number of characters
|  ( )| = |
specific words is another example of  ′. Generalizing these examples, we have the following
ℎ( )| is suitable as  ′. Additionally, matching Parikh images or the number of
proposition.</p>
      <p>Proposition 2.3. Let  be an arbitrary total integer-vector-output transducer. Consider
 (  ( )) ∩  (
ℎ( )) ≠ ∅
(1)
This is a relaxation problem of  and is decidable. We set some  and hope it is infeasible.</p>
      <p>
        Although details are omitted, the condition  (
 ( )) ∩  (
ℎ( )) ≠ ∅ can be reduced to the
emptiness problem of a Parikh automaton constructed from  ,   ,  ℎ, and their product. The
Parikh automaton emptiness algorithm we use is largely similar to the one described in Section
3 of [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], so we omit the details. While not detailed here, our algorithm achieved significant
speedup by applying two techniques to this algorithm: (1) delaying and dynamically adding
constraints related to connectivity, and (2) reducing the problem to a natural form for Mixed
Integer Programming and leveraging a cutting-edge MIP solver.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. The Second Method: Transition System Formulation</title>
      <p>Intuitively, arranging each tile one by one represents a transition, and “the remaining part
of the string and whether it is on the top or bottom” represents a state. We call such a pair
configuration . PCP can be formulated as a reachability problem: “Is it possible to reach the state
of the empty string?”
Example 3.1. When arranging two tiles like 100
10 , the state representing it is “top,
remainder 010.” If a transition is made by appending 111 , the next state will be “top, remainder
1</p>
      <p>0
01
0111.”</p>
      <sec id="sec-3-1">
        <title>3.1. Problem Definition</title>
        <p>We formulate PCP as a reachability problem. First, we define the transition system of PCP.
Definition 3.2 (Transition System of PCP). Let  = (( 1, ℎ1), … , (  , ℎ )) be a PCP instance of
size  over Σ. We define the transition system   = (,  ,  , )
as follows.
• State set  = { top, bottom} × Σ∗.
• Transition function  ∶  → 2  is defined as follows.</p>
        <p>( bottom,  ) = {( bottom,  ′) ∣ ∃ ≤ .  ℎ  =    ′} ∪ {(top,  ′) ∣ ∃ ≤ .  ℎ   ′ =   }
 ( top,  ) = {( top,  ′) ∣ ∃ ≤ .  
 = ℎ  ′} ∪ {(bottom,  ′) ∣ ∃ ≤ .  
  ′ = ℎ }
• Bad state set  = {(
• Intial state set   =  (
top, ), ( bottom, )} .</p>
        <p>top, ) .</p>
        <p>The states after arranging one tile is considered the initial state, as an empty arrangement
is not valid.</p>
        <p>In the following,  is naturally extended and used as  ∶ 2  → 2 .</p>
        <p>The behavior of the transition  ( bottom,  ) is illustrated below. When  is the current state,
adding (  , ℎ ) results in the remaining part becoming the next state  ’ . There are two patterns:
one where the same side as the previous state continues, and one where the side changes.

 
ℎ

 ′

ℎ

 
 ′
(a) Pattern where the side doesn’t change
(b) Pattern where the side changes
Definition 3.3 (Reachability Problem of PCP). Does there exist  such that
  ( ) ∩  ≠ ∅
Definition 3.4 (Inductive Invariant of PCP). A set   that satisfies the following three
conditions is called an inductive invariant (simply invariant).</p>
        <p>•   ⊆  
•   is closed under  :  (  ) ⊆  
•   does not include  :  ∩   = ∅
Lemma 3.5. If  
exists, then it implies that 
is unreachable from initial states.</p>
        <p>In the following section, we introduce algorithms to discover   .</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Algorithm</title>
        <p>
          For the Reachability Problem, many powerful algorithms like PDR (Property Directed
Reachability)[
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] exist. We extended PDR and achieved some success (see Section 5). We also devised a
novel ad-hoc method specific to PCP, described below.
        </p>
        <p>Definition 3.6 (Configuration Automaton) . Let  ∈ { top, bottom} and  be a finite automaton
over Σ. We call the pair (, ) the configuration automaton. The language of (s, A) is denoted as
(, ) and defined as follows. This represents a state set of the transition system.</p>
        <p>(, ) = {(,  ) ∣  ∈ ()}</p>
        <p>The aim of this algorithm is to discover a pair of configuration automata (for top and bottom)
that represents   . It should be noted that not every   has such a pair due to the regularity
of the underlying automata, which limits the scope of our consideration.</p>
        <p>This algorithm manages a graph  = ( , ) where each node is a configuration automaton.
Specifically, each node  is associated with a set of states of a transition system. The algorithm
proceeds by expanding the overall union ( ) = ⋃ ( ) until it becomes an invariant.</p>
        <p>Intuitively, the edge (,  ) in this graph represents a dependency relationship. This
relationship means “if  cannot reach  , then  cannot reach  either”. If we can construct a graph
where every node has such dependencies and does not contain any bad state, then ( ) is an
invariant. There are two types of this relation, as follows.</p>
        <p>1. Inclusion relation: () ⊊ ( )
2. Transition relation:  (()) = ( )</p>
        <p>The algorithm is essentially a breadth-first search (BFS). When considering only the transition
relation, the process operates similarly to BFS. A distinctive feature of this algorithm is that
it proactively abstracts nodes. For example, when a node such as (top, 0011101) appears, the
algorithm attempts to create a node like (top, .∗110.∗) (we use a regex to represent an automaton)
and draw an edge to it. If this abstracted node can reach  , it is removed and backtracking is
performed.</p>
        <p>Figure 4 shows a successful execution example for 1111 0 1 . The square nodes
1 11 1100
represent nodes with singleton languages, and the round nodes are abstracted nodes with
regular expressions appearing in their labels. The dotted lines represent inclusion relations, and
the solid lines represent transition relations. Note that in this figure, the transition relations are
extended to  (where  ≥ 1 ) steps, with intermediate steps omitted.
top,111
top,.*0.*
bottom,100
top,.*1.*
top,.*00.*
bottom,001100
bottom,11100
top,1
bottom,11001100
bottom,.*0110.*</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Certificate Generation</title>
      <p>
        So far, we have presented two methods and complicated algorithms. However, there is a
significant possibility that my implementations for these algorithms may contain bugs. Even
if we successfully solve all instances of PCP[
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ], our results would still be far from being
considered trusted facts. Therefore, we decided to have our algorithm output proofs in the form
of Isabelle/HOL code.
      </p>
      <p>
        Another possible approach is to use Isabelle/HOL or similar tools to verify the correctness of
the algorithm’s implementation. However, this makes it dificult to optimize the algorithm for
speed. For instance, The first method relies on an external MIP solver for its eficiency, making
it challenging. Additionally, for others to quickly trust our results, it is crucial that all instances
of   [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ] and their proofs are organized and verified within some proof assistant such as
Isabelle/HOL.
      </p>
      <p>Currently, only the second method is capable of outputting a certificate. The first method
will be addressed as future work (see Section 6).</p>
      <sec id="sec-4-1">
        <title>4.1. Certificate: Pair of Automata</title>
        <p>Consider the transition system of a PCP instance. By defining the invariant concretely in
Isabelle/HOL and proving each of the invariant conditions (see Definition 3.4), we can validate
it. This method is independent of the implementation details used in the second method and
can be utilized by various algorithms discovering invariants.</p>
        <p>Our implementation of the second method generates the following code.
1. Definition of the PCP instance
2. Definition of  
a) The top-side Automaton
b) The bottom-side Automaton
3. Proof of the closedness of  
a) Definition of  (  ) (in the form of a specific pair of deterministic automata)
b) Concrete definition of the automaton for   ∩
c) Proof of   ∩  (  ) = ∅
d) Proof of   ∩  (  )
similarly, and show that  (  ) ⊆  
 (  )</p>
        <p>
          Proofs such as “the existence of   implies that the PCP has no solution” were conducted
manually in advance. Examples of complete proofs are found on the author’s GitHub
repository [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Application to PCP[3,4]</title>
      <p>
        In this research, we address the instances of PCP[
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ]. Ling Zhao (2003) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] attempted to solve all
these instances but left 3,170 unsolved. The list of these instances is available on his website [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
Our goal was to solve all instances of PCP[
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ], gradually reducing the number of unsolved
problems. As shown in Figure 5, the initial 3,170 unsolved problems were reduced to 127 using
the first method. After several additional methods, only 13 problems remained unsolved. These
remaining problems are listed on the author’s website [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>PDR, SAT, Method2(1), and Method2(2) are techniques for discovering   . Certificate
generation is implemented for those methods. The method SAT uses a SAT solver to discover   ,
while Method2(1) and Method2(2) difer in their abstraction methods.</p>
      <p>SAT
3170 cases
71 cases</p>
      <sec id="sec-5-1">
        <title>Method 1</title>
      </sec>
      <sec id="sec-5-2">
        <title>Method 2(1) 127 cases 26 cases PDR</title>
      </sec>
      <sec id="sec-5-3">
        <title>Method 2(2) 73 cases 13 cases</title>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion and Future Work</title>
      <p>
        We have been working for a complete resolution of PCP[
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ] and came close, with only 13
instances remaining unsolved. To have these results accepted as trusted facts, we also aim to
provide formal proofs using Isabelle/HOL for each instance, which has been achieved for the
second method. Although both goals are yet to be fully achieved, we believe they are attainable
as outlined below.
      </p>
      <p>To solve the remaining 13 problems, we consider two possibilities. One is to solve these
instances manually. We predict that most of the 13 problems do not have solutions, and providing
ad-hoc proofs by humans might be the quickest way. The other possibility involves devising
new variants of the methods in this paper or investing additional computational resources.
Since the manual approach can also help gain deeper insights into individual instances and PCP
itself, we would like to first aim for manual resolution.</p>
      <p>
        Generating certificates for the first method is challenging because it uses an external Mixed
Integer Programming (MIP) solver as a subroutine. Generating a certificate for the feasibility
of an MIP is straightforward, as it merely requires providing a specific solution. However,
generating a certificate for infeasibility is more dificult. Cheung et al. (2017) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] extended the
existing MIP solver SCIP to output easily verifiable certificates in their own format. We believe
that we can overcome this dificulty by converting these certificates into Isabelle/HOL code.
      </p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>This work was supported by JSPS KAKENHI Grant Number 19K11899 and 24K14891.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>E. L.</given-names>
            <surname>Post</surname>
          </string-name>
          ,
          <article-title>A variant of a recursively unsolvable problem</article-title>
          ,
          <source>Bulletin of the American Mathematical Society</source>
          <volume>52</volume>
          (
          <year>1946</year>
          )
          <fpage>264</fpage>
          -
          <lpage>268</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <article-title>Tackling Post's correspondence problem</article-title>
          ,
          <source>in: Computers and Games</source>
          , Springer Berlin Heidelberg,
          <year>2003</year>
          , pp.
          <fpage>326</fpage>
          -
          <lpage>344</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Lorentz</surname>
          </string-name>
          ,
          <article-title>Creating dificult instances of the post correspondence problem</article-title>
          ,
          <source>in: Computers and Games</source>
          , Springer Berlin Heidelberg, Berlin, Heidelberg,
          <year>2001</year>
          , pp.
          <fpage>214</fpage>
          -
          <lpage>228</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N.</given-names>
            <surname>Verma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Seidl</surname>
          </string-name>
          , T. Schwentick,
          <article-title>On the complexity of equational horn clauses</article-title>
          ,
          <year>2005</year>
          , pp.
          <fpage>337</fpage>
          -
          <lpage>352</lpage>
          . doi:
          <volume>10</volume>
          .1007/11532231_
          <fpage>25</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A. R.</given-names>
            <surname>Bradley</surname>
          </string-name>
          ,
          <article-title>Sat-based model checking without unrolling</article-title>
          ,
          <source>in: Proceedings of the 12th International Conference on Verification, Model Checking, and Abstract Interpretation</source>
          ,
          <source>VMCAI'11</source>
          , Springer-Verlag, Berlin, Heidelberg,
          <year>2011</year>
          , p.
          <fpage>70</fpage>
          -
          <lpage>87</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Omori</surname>
          </string-name>
          , pcp-proof, https://github.com/Mojashi/pcp-proof,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhao</surname>
          </string-name>
          , Pcp documents,
          <year>2002</year>
          . URL: https://webdocs.cs.ualberta.ca/~games/PCP.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Omori</surname>
          </string-name>
          , Unresolved problems,
          <year>2024</year>
          . URL: https://pcp-vis.pages.dev/gallery.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>K. K. H. Cheung</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Gleixner</surname>
            ,
            <given-names>D. E.</given-names>
          </string-name>
          <string-name>
            <surname>Stefy</surname>
          </string-name>
          ,
          <article-title>Verifying integer programming results</article-title>
          , in: F.
          <string-name>
            <surname>Eisenbrand</surname>
          </string-name>
          , J. Koenemann (Eds.),
          <source>Integer Programming and Combinatorial Optimization</source>
          , Springer International Publishing, Cham,
          <year>2017</year>
          , pp.
          <fpage>148</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>