betaFeedback

WorksComputer Science

A detailed verification of Neary's PCP(5) construction

Abstract

Neary proved that the Post correspondence problem remains undecidable for instances with five pairs of words. We give a detailed verification of his construction. We first verify the undecidability of the restricted binary tag-system halting problem used in the reduction. We then prove both directions of the reduction to the five-pair problem, using the longer closing pair proposed by Rote. In particular, we show that every solution of the constructed PCP instance yields a halting computation of the simulated tag system.

Introduction

An instance of the Post correspondence problem [5] consists of a finite list of pairs of words (ui,vi)(u_i,v_i) over a common alphabet. A solution is a nonempty sequence i1,…,iti_1,\ldots,i_t, with repetitions allowed, such that

ui1⋯uit=vi1⋯vit.u_{i_1}\cdots u_{i_t}=v_{i_1}\cdots v_{i_t}.

We write PCP⁡(k)\operatorname{PCP}(k) for the restriction to instances containing exactly kk pairs. This article concerns the undecidability of PCP⁡(5)\operatorname{PCP}(5), already over the binary alphabet {0,1}\{0,1\}.

Matiyasevich and Sénizergues established undecidability for a three-rule semi-Thue system and thereby obtained a PCP⁡(7)\operatorname{PCP}(7) construction [2]. They used Claus’s reduction from the word problem of nn-rule semi-Thue systems to PCP⁡(n+4)\operatorname{PCP}(n+4) [1]. Neary proved PCP⁡(5)\operatorname{PCP}(5) undecidable using binary tag systems [3]. The purpose of this article is to give a detailed verification of Neary’s construction.

Neary’s construction uses an encoding principle similar to that of Matiyasevich and Sénizergues. The program of the simulated system is encoded in a single production. In Neary’s binary tag system, the right-hand side UbUb of the rule c→Ubc \to Ub encodes the entire cyclic tag program, while the other rule is b→bb \to b. The track at which UbUb is read selects the appropriate instruction.

Several readers have asked about the reverse implication in Neary’s proof, which is difficult to reconstruct from the short published argument. § 2 verifies the restricted tag-system construction used in the reduction. We identify the halt instruction in the cyclic simulation, show how the binary tag system detects it, and verify the length congruence that makes bb the unique terminal word on the designated computations. Sections 3 and 4 verify both directions of Neary’s five-pair reduction using Rote’s longer closing pair [6 Section 2.8, footnote 3].

The restricted binary tag systems

We index the positions of a word from zero. Thus, for a word v=v0v1⋯vn−1v = v_0v_1 \cdots v_{n-1} of length nn, viv_i denotes the symbol at position ii, where 0≤i<n0 \le i < n.

A tag system is a triple T=(A,R,β)T = (A, R, \beta), where AA is a finite alphabet, R:A→A∗R : A \to A^* assigns a production word to each letter, and β≥1\beta\ge1 is the deletion number. A configuration is a word over AA, called the dataword. If the dataword is a0⋯an−1a_0 \cdots a_{n-1} with n≥βn \ge\beta, one step gives

a0⋯an−1⟼aβ⋯an−1R(a0).a_0 \cdots a_{n-1} \longmapsto a_\beta\cdots a_{n-1}R(a_0).

The system halts when the dataword has length less than β\beta. It is binary when its alphabet has two letters.

We construct the family used in the PCP reduction by simulating a Turing machine first with a cyclic tag system and then with a binary tag system. The cyclic simulation supplies a distinguished instruction that signals halting. A Turing machine MM is deterministic and has a single tape indexed by Z\mathbb{Z}. It has a finite state set, an initial state, a designated halting state, and a finite tape alphabet with a blank symbol. For every nonhalting state and scanned symbol, the transition function specifies a new state, a symbol to write, and a move one cell to the left or right. On input yy, the letters of yy occupy consecutive cells starting at cell 0, all other cells are blank, and the head starts at cell 0 in the initial state. The machine halts upon entering its halting state.

The cyclic halt signal

Clockwise Turing machines. A binary clockwise Turing machine is a tuple R=(QR,ΣR,δR,qin,qh)R = (Q_R, \Sigma_R, \delta_R, q_{\mathrm{in}}, q_{\mathrm{h}}), where QRQ_R is a finite state set, ΣR={A,B}\Sigma_R = \{A, B\} is the tape alphabet, and qin,qh∈QRq_{\mathrm{in}}, q_{\mathrm{h}} \in Q_R are the initial and halting states. Its transition function is

δR:(QR∖{qh})×ΣR⟶QR×(ΣR∪ΣR2).\delta_R : (Q_R \setminus\{q_{\mathrm{h}}\}) \times\Sigma_R \longrightarrow Q_R \times(\Sigma_R \cup\Sigma_R^2).

Represent a configuration by (q,au)(q, au), where auau is the nonempty tape word in clockwise order, starting at the scanned symbol aa. If δR(q,a)=(q′,v)\delta_R(q, a) = (q', v), the next configuration is (q′,uv)(q', uv). This replaces the scanned cell by the one or two letters of vv and places the head immediately after the replacement in clockwise order. The machine halts in qhq_{\mathrm{h}}. The construction of Neary and Woods gives a binary clockwise simulator RMR_M of MM. For each input yy, let τy∈{A,B}+\tau_y \in\{A, B\}^+ denote the initial tape word that this construction gives for RMR_M, written in clockwise order starting at the scanned cell. Thus RMR_M halts from (qin,τy)(q_{\mathrm{in}}, \tau_y) if and only if MM halts on yy [4 Section 2 and Lemma 1].

