arXiv:2611.02192cs.ITNov 2026

Manuscript Offprint

arXiv:2611.02192

Concatenation Locality under Successive Adjacent Transpositions

Adelin Ataba, Aryeh Lev Zabokritskiy

Abstract

We study codes correcting up to t≥1t \geq 1 successive adjacent transpositions, using block concatenation to support blockwise encoding and decoding. A fixed set PP of words of length bb over a qq-symbol alphabet generates, for every mm, the length-mbmb code of all concatenations of mm words from PP. For our explicit constructions, the prepared encoder and decoder depend only on the block parameters and are reused at every concatenation length. We first prove that correction at every concatenation length is certified by a single finite test at 2t+12t+1 blocks, and this test is tight over a qq-symbol alphabet exactly when (q2)≥2t\binom{q}{2} \geq 2t. For binary words and b≥2t+1b \geq 2t+1, we give an explicit construction with total redundancy at most mtlog⁡2b+Ot(m)mt \log_2 b + O_t(m), matching the optimal per-block redundancy tlog⁡2b+Ot(1)t \log_2 b + O_t(1) among block sets correcting at every concatenation length. Among all binary tt-correcting codes of length mbmb, the optimal total redundancy is tlog⁡2(mb)+Ot(1)t \log_2(mb) + O_t(1). Using all concatenations of one block set makes our total redundancy grow linearly in mm and buys independent block encoding, with one encoder and decoder at every length. The construction encodes and decodes in time linear in mbmb for fixed b,tb, t, and recovers the jj-th source block from the first jbjb received symbols. We also prove that, whenever the length-mbmb code corrects tt transpositions, the jj-th source block is determined within 2tb2tb received symbols beyond position jbjb, and that explicit binary block sets with rates tending to one as bb grows with tt fixed attain this bound in the worst case. Finally, we prove that every ordinary correcting code contains a constant fraction of its words whose arbitrary concatenations retain correction, for fixed q,tq, t.

Keywords: adjacent transpositions, block concatenation, error correction, streaming decoding, decoding delay, finite automata.

1 Introduction

Local reordering errors, which preserve the symbols of a word but may change their order, arise in bit-shift channels [12] and in limited permutation channels [14]. The corresponding coding problems depend on which reorderings the channel permits. Successive adjacent transpositions count each exchange of two neighboring symbols separately and allow later exchanges to overlap earlier ones. Other models restrict exchanges to disjoint pairs or bound the displacement of each symbol [13, 14].

We study codes that correct up to t≥1t \geq 1 successive adjacent transpositions and are built by block concatenation. We use a fixed nonempty set P⊆ΣqbP \subseteq \Sigma_q^b of blocks of length bb, where Σq\Sigma_q is a qq-symbol alphabet, and write Cmb(P)=Pm\mathcal{C}_{mb}(P) = P^m for all concatenations of mm such blocks. Each message block is encoded independently by the same map into a source block in PP. Block concatenation permits the same prepared encoder and decoder to serve every number of blocks. Our two explicit binary block constructions are the derivative and endpoint families of Sections 4 and 5; their preparation is deterministic and polynomial in bb (searches over candidate defining polynomials and field elements, fewer than 2(b+1)2(b+1) each; Section 4), and the prepared code data are reused when mm changes. Each transmission is framed: the receiver's initial side information consists of PP, bb, tt and the total length n=mbn = mb. The composition of the transmitted word generally depends on the message. The complete received word determines this composition because swaps preserve it, whereas a proper received prefix may leave several compositions possible. The decoders of both families process symbols as they arrive, using data memory bounded in terms of b,tb, t, together with O(log⁡n)O(\log n) bits for framing counters.

We require correction of at most tt successive adjacent transpositions in the entire transmitted word, swaps across block boundaries included; a swap of two equal symbols counts as an error but leaves the word unchanged. The error budget tt applies to the complete frame. As in Kovačević's bounds [12], tt is fixed while n=mbn = mb varies. Boundary swaps couple neighboring blocks, so correction of isolated blocks alone is insufficient. By the finite-locality theorem below, a single finite test, done once, certifies correction at every concatenation length.

