Theoretical Computer Science 21 (1982) 119-144 North-Holland Publishing Company 119 THE (GENERALIZED) POST CORIRESPONDENCE PROBLEM WITH LISTS CONSISTING OF TWID WORDS ES DECIDABLE A. EHXENFEUCHT zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA Department of Cmpwter Science, zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCB Universityof Cosl~rado, Boulder, W.S.A. J. KARHUM&I Department of Mathematics, Universityof Th&Tku, I’urku, Finbznd G. ROZENBERG Institute of Applied Mathematics and Computer Science, Universityof Leidcn, zyxwvutsrqponmlkjihgfedcbaZ t eiden, l%e Net her lands Communicated by A. Salomaa Received September 1980 Revised May 1981 zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA 1. Introduction The Post Correspondence Problem, considered first by E. Post in [12], is perhaps the most useful problem as far as undecidable properties of formal languages are concerned (see, e.g., [8,9,13]). It can be formulated as Mows. Let C be an alphabet and let h, zyxwvutsrqponmlkjihgfe g be twlo homomorphisms of C *. The zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFED Post Correspondence Probiem {PCP for shoj_?) is to determine whether or not there exists a sword w in Z’ such that zyxwvutsrqponmlkjihgfedcbaZ h(w) = g! w ). If #C = n, then we say that we dean with the Pwt Corresponchmce iaroblem of lozgfh n (PCP(n) for short). The set of solutions of an instance of PCP (that is the set of all words saj:si ying the equation h(w) = g(w)) is referred to as an equa&ty langzI/age. The “descriptill~nal power” of PCP stems from the fact rhat it is able to code computations by arklitrary Turing machines. This is reflected in the fact that equality languages form a rtatural base in several characterizations of the class of recursively enumerable larlau:ages and its various subclasses (see, e.g., [ 1,2,5, MS]). One particular aspect of PCP attracted quite a lot of attention. Since it is such a simply/ formulated problem of such a SWOII~~ descriptional power, it fol*mnsan excellent framework for an attempt to formulate a boundary between “decic:iable” and “undecidable” (or “computable” and “ploncol~putable”). In other worrls one would like to establish as small as possible II such that PCP(u) is un&Gdable and as bie, as possible bound k such %at K’P(l) is decidable. Tke slmalles+ poss.ible u 0304-3975/82/0000-0000/$02,75 @ 1982 North-Holland