Cyclic tag systems. A cyclic tag program is a nonempty list of binary words α0,…,αp−1\alpha_0,\ldots,\alpha_{p-1}. A configuration is a pair (m,w)(m,w), where 0≤m<p0 \le m < p is the current instruction index and w∈{0,1}∗w \in\{0,1\}^* is the queue, with its front at the left. Put m′=(m+1) mod pm'=(m+1)\bmod p. For each binary word vv, the step relation is

(m,0v)⟶(m′,v),(m,1v)⟶(m′,vαm).\begin{aligned} (m,0v)&\longrightarrow(m',v),\\ (m,1v)&\longrightarrow(m',v\alpha_m). \end{aligned}

Thus a step reads and deletes the leftmost bit. If that bit is 1, it appends αm\alpha_m at the right end, using the index before the step. An empty queue admits no step. Instruction hh fires precisely on a step from (h,1v)(h,1v).

Lemma 1. Given an ordinary single-tape Turing machine MM and an input word yy, one can effectively construct a cyclic tag program α0,…,αp−1\alpha_0,\ldots,\alpha_{p-1}, a nonempty initial queue ww at index zero, and a distinguished index 0<h<p0<h<p with the following properties.

  1. Instruction hh fires if and only if MM halts on yy. If MM does not halt, the cyclic computation has infinitely many steps.

  1. If the queue is 1r1r just before the first firing of hh, then hh does not fire during the next ∣r∣|r| steps after that firing, which consume the bits of rr.

Proof. First construct RMR_M and the initial tape word τy\tau_y as above. The cyclic tag program simulates this clockwise machine. We use the construction in the proof of [4 Section 3.1, Lemma 2]. Put N=∣QR∣N=|Q_R|, z=30N+61z=30N+61, and p=2zp=2z. Number the states so that qh=qNq_h=q_N.

The (initial) configuration is encoded to the tag-system in the following way. The ordinary state and tape codewords and the counter word are

Si=030i+2010p−30i−21,S_i=0^{30i+20}1 0^{p-30i-21},
TA=010p−2,TB=0010p−3,T_A=01 0^{p-2}, \qquad T_B=001 0^{p-3},
μ=10z−1.\mu=1 0^{z-1}.

Extend TT to words by concatenating the tape codewords. For a nonempty tape word τ\tau, let K(τ)K(\tau) be the least power of two at least ∣τ∣|\tau|. For qi=qinq_i=q_{\mathrm{in}}, the initial cyclic configuration is

(0,w),w=SiT(τy)μK(τy).(0,w), \qquad w=S_iT(\tau_y)\mu^{K(\tau_y)}.

This is equation (3) of Neary and Woods.

From [4] we get the following details: For every 0≤n<p0 \le n < p, use the following rule. At the reserved index h=30N+20h=30N+20 set αh=SN\alpha_h=S_N, as in the halting case of Neary and Woods. For all other indices use the assignments in their Tables 1.1, 1.2, 2.1, 3.1 and 3.2, substituting the states and transitions of RMR_M. Each row specifies the index of the appendant and the binary word to assign to it. In Table 3.1 choose the transition row with the write length specified by δR\delta_R for the indicated state and tape symbol. Assign the empty word to every index left unassigned. These rules give the entire program effectively.

Neary and Woods simulate a clockwise transition in three stages. The first two use the counter to mark and isolate the scanned tape symbol. The third uses the current state and the isolated symbol to select the transition of RMR_M, writes the replacement symbols and the new state, and restores the ordinary tape codewords. If the tape grows beyond the current counter value, Table 3.2 doubles that value. Each simulated transition takes finitely many cyclic tag steps and returns the instruction index to zero.

For example, starting from (0,SiT(au)μK(au))(0,S_iT(au)\mu^{K(au)}), a transition δR(qi,a)=(qk,v)\delta_R(q_i,a)=(q_k,v) gives the boundary configuration

(0,T(v)SkT(u)μK(uv)).(0,T(v)S_kT(u)\mu^{K(uv)}).

Reading the tape codewords in circular order from SkS_k gives the tape word uvuv, starting at the new scanned cell.

In the halting case of the simulation [4 Section 3.1, end of the proof of Lemma 2], the ordinary codeword for qN=qhq_N=q_h is entered at index zero. Its unique 1 therefore fires instruction hh, since

SN=0h10p−h−1=αh.S_N = 0^h10^{p-h-1} = \alpha_h.

To see that hh cannot fire earlier, consider a cyclic step that reads a 1 during the simulation of a nonhalting transition. For each encoded object, Tables 1.1–3.2 of Neary and Woods give both the marker index on entry and the appendant index at which the object’s 1 is read. Thus it suffices to check the appendant-index column. Among the state-dependent indices below zz, the only ones congruent to 20 modulo 30 are of the form 30i+2030i+20. These occur when an ordinary state word SiS_i is entered at index zero. The fixed indices below zz are at most 42<h42<h, and every index at least zz exceeds hh. In particular, when Table 3.2 copies a new state word SkS_k during counter doubling, the selected index is 30k+6030k+60. Thus hh fires exactly when the simulation reaches the halting state. If RMR_M runs forever, its successive transitions give infinitely many cyclic tag steps.