Adjacent transpositions are related to deletion and insertion errors: the change ab↦baab \mapsto ba can be performed by deleting aa and inserting it after bb. Gabrys, Yaakobi, and Milenkovic combine a Varshamov–Tenengolts decoding step with a transposition decoder to correct one deletion and several adjacent transpositions [8]. This combination is a further application of efficient transposition decoding, beyond correcting transpositions alone. For a single adjacent transposition, Radonjic, Das, and Pokhrel give integer-code constructions [16]. Wu et al. study systematic deletion-correcting codes for permutations and words of prescribed composition [17]. Their fixed-composition setting also provides block sets for the present channel (Remark 6.3).

For binary words, the model of successive adjacent transpositions is the bit-shift model studied by Kovačević [12]: the error budget is the sum of the absolute displacements of the ordered occurrences of 1. His lattice constructions and packing bounds determine the asymptotic order of the largest code for every fixed tt, giving optimal redundancy tlog⁡2n+Ot(1)t \log_2 n + O_t(1) for ordinary binary codes of length nn (codes that are arbitrary subsets of {0,1}n\{0,1\}^n; this sense of “ordinary” is used throughout). We study the same channel with an additional requirement on how codewords are assembled and decoded.

Block concatenation has been used for codewords whose blocks are permutations, with an outer code [11], and for the limited permutation channel [14, 6]. Ben Shimon and Zabokritskiy study binary and qq-ary block-concatenation codes for the latter channel [3, 2]. Their channel radius bounds the displacement of each symbol: already at radius one, a received word may result from arbitrarily many disjoint adjacent swaps. At radius one they give a local criterion that reduces correction at every length to finitely many local checks between blocks [3]; they also give an exact finite verifier of all-length correction for finite prefix-free binary block sets [3, Section 6.2, Theorems 13–14]. Our finite test gives a uniform 2t+12t + 1-block criterion for the different error set of at most tt successive adjacent swaps. Kovačević, Kiah, and Goyal also give block constructions for the limited permutation channel [13, Section 3.2]. Our codes share the block-concatenation approach, but use a different error budget: two disjoint swaps are two errors here, whereas both are permitted at radius one in their model, and successive swaps here may also overlap.

We ask when PP corrects at every concatenation length, how large it can be, and how soon each source block can be decoded. We first prove that correction at 2t+12t+1 blocks guarantees correction at every concatenation length. The proof restricts a collision, two distinct codewords that reach a common received word with at most tt swaps each, to a connected interval of the blocks touched by these swaps. The interval has at most 2t+12t+1 blocks because the two paths cross at most 2t2t block boundaries; this count also underlies the test's tightness and the delay bound.

The test is tight over a qq-symbol alphabet exactly when (q2)≥2t\binom{q}{2} \geq 2t: a block set can then correct through 2t2t blocks and first have a collision at 2t+12t+1, which needs a distinct unordered pair of symbols at each of its 2t2t block boundaries. Over smaller alphabets, binary alphabets included for every tt, a test at 2t2t blocks suffices; whether fewer blocks suffice is open when (q2)≤2t−2\binom{q}{2} \leq 2t-2, as for binary words with t≥2t \geq 2 (Section 7). The tightness construction is a guarded encoding of a labelled digraph derived from the Černý automaton [5]: each arc becomes a block whose long constant internal factor of guard symbols forces colliding codewords to agree away from block boundaries. The automaton has pairs of states whose shortest synchronizing words take every length from one through (q2)\binom{q}{2} [1, pp. 2, 4] (Lemma 3.3). Two walks that diverge into the pair with synchronization time 2t2t give a first collision at 2t+12t+1 blocks. Its symbol pairs at the 2t2t block boundaries are the distinct pairs of states the walks visit, so sufficiency counts the same (q2)\binom{q}{2} pairs as necessity.