At the transition boundary where the halt state is first represented, the queue contains a single state word SNS_N. Any tape words preceding SNS_N are read at index zero and copied to the rear before SNS_N is entered. When its unique 1 fires instruction hh, the unread suffix rr therefore consists of the p−h−1p-h-1 trailing zeros of SNS_N followed by complete tape and counter words. After the trailing zeros the index is zero. Each tape word has length p=2zp=2z and has its 1 at offset 1 or 2. Each counter word is 10z−110^{z-1} and has length zz. Consequently the object boundaries are entered at index 0 or zz, and the 1’s in these objects occur only at indices in {0,1,2,z,z+1,z+2}\{0,1,2,z,z+1,z+2\}, all distinct from hh. The new copy of SNS_N is appended behind rr, so no bit of that copy is read during the next ∣r∣|r| steps. This proves the second property.

The restricted halting problem

The following construction uses the track method from Lemma 9 of [3] and the length congruence used in Neary’s Theorem 11.

Lemma 2. Given a Turing machine MM and input yy, one can effectively construct a deletion number β≥2\beta\ge2 and a binary tag system with productions R(b)=bR(b)=b, R(c)=UbR(c)=Ub,

where U=u0⋯uℓU = u_0 \cdots u_{\ell}. On the designated input

w0=uβ−1uβ⋯uℓbw_0 = u_{\beta-1}u_{\beta}\cdots u_{\ell}b

the system halts if and only if MM halts on yy. For the constructed β\beta, one may prescribe ∣Ub∣=sβ|Ub| = s\beta for every sufficiently large s≡1(modβ−1)s \equiv1 \pmod{\beta- 1}.

Proof. We use Neary’s method of storing the cyclic tag program in the tracks of one production word. We give every ordinary output the same initial padding. This allows a single track formula even for an empty cyclic appendant.

Take the cyclic program α0,…,αp−1\alpha_0,\ldots,\alpha_{p-1}, initial word ww, and halt instruction hh from Lemma 1.

Put β=10p\beta= 10p and write P=UbP = Ub for the production word to be constructed, of length sβs\beta. For 0≤j<β0 \le j < \beta, define its jj-th track by

Tj=PjPj+β⋯Pj+(s−1)β.T_j = P_jP_{j+\beta}\cdots P_{j+(s-1)\beta}.

These tracks partition the positions of PP. A prescription for every TjT_j therefore determines PP. Extend the productions to a morphism φ\varphi by φ(b)=b\varphi(b) = b, φ(c)=P\varphi(c) = P. If a traversal first reads position jj of a copy of PP, it reads TjT_j and appends φ(Tj)\varphi(T_j). More generally, the first read position in a block is called its offset. On leaving a block of length dd entered at offset zz, the offset into the next block is z−d(modβ)z-d \pmod{\beta}, since consecutive read positions differ by β\beta. Offsets in what follows are least nonnegative residues.

Let G=PG = P, and define three further blocks and their short encodings by

paddingshort encodingblock
0e=b4cb6e = b^4cb^6E=b4Pb6E = b^4Pb^6
0x0=b6cb4x_0 = b^6cb^4X0=b6Pb4X_0 = b^6Pb^4
1x1=b8cb2x_1 = b^8cb^2X1=b8Pb2X_1 = b^8Pb^2

Table 1.

For a bit word vv, write x(v)x(v) and X(v)X(v) for the corresponding concatenations. Thus φ(e)=E\varphi(e) = E and φ(x(v))=X(v)\varphi(x(v)) = X(v). We use GG and complete groups EpE^p as padding. The offset representing program index mm is

zm=(1−10m)mod⁡β.z_m = (1 - 10m) \mathbin{\operatorname{mod}} \beta.

Reading GG preserves the offset. Each of EE, X0X_0, X1X_1 has length sβ+10s\beta+ 10, so it takes zmz_m to zm+1mod⁡pz_{m+1} \mathbin{\operatorname{mod}} p. In particular EpE^p preserves the incoming index.

We now prescribe the tracks used by the ordinary blocks. Take a∈{4,6,8}a \in\{4,6,8\} and enter baPb10−ab^aPb^{10-a} at offset zmz_m. Inside PP the track is TjT_j, where j=(zm−a)mod⁡βj = (z_m-a) \mathbin{\operatorname{mod}} \beta. For m=0m = 0, the offset is 1, so the traversal reads one leading bb followed by TjT_j. For m>0m > 0, the offset is at least 11 and it reads exactly TjT_j. Indeed the block contains s+1s+1 sampled positions when zm=1z_m = 1, and ss when zm≥11z_m \ge11. In both cases the ss samples inside PP exhaust all reads after the possible leading bb.

Let δm=1\delta_m = 1 when m=0m = 0, and 0 otherwise. Take v=εv = \varepsilon for EE and X0X_0, and v=αmv = \alpha_m for X1X_1 with m≠hm \ne h. Prescribe the word read across the whole block as

D=epx(v)ct,t=s+δm−11p−11∣v∣.D = e^p x(v)c^t,\qquad t = s + \delta_m - 11p - 11|v|.

The short encodings have length 11, so DD has length s+δms+\delta_m. It begins with bb. For m>0m>0 put Tj=DT_j=D; for m=0m=0 remove the first bb of DD to obtain TjT_j. In either case the block appends precisely

φ(D)=EpX(v)Gt.\varphi(D)=E^pX(v)G^t.

Thus even an empty vv produces only complete padding. For GG itself put Tzm=csT_{z_m}=c^s, giving the output GsG^s.

For X1X_1 at index hh prescribe T(zh−8) mod β=bcs−1T_{(z_h-8)\bmod\beta}=bc^{s-1}. As h>0h>0, the whole block reads this track and appends H=bGs−1H=bG^{s-1}. Set all even tracks equal to bsb^s. Finally put

Tβ−1=bβ−2X(w)ckep,k=s−(β−2)−11∣w∣−11p.T_{\beta-1}=b^{\beta-2}X(w)c^ke^p,\qquad k=s-(\beta-2)-11|w|-11p.

The residues modulo 10 of the tracks for GG, EE, X0X_0, X1X_1 are 1, 7, 5, 3, respectively. Within each class the pp program indices give distinct tracks modulo 10p10^p. The input track has residue 9; all the even tracks are separate. The exceptional track takes the place of the X1X_1 track at hh. Fill remaining tracks with bsb^s. These assignments are effective. Take any s≡1(modβ−1)s\equiv1\pmod{\beta-1} large enough that s≥2β+3s\ge2\beta+3, k≥0k\ge0, and every ordinary exponent tt is nonnegative. The last letter of PP is the last letter of Tβ−1T_{\beta-1}, namely bb. Hence P=UbP=Ub as required.

We are ready to study the computation of the binary tag system defined. Deleting the first β−1\beta-1 letters of PP gives exactly w0w_0. A traversal of this suffix reads Tβ−1T_{\beta-1} and appends bβ−2X(w)GkEpb^{\beta-2}X(w)G^kE^p. The suffix has length (s−1)β+1(s-1)\beta+1, so the last deletion extends β−1\beta-1 places into the output. It consumes the prefix bβ−2b^{\beta-2} and one letter of X(w)X(w). The first encoded bit is therefore entered at 1=z01=z_0.

To justify this and all subsequent block traversals, consider even the case in which no further block is waiting behind the current one. The initial suffix and every ordinary block, at every entry offset used here, contain at least ss sampled positions. Up to the last sample each deletion fits inside the block, since another sample lies β\beta positions ahead. By the last sample at least s−1s-1 letters have already been appended. They supply the at most β−1\beta-1 additional letters required by that deletion. This also applies to each copy of GG traversed inside HH.

Before the exceptional track is used, consider a boundary between successive traversals of units X0X_0, X1X_1, GG, EpE^p, treating each complete group EpE^p as one unit. The preceding deletion may already have consumed a prefix of the first pending unit. Its entry offset records the length of that prefix.

The simulation invariant is that the pending units, with each GG and EpE^p omitted and each XiX_i replaced by ii, give the current cyclic queue. If the current instruction is mm, the entry offset at the boundary is zmz_m. Initialization establishes the invariant with queue ww and offset z0=1z_0=1. Traversing GG or EpE^p preserves the offset and appends only padding. Traversing XiX_i advances the offset to z(m+1) mod pz_{(m+1)\bmod p} and appends, apart from padding, the encoding of αm\alpha_m if i=1i=1 and of the empty word if i=0i=0, provided (i,m)≠(1,h)(i,m)\ne(1,h). This proves the invariant by induction over the traversed units.

Every pending encoded bit is reached after finitely many traversals. Only finitely many units precede it, and their outputs are appended behind it. Thus an infinite cyclic computation gives infinitely many legal binary tag steps.

When instruction hh first fires, the exceptional track appends HH. The encoded bits already ahead of HH are precisely the bits of the suffix rr in Lemma 1. Their instruction indices and actions are unaffected by the replacement of the cyclic output at the rear by HH. Lemma 1 ensures that none of these bits fires hh. Only finitely many units precede HH, and their outputs are appended behind it, so HH is reached after finitely many traversals. All the units then waiting behind HH are ordinary ones.

The entry offset of HH is odd, since all ordinary block lengths are even and all normal offsets are odd. Its initial bb is skipped, so the offset in its first GG is one less and hence even. All remaining copies of GG in HH are also entered at even offsets. They read only bb’s and append only bb’s. The ordinary blocks waiting behind HH all have even length, and the padding before their internal PP has even length. Each therefore preserves even parity and reads only bb’s, both inside PP and in its padding. After this finite traversal the dataword consists entirely of bb’s. Every further step shortens it by β−1>0\beta-1>0, so it halts. This proves the equivalence and hence the undecidability of halting on the designated family. □

Lemma 3. Every dataword reachable from w0w_0 is nonempty, ends in bb, and has length congruent to 11 modulo β−1\beta-1. The computation halts if and only if it reaches the one-letter word bb.

Proof. The initial length is (s−1)β+1(s-1)\beta+1. A bb-step changes it by 1−β1-\beta, and a cc-step by (s−1)β(s-1)\beta. Both changes preserve the congruence. The initial word and both productions end in bb, so every reachable word is nonempty and ends in bb. Its only possible length below β\beta is therefore 1. □

The PCP(5) instance