We give an explicit binary block construction for b≥2t+1b \geq 2t+1, the derivative family, with total redundancy at most mt⌈log⁡2(b+1)⌉mt\lceil \log_2(b+1) \rceil, compared with the optimum tlog⁡2(mb)+Ot(1)t \log_2(mb) + O_t(1) for ordinary binary codes in Kovačević's setting [12]. Its blocks are the derivatives (inverse prefix sums) of the codewords of a binary BCH code [4]. By the established prefix-sum reduction [8, 13], prefix sums of the whole received word turn each swap, boundary swaps included, into at most one substitution in one block's segment, so the jj-th source block is recovered from the first jbjb received symbols. Its correction at every concatenation length is thus proved directly, as for the endpoint family. The finite test serves arbitrary block sets, which it certifies in principle by an enumeration over P2t+1P^{2t+1}; its value is structural: it bounds the number of blocks that must be examined. Every binary block set correcting at every concatenation length is itself a tt-correcting code of length bb, so Kovačević's upper bound shows that our per-block redundancy is optimal up to an additive Ot(1)O_t(1) term; equivalently, the largest such block set has size Θt(2b/bt)\Theta_t(2^b/b^t). Given this optimum, the gap in total redundancy is inherent to using all concatenations of one block set: their redundancy is mm times the per-block redundancy, linear in mm, whereas the optimum for ordinary codes grows logarithmically. In exchange, one block encoder and decoder serve every number of blocks. For an ordinary code, preparation, encoding and decoding costs, and the position by which each block is available depend on its construction (Table 1).

For the derivative family and the full transmitted word of length n=mbn = mb, using schoolbook arithmetic in a polynomial basis, the encoding and decoding costs after the reusable preparation are O(ntlog⁡b)O(nt \log b) and O((nt+mt3)log⁡2b)O((nt+mt^3) \log^2 b) bit operations, respectively. For fixed tt, these processing costs are O(nlog⁡b)O(n \log b) and O(nlog⁡2b)O(n \log^2 b), as for the endpoint family (Table 1); they are linear in nn when bb is also fixed.

For decoding delay, we count the additional received symbols beyond position jbjb needed to determine the jj-th source block. Computation steps are counted separately. Our delay results are stated for the receiver described above, whose initial side information consists of P,b,tP, b, t and nn. We prove that whenever Cmb(P)\mathcal{C}_{mb}(P) is tt-correcting, the delay is at most 2tb2tb, by the same count of block boundaries crossed by the two paths. The derivative family has zero additional delay. The endpoint family, at lengths b=2s+1b=2^s+1, places the derivative of a BCH codeword between two endpoint bits that let an uncertainty persist across successive blocks. Its worst-case delay is exactly 2tb2tb in frames of at least 2t+12t+1 blocks, so the general delay bound is sharp even at rates tending to one; in frames of at least 2t+22t+2 blocks, it is 2tb2tb even for a receiver told the composition (Section 5).

At these block lengths, Proposition 4.1, applied to the endpoint family's BCH code with two zero coordinates appended, gives a block set of the same length and size with zero additional delay. The derivative family of Table 1 instead uses a longer, shortened BCH code and has bound t(s+1)t(s+1) at these block lengths. The endpoint family's guarantee st+2st+2, smaller when t≥3t\geq 3, thus reflects the choice of BCH constituent. Its role here is to attain the general delay bound.

Finally, we prove that, for general alphabets, every ordinary tt-correcting code D⊆Σqb\mathcal{D}\subseteq \Sigma_q^b contains a subset PP of size at least cq,t∣D∣c_{q,t}|\mathcal{D}| whose concatenations correct at every length, where cq,t=μ−(q−1)c_{q,t}=\mu^{-(q-1)} with μ=⌊2t⌋+1\mu=\lfloor \sqrt{2t} \rfloor + 1. To select PP, we group the codewords of D\mathcal{D} by their symbol counts modulo μ\mu and keep a largest group, whose congruent compositions extend its correction at length bb to every length. If hh is half the ℓ1\ell_1-distance between two words' prefix symbol-count vectors at a cut, then the words are at least h2h^2 swaps apart (Lemma 6.4). Consequently, two source concatenations in PmP^m at distance at most 2t2t have equal prefix compositions at every block boundary: otherwise congruence modulo μ\mu gives h≥μh\geq \mu, forcing their distance to be at least μ2>2t\mu^2>2t. Thus, relative to D\mathcal{D}, arbitrary concatenation costs only a constant additional redundancy per block for fixed q,tq,t. The guarantee covers correction and size; efficient selection and encoding of the subset depend on the representation of the supplied code.

Our contributions are as follows.

(i) We prove that correction at 2t+12t+1 blocks guarantees correction at every length, and that this finite test is tight precisely when (q2)≥2t\binom{q}{2}\geq 2t, with explicit block sets attaining it.

(ii) We construct binary codes of length mbmb with total redundancy at most mt⌈log⁡2(b+1)⌉mt\lceil \log_2(b+1) \rceil for b≥2t+1b\geq 2t+1, and give encoding and decoding algorithms that run in time linear in mbmb for fixed b,tb,t and decode the jj-th source block from the first jbjb received symbols.

(iii) We prove that whenever Cmb(P)\mathcal{C}_{mb}(P) is tt-correcting, the jj-th source block is determined after at most 2tb2tb additional received symbols beyond position jbjb, and construct an explicit binary family, the endpoint family, whose worst-case delay equals this bound, with block redundancy tlog⁡2b+Ot(1)t\log_2 b+O_t(1).

(iv) We prove that every ordinary correcting code D\mathcal{D} contains a subset PP with ∣P∣≥cq,t∣D∣|P|\geq c_{q,t}|\mathcal{D}| whose concatenations correct at every length, where cq,t>0c_{q,t}>0 is independent of bb.

Table 1 summarizes these redundancy and processing guarantees.

Table 1: Ordinary binary codes of optimal redundancy [12] versus the two explicit binary block families of this paper, for fixed tt and total length n=mbn=mb: the derivative family and the endpoint family. The derivative family requires b≥2t+1b \geq 2t+1. The endpoint family uses b=2s+1b=2^s+1, with 2t<2s−12t<2^s-1 and 2s−1−st≥22^s-1-st \geq 2; there its smaller redundancy bound for t≥3t \geq 3 comes from its choice of BCH code (Section 5). Processing costs count bit operations under schoolbook arithmetic; per-block quantities refer to the indicated block families. Block jj is the jj-th segment of bb symbols of the transmitted word.

Ordinary codeDerivative familyEndpoint family
Total redundancytlog⁡2n+Ot(1)t \log_2 n + O_t(1)≤mt[log⁡2(b+1)]\leq mt[\log_2(b+1)]≤m(tlog⁡2(b−1)+2)\leq m(t \log_2(b-1)+2)
Per-block redundancy—≤t[log⁡2(b+1)]\leq t[\log_2(b+1)]≤tlog⁡2(b−1)+2\leq t \log_2(b-1)+2
Per-block optimum—met within Ot(1)O_t(1)met within Ot(1)O_t(1)
Preparationcode-dependentonce, for (b,t)(b,t)once, for (b,t)(b,t)
Encoding (fixed tt)code-dependentO(nlog⁡b)O(n \log b)O(nlog⁡b)O(n \log b)
Decoding (fixed tt)code-dependentO(nlog⁡2b)O(n \log^2 b)O(nlog⁡2b)O(n \log^2 b)
Block jj available bycode-dependentsymbol jbjbmin⁡{n,(j+2t)b}\min\{n,(j+2t)b\}
Correction for every mmnot requiredyesyes

Section 2 defines the channel and proves finite locality. Section 3 proves tightness of the finite test and determines the alphabet threshold. Section 4 gives the explicit binary construction and its encoding and decoding algorithms. Section 5 studies decoding delay. Section 6 extracts block sets correcting at every concatenation length from ordinary codes and compares their sizes. Section 7 concludes with the remaining questions.