The PCP(5) simulation uses UU only as a word over {b,c}\{b,c\}. It does not decode the cyclic program stored in that word. Define the morphism

⟨⋅⟩:{b,c}∗⟶{0,1}∗\langle\cdot\rangle: \{b,c\}^{*} \longrightarrow\{0,1\}^{*}

by

⟨b⟩=10β1,⟨c⟩=1,\langle b\rangle= 10^{\beta}1,\qquad\langle c\rangle= 1,

and extend it by concatenation:

⟨x1⋯xm⟩=⟨x1⟩⋯⟨xm⟩,⟨ε⟩=ε.\langle x_1\cdots x_m\rangle= \langle x_1\rangle\cdots\langle x_m\rangle,\qquad\langle\varepsilon\rangle= \varepsilon.

In particular, ⟨U⟩\langle U\rangle is obtained by encoding each letter of UU. The PCP pairs reproduce the tag steps using this encoding, independently of the interpretation of the individual letters inside UU. The converse shows that every PCP solution yields a halting tag computation.

A block of a symbol is a nonempty word consisting only of copies of that symbol. A block occurring in a word is maximal if it cannot be extended to either side by another occurrence of the same symbol.

For the closing pair FF, we use Rote’s longer block of 1’s [6 Section 2.8, footnote 3]. Every block of cc’s in either production word has length at most ∣Ub∣−1|Ub|-1, since the production words are bb and UbUb, both ending in bb. The same bound holds in every reachable dataword: the initial word is a suffix of UbUb, deleting a prefix cannot lengthen a block of cc’s, and any remaining suffix ends in bb. Thus no block of cc’s can extend across the boundary with the appended production word.

Set

B=⟨b⟩=10β1,V=⟨U⟩,L=∣Ub∣+99.B=\langle b\rangle=10^{\beta}1,\qquad V=\langle U\rangle,\qquad L=|Ub|+99.

We form exactly five binary pairs, displayed as (upper word, lower word):

pairupperlowerA11V10B+B110B−B0C−10F10β1L1L(1)\begin{array}{c|c|c} \text{pair} & \text{upper} & \text{lower}\\ A & 1 & 1V10\\ B_{+} & B & 110\\ B_{-} & B & 0\\ C_{-} & 1 & 0\\ F & 10^{\beta}1^{L} & 1^{L} \tag*{(1)} \end{array}

The first four pairs are Neary’s. The longer closing pair FF, suggested by Rote [6], replaces his (10β1111,1111)(10^{\beta}1111,1111), without increasing the pair count. The proof of Lemma 7 uses only the inequality L>∣Ub∣+1L>|Ub|+1. To see the issue with the original exponent 4, consider a word ww beginning with bccbbccb. Its overhang Z(w)Z(w) begins with 10β1410^{\beta}1^{4}, so the upper word of the original closing pair matches this prefix. The pair AA initializes and later represents a cc-rule; B+B_{+} represents a bb-rule; B−,C−B_{-},C_{-} delete letters.

For w=xbw=xb, where x∈{b,c}∗x\in\{b,c\}^{*}, define

Z(w)=⟨x⟩10β.(2)Z(w)=\langle x\rangle10^{\beta}. \tag*{(2)}

In particular, Z(b)=10βZ(b)=10^{\beta}. The final bb is represented by a truncated BB. Let rr and vv be the upper and lower concatenations corresponding to a prefix of a PCP solution. If v=rZ(w)v=rZ(w), then the unmatched suffix Z(w)Z(w) of the lower concatenation is called the lower overhang. It represents the tag dataword ww.

Starting with AA leaves the lower overhang V10V10. For j=0,…,β−2j=0,\ldots,\beta-2, use B−B_{-} if uj=bu_j=b, and C−C_{-} if uj=cu_j=c. Their upper words consume the first β−1\beta-1 encoded letters of UU, and their lower words extend the terminal 1010 to 10β10^{\beta}. The resulting lower overhang is

⟨uβ−1⋯uℓ⟩10β=Z(w0),\langle u_{\beta-1}\cdots u_{\ell}\rangle10^{\beta}=Z(w_0),

where w0=uβ−1⋯uℓbw_0=u_{\beta-1}\cdots u_{\ell}b.

At a nonhalting word, use AA or B+B_{+} according as its first letter is cc or bb; then delete the following β−1\beta-1 letters with C−C_{-} or B−B_{-}. Lemma 6 verifies the exact word identity. At the halting word bb, Z(b)=10βZ(b)=10^{\beta}; using FF makes the two concatenations equal since 10β1L=10β1L10^{\beta}1^{L}=10^{\beta}1^{L}. Thus every halting computation yields a PCP solution. This forward simulation is due to Neary [3 proof of Theorem 11]; the word identities for each simulated tag step are verified in Lemma 6 below. Here we use Rote’s longer closing pair [6].

The converse: a PCP solution yields halting

In any PCP solution, the upper and lower concatenations of every prefix are prefixes of the eventual common word. Thus one is a prefix of the other. When the current lower concatenation is the upper concatenation followed by zz, and a pair (a,d)(a,d) has aa as a prefix of zz, the new lower overhang is

z′=a−1zd.(3)z' = a^{-1}zd. \tag*{(3)}

More generally, if (a,d)(a,d) is the next pair in a solution, then aa and zdzd must be prefix-comparable, since both are prefixes of the remaining part of the eventual common word. Hence a disagreement within their common range cannot be repaired by later pairs.

We first establish the form of any PCP solution up to its first occurrence of FF.

Lemma 4. Every solution starts with AA and ends with FF. Up through its first occurrence of FF, it has the form

AD1,1⋯D1,β−1 T2D2,1⋯D2,β−1 ⋯ TkDk,1⋯Dk,β−1 F,(4)AD_{1,1}\cdots D_{1,\beta-1}\ T_2D_{2,1}\cdots D_{2,\beta-1}\ \cdots\ T_kD_{k,1}\cdots D_{k,\beta-1}\ F, \tag*{(4)}

where Ti∈{A,B+}T_i \in\{A,B_+\} and Di,j∈{B−,C−}D_{i,j} \in\{B_-,C_-\}.

Proof. Only AA can start an equality. Both its words begin with 1, whereas the lower words of B−,C−B_-, C_- start with 0, and those of B+,FB_+, F start with 11 while their upper words start with 10. Every upper word ends in 1, whereas only the lower word of FF ends in 1. Hence every complete match ends in FF.

Every maximal block of zeros in an upper word has length β\beta. Since every upper word begins and ends in 1, the same holds for every concatenation of upper words. Every maximal block of zeros in V=⟨U⟩V = \langle U\rangle has length β\beta. The lower word of each AA or B+B_+ ends in 10, starting a zero block of length 1. Each deletion pair contributes one zero and no production or closing pair can contribute a zero at this boundary. Exactly β−1\beta- 1 deletion pairs must therefore follow each occurrence of AA or B+B_+ before the next occurrence of AA, B+B_+, or FF. Apply this from the initial AA up to the first FF. A solution may continue after its first occurrence of FF; only the prefix through that occurrence is considered here.

The next lemma shows that the initial group of pairs produces the encoding of the prescribed tag input.

Lemma 5. Assume that a PCP solution has the form (4). After its initial sequence

AD1,1⋯D1,β−1,AD_{1,1}\cdots D_{1,\beta-1},

the lower overhang is Z(w0)Z(w_0). Moreover, for j=0,…,β−2j = 0,\ldots,\beta- 2, the pair D1,j+1D_{1,j+1} is uniquely determined by uju_j:

D1,j+1={B−,uj=b,C−,uj=c.D_{1,j+1} = \begin{cases} B_-, & u_j = b,\\ C_-, & u_j = c. \end{cases}

:::`

Proof. Immediately after AA, the lower overhang is ⟨U⟩10\langle U\rangle10, where U=u0⋯uℓU=u_0\cdots u_\ell. By (4), the next β−1\beta-1 pairs are D1,1,…,D1,β−1D_{1,1},\ldots,D_{1,\beta-1}, each belonging to {B−,C−}\{B_-,C_-\}.

We show successively that D1,j+1D_{1,j+1} is determined by uju_j, for j=0,…,β−2j=0,\ldots,\beta-2. After the first jj deletion pairs have been applied as prescribed, the lower overhang is

⟨uj⋯uℓ⟩10j+1\langle u_j\cdots u_\ell\rangle10^{j+1}

If uj=bu_j=b, the upper word of B−B_- consumes ⟨b⟩=10β1\langle b\rangle=10^\beta1. Choosing C−C_- instead would consume only its first 11, leaving a leading zero. Since every upper word begins in 11, this choice is incompatible with a PCP solution.

If uj=cu_j=c, the overhang begins in 1111: the first 11 encodes uju_j, and the second begins the next code, or the terminal 10j+110^{j+1}. Thus B−B_-, whose upper word begins in 1010, cannot be used, and C−C_- is forced.

In either case the chosen pair consumes ⟨uj⟩\langle u_j\rangle and appends one zero to the lower concatenation. Consequently, after AD1,1⋯D1,β−1AD_{1,1}\cdots D_{1,\beta-1}, the lower overhang is

⟨uβ−1⋯uℓ⟩10β=Z(w0)\langle u_{\beta-1}\cdots u_\ell\rangle10^\beta=Z(w_0)

as required.

The next lemma shows that each subsequent group TiDi,1⋯Di,β−1T_iD_{i,1}\cdots D_{i,\beta-1} represents exactly one tag step.

Lemma 6. Assume that a PCP solution has the form (4), and let 2≤i≤k2\le i\le k. Suppose that immediately before the occurrence of TiT_i, the lower overhang is Z(w)Z(w), where

w=x0x1⋯xm−1w=x_0x_1\cdots x_{m-1}

is a reachable tag dataword with m≥βm\ge\beta. Then the pairs in the sequence

TiDi,1⋯Di,β−1T_iD_{i,1}\cdots D_{i,\beta-1}

are uniquely determined by the first β\beta letters of ww. Specifically,

Ti={B+,x0=b,A,x0=c,Di,j={B−,xj=b,C−,xj=c,(1≤j≤β−1).T_i= \begin{cases} B_+, & x_0=b,\\ A, & x_0=c, \end{cases} \qquad D_{i,j}= \begin{cases} B_-, & x_j=b,\\ C_-, & x_j=c, \end{cases} \qquad(1\le j\le\beta-1).

After this sequence, the lower overhang is Z(w′)Z(w'), where

w′=xβ⋯xm−1R(x0)w'=x_\beta\cdots x_{m-1}R(x_0)

is the tag successor of ww. When m=βm=\beta, the suffix xβ⋯xm−1x_\beta\cdots x_{m-1} is empty.

Proof. Since ww is reachable, its last letter is bb. Thus xm−1=bx_{m-1}=b, and

Z(w)=⟨x0⋯xm−2⟩10βZ(w)=\langle x_0\cdots x_{m-2}\rangle10^\beta

By (4), TiT_i is either AA or B+B_+.

If x0=cx_0 = c, the lower overhang begins with 11: the first 1 encodes x0x_0, and the second begins the representation of the next letter. The upper word of B+B_+ begins with 10, so Ti=AT_i = A is forced. If x0=bx_0 = b, the lower overhang begins with B=10β1B = 10^\beta1. Choosing AA would consume only its first 1, leaving a leading zero. Since every upper word begins in 1, this would be incompatible with a PCP solution. Hence Ti=B+T_i = B_+ is forced.

To treat both cases together, put

y={U,x0=c,ε,x0=b.y = \begin{cases} U, & x_0 = c,\\ \varepsilon, & x_0 = b. \end{cases}

Then R(x0)=ybR(x_0) = yb. In either case the upper word of TiT_i is ⟨x0⟩\langle x_0\rangle, and its lower word is 1⟨y⟩101\langle y\rangle10. Immediately after TiT_i, the lower overhang is therefore

⟨x1⋯xm−2⟩10β1⟨y⟩10=⟨x1⋯xm−1⟩⟨y⟩10.\langle x_1\cdots x_{m-2}\rangle10^\beta1\langle y\rangle10 = \langle x_1\cdots x_{m-1}\rangle\langle y\rangle10.

Here the first 1 of the appended lower word completes the truncated representation 10β10^\beta of the old final bb to its full code BB.

The deletion pairs Di,1,…,Di,β−1D_{i,1},\ldots,D_{i,\beta-1} are now forced by the same argument as in the proof of Lemma 5: for 1≤j≤β−11 \le j \le\beta- 1, we must use B−B_- if xj=bx_j = b, and C−C_- if xj=cx_j = c. Indeed, each of these symbols has its full code in the overhang, including the final bb when m=βm = \beta.

Each deletion pair consumes ⟨xj⟩\langle x_j\rangle and appends one zero. Hence, after all β−1\beta- 1 deletion pairs, the lower overhang is

⟨xβ⋯xm−1⟩⟨y⟩10β=Z(xβ⋯xm−1yb)=Z(w′).\langle x_\beta\cdots x_{m-1}\rangle\langle y\rangle10^\beta = Z(x_\beta\cdots x_{m-1}yb) = Z(w').

Here xβ⋯xm−1x_\beta\cdots x_{m-1} is understood to be empty when m=βm = \beta. Thus the sequence represents exactly one tag step in every case.

The same identities also show that, starting with Z(w)Z(w), the prescribed pairs can always be appended to obtain Z(w′)Z(w'), without assuming a complete PCP solution.

Lemma 7. Assume that a PCP solution has the form (4). Suppose that immediately before its first FF, the lower overhang is Z(w)Z(w) for a reachable tag word ww. Then w=bw = b, and this occurrence of FF makes the upper and lower concatenations equal. Conversely, if the lower overhang is Z(b)Z(b), applying FF gives equality.

Proof. Recall that the upper and lower words of FF are 10β1L10^\beta1^L and 1L1^L, respectively, where L=∣Ub∣+99L = |Ub| + 99.

If ww starts with cc, then Z(w)Z(w) begins with 11, since ww ends in bb. This is incompatible with the upper word of FF, which begins with 10.

Suppose that ww starts with bb and ∣w∣>1|w| > 1. Since ww ends in bb, write w=bcrbtw = bc^rbt for some r≥0r \ge0. The run bound in § 3 gives r≤∣Ub∣−1r \le|Ub| - 1. After the initial 10β10^\beta in Z(w)Z(w), there are exactly r+2r+2 consecutive 1’s: one ending the first bb-code, rr encoding the intervening cc’s, and one beginning the next bb-code. The next symbol is 0, including when that second bb is the final letter of ww. Since

r+2≤∣Ub∣+1<L,r+2 \le\lvert Ub\rvert+1 < L,

this 0 already disagrees with the upper word 10β1L10^{\beta}1^{L} of FF. The disagreement lies within the existing overhang.

The only remaining possibility is w=bw=b. In this case Z(w)=10βZ(w)=10^{\beta}, and

Z(b)1L=10β1L,Z(b)1^{L}=10^{\beta}1^{L},

which is exactly the upper word of FF. Hence applying FF makes the two concatenations equal.

Now we are ready to give a full proof for the result of Neary.

Theorem 1. PCP(5)PCP(5) is undecidable over the binary alphabet.

Proof. Consider the restricted family of binary tag systems described in Lemma 2, whose halting problem is undecidable. Given a system in this family, with deletion number β\beta, productions

b⟼b,c⟼Ub,b \longmapsto b,\qquad c \longmapsto Ub,

and prescribed initial word w0w_0, form the five pairs in (1). All their words are binary, and they can be computed effectively from β\beta and UU. We prove that the resulting PCP instance has a solution if and only if the tag system halts from w0w_0.

Suppose first that the tag computation halts. By Lemma 3, its final word is bb. Write the computation as

w0⟶w1⟶⋯⟶wt=b.w_0 \longrightarrow w_1 \longrightarrow\cdots\longrightarrow w_t=b.

As shown in § 3, starting with AA and appending the β−1\beta-1 deletion pairs prescribed there leaves the lower overhang Z(w0)Z(w_0). For each step wj⟶wj+1w_j \longrightarrow w_{j+1}, append the production pair determined by the first symbol of wjw_j, followed by the β−1\beta-1 deletion pairs determined by its next β−1\beta-1 symbols. The word identities in the proof of Lemma 6 show that this changes the lower overhang from Z(wj)Z(w_j) to Z(wj+1)Z(w_{j+1}). After all tt steps, the lower overhang is therefore Z(b)=10βZ(b)=10^{\beta}. Appending FF makes the upper and lower concatenations equal, since

Z(b)1L=10β1L.Z(b)1^{L}=10^{\beta}1^{L}.

Thus the PCP instance has a solution.

Conversely, suppose that the PCP instance has a solution. By Lemma 4, its prefix through the first occurrence of FF has the form (4). By Lemma 5, the initial group

AD1,1⋯D1,β−1AD_{1,1}\cdots D_{1,\beta-1}

leaves exactly the lower overhang Z(w0)Z(w_0).

Proceed through the remaining groups in this factorization. Whenever the current overhang is Z(w)Z(w) for a reachable nonhalting word ww, Lemma 6 forces the next production pair and its β−1\beta- 1 deletion pairs, and shows that the resulting overhang is Z(w′)Z(w'), where w′w' is the genuine tag successor of ww. Consequently, these groups represent successive steps of the computation starting from w0w_0.

If any word reached in this way is bb, the tag computation has halted. Otherwise, since there are only finitely many groups before the first FF, this induction reaches the prefix immediately before that occurrence of FF. Its lower overhang is Z(w)Z(w) for a reachable tag word ww. Lemma 7 then forces w=bw = b, so the tag computation halts in this case as well.

We have therefore obtained an effective reduction of the restricted tag-system halting problem to PCP(5) over the binary alphabet. Since the former problem is undecidable, so is the latter.

Conclusion

Neary’s construction establishes the undecidability of PCP(5) over the binary alphabet. Our purpose has been to give a detailed verification of this result, with particular attention to the converse: every PCP solution yields a halting computation of the simulated tag system.

Lemmas 4–7 make this implication explicit. The lengths of maximal blocks of zeros force the form (4); comparison with the lower overhang then forces the initialization and each successive tag step. Finally, the closing pair can be applied only when the represented tag word is bb.

We use Rote’s longer closing pair [6], with L=∣Ub∣+99L = \lvert Ub\rvert+ 99, in place of the four consecutive 1’s in Neary’s original pair. Its required property follows from the bound on the lengths of blocks of c’s in reachable tag words.

The undecidability of the restricted tag-system family rests on Neary’s construction. The PCP verification uses the tag-system properties established in § 2. The internal structure of UU is used only in the proof of the restricted halting problem. The construction is due to Neary, with the modification of the closing pair due to Rote; the contribution here is a detailed exposition and verification of the resulting reduction in both directions.

Acknowledgements. I thank Turlough Neary for explaining his construction to me during a visit to Turku many years ago. That discussion was an important source of my confidence in the result and helped motivate the present exposition.

I used OpenAI’s ChatGPT to assist with drafting, revising the exposition, and checking details of the arguments. I have reviewed the resulting text and take full responsibility for its mathematical content and any remaining errors.

References

  1. [1]V. Claus. Some remarks on PCP(k) and related problems. Bullet. EATCS, 12:54–61, 1980. URL: https://page.mi.fu-berlin.de/rote/Kram/Volker_Claus-Some_remarks_on_PCP(k)_and_related_problems-1980-Bull-EATCS-12.pdf.
  2. [2]Y. Matiyasevich and G. Sénizergues. Decision problems for semi-Thue systems with a few rules. Theoret. Comput. Sci., 330(1):145–169, 2005. doi:10.1016/j.tcs.2004-09.016.
  3. [3]T. Neary. Undecidability in binary tag systems and the Post correspondence problem for five pairs of words. In STACS 2015, volume 30 of LIPIcs, pages 649–661, 2015. doi:10.4230/LIPIcs.STACS.2015.649.DOI
  4. [4]Turlough Neary and Damien Woods. P-completeness of cellular automaton Rule 110. Technical Report 04/2006, Boole Centre for Research in Informatics, University College Cork, 2006. URL: https://dna.hamilton.ie/assets/dw/NearyWoodsBCRI-04-06.pdf.
  5. [5]E. L. Post. A variant of a recursively unsolvable problem. Bull. Amer. Math. Soc., 52:264–268, 1946. doi:10.1090/S0002-9904-1946-08555-9.DOI
  6. [6]G. Rote. Probabilistic finite automaton emptiness is undecidable for a fixed automaton. In MFCS 2025, volume 345 of LIPIcs, pages 86:1–86:18, 2025. doi:10.4230/LIPIcs.MFCS.2025.86.DOI

Paper details

vlnc:W_p4h52prf
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
  • Computer Science

OpenAI’s ChatGPT

View statement
Looking for related papers…
Contents