betaFeedback

WorksComputer Science

The Insertion-Deletion Distance of Linear Codes under Random Coordinate Permutations

Abstract

We study the maximum insertion-deletion (insdel) distance attainable by permuting the coordinates of a fixed [n,k]q[n,k]_q linear code. Exploiting the connection between common subsequences of codewords and noncrossing matchings in the related bipartite graphs, we establish probabilistic lower bounds under random coordinate permutations over large alphabets. In particular, if the maximum symbol multiplicity among nonconstant codewords is O(n/q)O(n/q), a uniformly random coordinate permutation yields insdel distance at least 2n−O(n/q)2n-O(n/\sqrt q) with high probability for sufficiently large qq. Furthermore, for projective linear codes satisfying the same symbol multiplicity condition, we show that the maximum attainable insdel distance is 2n−Θ(n/q)2n-Θ(n/\sqrt q). As an application, for [n,k]q[n,k]_q MDS codes containing the all-one vector, random coordinate permutations yield insdel distance at least 2n−O(kn)2n-O(\sqrt{kn}) with high probability whenever (k−1)(log⁡q)2=o(n)(k-1)(\log q)^2=o(n). In particular, for full-length Reed–Solomon (RS) codes, we obtain the lower bound 2q−O(kq)2q-O(\sqrt{kq}) with high probability for k=o(q/(log⁡q)2)k=o(q/(\log q)^2), substantially improving previously known lower bounds while allowing a wider range of dimensions. Finally, we give explicit constructions of full-length RS codes over square fields, attaining the order-optimal insdel distance 2q−Θ(q)2q-Θ(\sqrt q).

Introduction

Synchronization errors in communication and storage systems may cause symbols to be inserted into or deleted from a transmitted sequence. The received sequence is then no longer synchronized with the transmitted one, and these errors are referred to as insertion and deletion errors (insdel errors, for short). In recent years, insdel codes have received considerable attention due to the occurrence of insdel errors in high-density storage systems and wireless communication systems, such as DNA storage, language processing, and racetrack memory error correction [1, 2].

The theory of insdel codes starts with the seminal work of Levenshtein [3], who proved that the Varshamov–Tenengolts (VT) codes [4] can correct a single insertion or deletion. For a fixed number of synchronization errors, a challenging problem is to construct explicit codes with redundancy close to the minimum possible. Considerable progress has been made for correcting a fixed number of deletions, particularly in the two-deletion case [5, 6, 7, 8]. Nevertheless, the optimal redundancy for correcting a fixed number of deletions remains unknown in general. Although many of the known insdel codes are nonlinear, linear codes are of particular interest due to their compact representations and efficient encoding. Their insdel error-correcting capability, however, is subject to stronger restrictions. It was proved in [9] that a linear code capable of correcting even a single deletion must have rate at most 1/21/2.

For vectors u,v∈Fqn\mathbf{u},\mathbf{v}\in\mathbb{F}_q^n, the Hamming distance dH(u,v)d_{\mathrm{H}}(\mathbf{u},\mathbf{v}) counts the coordinates in which they differ. Their insdel distance dI(u,v)d_{\mathrm{I}}(\mathbf{u},\mathbf{v}) is the minimum number of insertions and deletions required to transform one into the other. For a fixed linear code, permutation of coordinates leads to equivalent codes under the Hamming metric, but they may have different insdel distances. In fact, the insdel distance can take several distinct values even for a short Reed–Solomon code. For example, over F13\mathbb{F}_{13}, take the evaluation vector α=(0,1,…,12)\boldsymbol{\alpha}=(0,1,\ldots,12) and consider the three-dimensional full-length Reed–Solomon code RS13,3(α)={(f(αi))i=113:f∈F13[x],deg⁡f<3}\mathrm{RS}_{13,3}(\boldsymbol{\alpha})=\{(f(\alpha_i))_{i=1}^{13}:f\in\mathbb{F}_{13}[x],\deg f<3\}. This code has Hamming distance 1111, but its insdel distances over the 13!=6 227 020 80013!=6\,227\,020\,800 permutations of the coordinates are distributed as shown in Table I.

dId_{\mathrm{I}}PermutationsPercentage (%)
2382 6680.00614528
442 183 4920.67742655
61 422 576 32422.84521555
84 728 796 02075.93994258
1033 082 2960.53127004

Table I. Insdel distance distribution over all coordinate permutations of RS13,3(α)\mathrm{RS}_{13,3}(\alpha) over F13\mathbb{F}_{13}, where α=(0,1,…,12)\alpha=(0,1,\ldots,12).

Several upper bounds on the insdel distance of linear codes have been established in recent years. For an [n,k]q[n,k]_q linear code CC, Cheng et al. [10] proposed the half-Singleton bound, and Chen [11] gave its non-asymptotic version dI(C)≤max⁡{2(n−2k+2),2}d_{\mathrm{I}}(C)\leq\max\{2(n-2k+2),2\}. Later, Ji et al. [12] sharpened it to dI(C)≤max⁡{2(n−2k+1),2}d_{\mathrm{I}}(C)\leq\max\{2(n-2k+1),2\} when 1∉C\mathbf{1}\notin C, which is called the strict half-Singleton bound. More upper bounds that hold for any coordinate ordering were obtained in [11], [13], [14]. In addition to establishing upper bounds, Chen [11] also highlighted the challenge of obtaining good lower bounds on the insdel distances of well-constructed binary linear codes. In this direction, Qiu et al. [15] established lower bounds for certain subcodes of binary first-order Reed–Muller codes and simplex codes.

Although determining the insdel distance of a general linear code is challenging, substantial progress has been made for Reed–Solomon (RS) codes. Several bounds and constructions have been developed for RS and generalized RS codes [13], [16], [17], with particular attention paid to attaining the half-Singleton bound. For general dimensions, the existence of RS codes attaining this bound over sufficiently large fields was established, together with deterministic constructions [18], [19]. For dimension two, the minimum field size required to attain the bound was determined to be Θ(n3)\Theta(n^3) [18], [20]. More recently, Con et al. [21] showed that random RS codes approach the half-Singleton bound with high probability over linear-sized alphabets.

Full-length RS codes provide a natural setting for studying the effect of coordinate permutations on insdel distance. Their evaluation set is Fq\mathbb{F}_q, so the choice of a code RSq,k(α)\mathrm{RS}_{q,k}(\alpha) amounts to ordering these evaluation points. Very recently, Beelen et al. [22] initiated this study. For general k≥2k\geq2, they proved that if q≥10ek3ekq\geq10ek^3e^k, there exists an ordering α\alpha of Fq\mathbb{F}_q such that the corresponding full-length RS code RSq,k(α)\mathrm{RS}_{q,k}(\alpha) has insdel distance at least q/(5k)q/(5k). For k=2k=2, they showed that for sufficiently large qq, a uniformly random ordering yields insdel distance at least 2(1−δ)q2(1-\delta)q with high probability for every fixed δ∈(0,1)\delta\in(0,1). However, finding an explicit ordering with comparably large insdel distance remains challenging even for two-dimensional full-length RS codes, as noted in the open problem in [22]. The corresponding question for general linear codes, without the benefit of the special structure of RS codes, is more challenging still.

We denote the maximum insdel distance dImax⁡(C)d_{\mathrm{I}}^{\max}(C) attainable by permuting the coordinates of a fixed linear code over large alphabets. In this paper, we address the following two natural questions:

Question 1. For a fixed linear code CC, how large can dImax⁡(C)d_{\mathrm{I}}^{\max}(C) be, and what insdel distance can be achieved by a random coordinate permutation?

Question 2. When random coordinate permutations yield large insdel distance with high probability, can we explicitly construct orderings that achieve comparable distances?

Our main results are as follows.

  • Random coordinate permutations yield large insdel distance with high probability. We establish probabilistic lower bounds on the insdel distance of linear codes under random coordinate permutations in terms of their minimum Hamming distance and maximum symbol multiplicity, with explicit exponential estimates for the failure probability (Theorem 12). For sufficiently large qq, a uniformly random coordinate permutation yields insdel distance at least 2n−O(n/q)2n-O(n/\sqrt{q}) with high probability when the maximum symbol multiplicity among nonconstant codewords is O(n/q)O(n/q) (Corollary 13). Our proof uses the representation of common subsequences between codewords as noncrossing matchings in their relation graphs. As an application, for MDS codes containing the all-one vector, we obtain the lower bound 2n−2(k−1)−(2e+o(1))(k−1)n2n-2(k-1)-(2e+o(1))\sqrt{(k-1)n} with high probability whenever (k−1)(log⁡q)2=o(n)(k-1)(\log q)^2=o(n). In particular, for full-length RS codes, taking n=qn=q gives insdel

distance at least 2q−O(kq)2q - O(\sqrt{kq}) with high probability whenever k=o(q/(log⁡q)2)k = o(q/(\log q)^2). For k≥3k \ge3, this improves the lower bound q/(5k)q/(5k) established by Beelen et al. [22, Thm. 2] under q≥10ek3e6q \ge10ek^3e^6 and allows a wider range of dimensions. For k=2k = 2, the bound with leading constant 2e2e also follows from a refinement of their counting argument (Remark 16).

  • Maximum insdel distance of order 2n−Θ(n/q)2n - \Theta(n/\sqrt{q}). We prove an alphabet-dependent upper bound for projective linear codes that is independent of coordinate ordering. When the maximum symbol multiplicity among nonconstant codewords is O(n/q)O(n/q), this bound is asymptotically tighter than previous bounds compared in Table II: the previously known bounds have deficits of O(n/q)O(n/q) from 2n2n, whereas our bound has a deficit of Θ(n/q)\Theta(n/\sqrt{q}). Together with our probabilistic lower bound, this determines dImax⁡(C)=2n−Θ(n/q)d_{\mathrm{I}}^{\max}(C) = 2n - \Theta(n/\sqrt{q}) under the same condition.

  • Explicit orderings achieve insdel distance 2q−Θ(q)2q - \Theta(\sqrt{q}) for full-length RS codes. We construct deterministic orderings of full-length RS codes with distance 2q−Θ(q)2q - \Theta(\sqrt{q}) over square fields. The construction groups evaluation points into polynomial level sets over the subfield and uses Bézout’s theorem for algebraic curves to control common subsequences. It applies to every fixed dimension k≥2k \ge2 when the characteristic exceeds k+1k + 1. A modified construction covers dimension two in every characteristic. These orderings are computable in time polynomial in qq and answer the explicit-ordering question over square fields.

Organization of the paper

Section II presents the tools and auxiliary results needed for the subsequent proofs. Section III establishes probabilistic lower bounds and applies them to MDS codes, full-length RS codes, and two non-MDS evaluation codes, and we also prove an upper bound for projective linear codes and combine it with the lower bounds to determine the maximum attainable insdel distance under a condition on symbol multiplicities. Section IV gives explicit orderings for full-length RS codes over square fields. We conclude with open questions in Section V.

Preliminaries

In this section, we recall basic facts about insdel distance, the representation of common subsequences by noncrossing matchings, and the results on function fields and plane curves needed for our explicit constructions.

Insdel Distance of Linear Codes

A sequence (a1,…,ar)(a_1,\ldots,a_r) is a common subsequence of u,v∈Fqn\mathbf{u},\mathbf{v} \in\mathbb{F}_q^n if there exist indices 1≤i1<⋯<ir≤n1 \le i_1 < \cdots< i_r \le n and 1≤j1<⋯<jr≤n1 \le j_1 < \cdots< j_r \le n such that uit=vjt=atu_{i_t} = v_{j_t} = a_t for every 1≤t≤r1 \le t \le r. Let LCS⁡(u,v)\operatorname{LCS}(\mathbf{u},\mathbf{v}) denote the length of a longest common subsequence between them. The following well-known relation between insdel distance and LCS has been proved in [23].

Lemma 1 ([23]). For any u,v∈Fqn\mathbf{u},\mathbf{v} \in\mathbb{F}_q^n,

dI(u,v)=2(n−LCS⁡(u,v)).(1)d_{\mathrm{I}}(\mathbf{u},\mathbf{v}) = 2(n-\operatorname{LCS}(\mathbf{u},\mathbf{v})). \tag*{(1)}

Consequently, for a code C⊆Fqn\mathcal{C} \subseteq\mathbb{F}_q^n, we have

dI(C)=2(n−LCS⁡(C)),d_{\mathrm{I}}(\mathcal{C}) = 2(n-\operatorname{LCS}(\mathcal{C})),

where LCS⁡(C):=max⁡u,v∈C, u≠vLCS⁡(u,v)\operatorname{LCS}(\mathcal{C}) := \max_{\mathbf{u},\mathbf{v}\in\mathcal{C},\,\mathbf{u}\ne\mathbf{v}} \operatorname{LCS}(\mathbf{u},\mathbf{v}).

For a code of fixed length, correcting up to tt deletions is equivalent to correcting up to tt insertions [3]. The following criterion characterizes this correction capability in terms of the longest common subsequence [22], which follows directly from Lemma 1.

Proposition 2 ([22]). Let C⊆Fqn\mathcal{C} \subseteq\mathbb{F}_q^n be a code with at least two codewords, and let tt be a nonnegative integer. Then C\mathcal{C} can correct tt insertions and deletions if and only if

LCS⁡(C)≤n−t−1,\operatorname{LCS}(\mathcal{C}) \le n-t-1,

or equivalently, dI(C)≥2t+2d_{\mathrm{I}}(\mathcal{C}) \ge2t+2.

Common Subsequences of Words and Noncrossing Matchings in Bipartite Graphs

For u,v∈Fqn\mathbf{u},\mathbf{v}\in\mathbb{F}_q^n, a common subsequence of length rr can be represented by a noncrossing matching of size rr in a bipartite graph [24]. We first recall the relevant notions in matching, the reader is referred to [25] for more details.

All directed graphs considered below are finite. For a directed graph D=(V,E)D=(V,E), a directed matching is a set of directed edges with pairwise distinct tails and pairwise distinct heads. Let V−V^- and V+V^+ be disjoint copies of VV. The bipartite representation B(D)\mathcal{B}(D) is the bipartite graph with vertex classes V−V^- and V+V^+, where i−i^- and j+j^+ are adjacent exactly when (i,j)∈E(D)(i,j)\in E(D) [25]. Conversely, every bipartite graph on these two copies determines a directed graph on VV. This correspondence gives a bijection between matchings in B(D)\mathcal{B}(D) and directed matchings in DD. The diagonal edges i−i+i^-i^+ correspond to loops (i,i)(i,i) in DD, so deleting all diagonal edges corresponds to removing all loops. Throughout, we write (i,j)(i,j) for both the edge i−j+i^-j^+ and its corresponding directed edge in DD.

Fix a total order ≺\prec on VV, which induces the same order on V−V^- and V+V^+. A matching M={(is,js):1≤s≤r}M=\{(i_s,j_s):1\le s\le r\} is noncrossing [24], [25] with respect to ≺\prec if its edges can be indexed such that

i1≺⋯≺ir,j1≺⋯≺jr.i_1\prec\cdots\prec i_r,\qquad j_1\prec\cdots\prec j_r.

A directed matching in DD is noncrossing with respect to ≺\prec if its corresponding matching in B(D)\mathcal{B}(D) is noncrossing. For either representation GG, let L≺(G)L_{\prec}(G) denote the maximum size of a noncrossing matching with respect to ≺\prec.

We can now relate common subsequences to noncrossing matchings. Let V=[n]V=[n]. For u,v∈Fqn\mathbf{u},\mathbf{v}\in\mathbb{F}_q^n, define the relation graph to be the bipartite graph Gu,v=(V−∪V+,Eu,v)G_{\mathbf{u},\mathbf{v}}=(V^-\cup V^+,E_{\mathbf{u},\mathbf{v}}) with

Eu,v={(i,j)∈V×V:ui=vj},E_{\mathbf{u},\mathbf{v}}=\{(i,j)\in V\times V:u_i=v_j\},

and we denote by G~u,v\widetilde{G}_{\mathbf{u},\mathbf{v}} the corresponding loopless directed graph on VV whose edge set is Eu,v∖{(i,i):i∈V}E_{\mathbf{u},\mathbf{v}}\setminus\{(i,i):i\in V\}. For a total order ≺\prec on [n][n] (VV, equivalently), let u≺\mathbf{u}_{\prec} and v≺\mathbf{v}_{\prec} be obtained by arranging the coordinates of u\mathbf{u} and v\mathbf{v} according to ≺\prec. A noncrossing matching in Gu,vG_{\mathbf{u},\mathbf{v}} with edges (i1,j1),…,(ir,jr)(i_1,j_1),\ldots,(i_r,j_r) determines the common subsequence

(ui1,…,uir)=(vj1,…,vjr).(u_{i_1},\ldots,u_{i_r})=(v_{j_1},\ldots,v_{j_r}).

Hence we have

LCS⁡(u≺,v≺)=L≺(Gu,v).(2)\operatorname{LCS}(\mathbf{u}_{\prec},\mathbf{v}_{\prec})=L_{\prec}(G_{\mathbf{u},\mathbf{v}}). \tag*{(2)}

The following example illustrates how the vertex order affects noncrossing matchings and the value of L≺(Gu,v)L_{\prec}(G_{\mathbf{u},\mathbf{v}}).

Example 3. Let u=(0,0,1,0,1)\mathbf{u}=(0,0,1,0,1) and v=(1,1,0,1,0)\mathbf{v}=(1,1,0,1,0) and write the relation graph as G=Gu,vG=G_{\mathbf{u},\mathbf{v}}. Under the natural order 1≺2≺3≺4≺51\prec2\prec3\prec4\prec5, we have LCS⁡(u,v)=L≺(G)=3\operatorname{LCS}(\mathbf{u},\mathbf{v})=L_{\prec}(G)=3. Under the common order 1≺∗3≺∗2≺∗5≺∗41\prec^*3\prec^*2\prec^*5\prec^*4, the reordered words are u≺∗=(0,1,0,1,0)\mathbf{u}_{\prec^*}=(0,1,0,1,0) and v≺∗=(1,0,1,0,1)\mathbf{v}_{\prec^*}=(1,0,1,0,1). Their common subsequence (0,1,0,1)(0,1,0,1) is realized by the position pairs

M={(1,3),(3,2),(2,5),(5,4)}.M=\{(1,3),(3,2),(2,5),(5,4)\}.

Figure 1 highlights this same matching under both orders. It is crossing under ≺\prec and noncrossing under ≺∗\prec^*. A common subsequence can contain at most two zeros and two ones, so its length is at most 44 under every coordinate order. Hence

Relation graphs for natural and permuted coordinate orders

Figure 1. The relation graph for u=(0,0,1,0,1)\mathbf{u}=(0,0,1,0,1) and v=(1,1,0,1,0)\mathbf{v}=(1,1,0,1,0) under two common coordinate orders. The same matching MM of size 4 is highlighted in both panels.

L≺∗(G)=max⁡≺L≺(G)=4.L_{\prec^*}(G)=\max_{\prec}L_{\prec}(G)=4.

By Lemma 1 and Eq. (2), the insdel distance between the two ordered vectors can be written as

dI(u≺,v≺)=2(n−L≺(Gu,v)).d_I(\mathbf{u}_{\prec},\mathbf{v}_{\prec})=2\left(n-L_{\prec}(G_{\mathbf{u},\mathbf{v}})\right).

For a code C⊆Fqn\mathcal{C}\subseteq\mathbb{F}_q^n, write C≺:={u≺:u∈C}\mathcal{C}_{\prec}:=\{\mathbf{u}_{\prec}:\mathbf{u}\in\mathcal{C}\} for the code obtained by arranging the coordinates of each codeword according to ≺\prec. Taking the minimum over distinct codewords gives

dI(C≺)=2(n−max⁡u≠v∈CL≺(Gu,v)).d_I(\mathcal{C}_{\prec})=2\left(n-\max_{\substack{\mathbf{u}\ne\mathbf{v}\in\mathcal{C}}}L_{\prec}(G_{\mathbf{u},\mathbf{v}})\right).

Therefore, determining the maximum insdel distance dImax⁡(C)d_I^{\max}(\mathcal{C}) under all coordinate permutations amounts to minimizing the largest noncrossing matching among the relation graphs of distinct codewords.

The edge count and vertex degrees of a relation graph Gu,vG_{\mathbf{u},\mathbf{v}} are determined by symbol multiplicities. For each a∈Fqa\in\mathbb{F}_q, define Ia={i∈V:ui=a}I_a=\{i\in V:u_i=a\} and Ja={j∈V:vj=a}J_a=\{j\in V:v_j=a\}. The edges joining occurrences of aa form Ia×JaI_a\times J_a. Since the edges of Gu,vG_{\mathbf{u},\mathbf{v}} are partitioned into the sets Ia×JaI_a\times J_a, we have

∣E(Gu,v)∣=∑a∈Fq∣Ia∣∣Ja∣.(3)\lvert E(G_{\mathbf{u},\mathbf{v}})\rvert=\sum_{a\in\mathbb{F}_q}\lvert I_a\rvert\lvert J_a\rvert. \tag*{(3)}

Moreover, the degrees of i−∈V−i^{-}\in V^{-} and j+∈V+j^{+}\in V^{+} are ∣Jui∣\lvert J_{u_i}\rvert and ∣Ivj∣\lvert I_{v_j}\rvert, respectively. The diagonal edges correspond to coordinates on which u\mathbf{u} and v\mathbf{v} agree, so their number is n−dH(u,v)n-d_H(\mathbf{u},\mathbf{v}). Hence

∣E(G~u,v)∣=∣{(i,j)∈V×V:i≠j, ui=vj}∣=∑a∈Fq∣Ia∣∣Ja∣−n+dH(u,v).\begin{aligned} \lvert E(\widetilde{G}_{\mathbf{u},\mathbf{v}})\rvert &=\lvert\{(i,j)\in V\times V:i\ne j,\ u_i=v_j\}\rvert\\ &=\sum_{a\in\mathbb{F}_q}\lvert I_a\rvert\lvert J_a\rvert-n+d_H(\mathbf{u},\mathbf{v}). \end{aligned}

Removing the diagonal edges from a noncrossing matching in Gu,vG_{\mathbf{u},\mathbf{v}} leaves a noncrossing directed matching in G~u,v\widetilde{G}_{\mathbf{u},\mathbf{v}}. Consequently,

L≺(u≺,v≺)≤n−dH(u,v)+L≺(G~u,v).(4)L_{\prec}(\mathbf{u}_{\prec},\mathbf{v}_{\prec})\le n-d_H(\mathbf{u},\mathbf{v})+L_{\prec}(\widetilde{G}_{\mathbf{u},\mathbf{v}}). \tag*{(4)}

For a directed matching MM in G~u,v\widetilde{G}_{\mathbf{u},\mathbf{v}}, consider the directed subgraph (V,M)(V,M) with vertex set VV and edge set MM. Since the edges of MM have pairwise distinct tails and pairwise distinct heads, every vertex of (V,M)(V,M) has outdegree and indegree at most one. More generally, we have the following useful observation (see [26]). Here, dG+(v)d_G^{+}(v) and dG−(v)d_G^{-}(v) denote the outdegree and indegree of vv in a directed graph GG, respectively. The weakly connected components of GG are the connected components obtained by ignoring edge directions, and a component is nontrivial if it contains an edge.

Proposition 4 ([26]). Let GG be a finite loopless directed graph with dG+(v)≤1d_G^{+}(v)\le1 and dG−(v)≤1d_G^{-}(v)\le1 for every v∈V(G)v\in V(G). Then every nontrivial weakly connected component of GG is either a directed path or a directed cycle.

In particular, the nontrivial weakly connected components of (V,M)(V,M) are directed paths or directed cycles. In Section III, we use this decomposition to estimate the probability that a fixed directed matching is noncrossing under a uniformly random vertex order.

Algebraic Function Fields and Plane Curves

We recall the facts about function fields and plane curves used in § 4, following [27], [28], and include short proofs of the auxiliary lemmas needed below.

Let KK be an algebraically closed field, and let X\mathcal{X} be a nonsingular projective irreducible curve over KK, with function field F=K(X)F=K(\mathcal{X}). The places of FF correspond to the points of X\mathcal{X}. Moreover, KK-isomorphisms between function fields of nonsingular projective curves induce isomorphisms of the corresponding curves [28 Sec. 7.1, Corollaries 3 and 4].

Let PF\mathbb{P}_F denote the set of places of FF, and let vPv_P be the normalized discrete valuation at P∈PFP\in\mathbb{P}_F. A divisor D=∑PnPPD=\sum_P n_P P is a finite integral sum of places, and we write D≥0D\geq0 if all nP≥0n_P\geq0. Since KK is algebraically closed, its degree is deg⁡D=∑PnP\deg D=\sum_P n_P. For z∈F×z\in F^\times, its principal divisor and pole divisor are defined as

(z)=∑P∈PFvP(z)P,(z)∞=∑P∈PFvP(z)<0−vP(z)P.(z)=\sum_{P\in\mathbb{P}_F}v_P(z)P,\qquad (z)_\infty=\sum_{\substack{P\in\mathbb{P}_F\\v_P(z)<0}}-v_P(z)P.

For every z∈F∖Kz\in F\setminus K, we have [27 Thm. 1.4.11]

[F:K(z)]=deg⁡(z)∞.(5)[F:K(z)]=\deg(z)_\infty. \tag*{(5)}

The Riemann–Roch space associated with a divisor DD is

L(D)={z∈F×:(z)+D≥0}∪{0}.L(D)=\{z\in F^\times:(z)+D\geq0\}\cup\{0\}.

For an integer m≥0m\geq0, L(mP)L(mP) consists of the functions having no poles away from PP and pole order at most mm at PP, together with zero. For the level curves Xr+Ys=cX^r+Y^s=c used later, these spaces have the following description.

Lemma 5. Let r>s≥2r>s\geq2 be relatively prime integers with char⁡K∤rs\operatorname{char}K\nmid rs, and let c∈K×c\in K^\times. Write Fc=K(x,y)F_c=K(x,y) for the function field of xr+ys=cx^r+y^s=c. The functions xx and yy have the same unique pole P∞P_\infty, with

(x)∞=sP∞,(y)∞=rP∞.(x)_\infty=sP_\infty,\qquad(y)_\infty=rP_\infty.

For every integer m≥0m\geq0,

L(mP∞)=⟨xiyj:i≥0, 0≤j<s, is+jr≤m⟩K.(6)L(mP_\infty)=\langle x^i y^j:i\geq0,\ 0\leq j<s,\ is+jr\leq m\rangle_K. \tag*{(6)}

Proof. By [27 Prop. 3.1.15], the extension Fc/K(x)F_c/K(x) has degree ss and is totally ramified at infinity, since v∞(xr−c)=−rv_\infty(x^r-c)=-r and gcd⁡(r,s)=1\gcd(r,s)=1. Writing P∞P_\infty for the unique place above infinity, the relation ys=c−xry^s=c-x^r gives (x)∞=sP∞(x)_\infty=sP_\infty and (y)∞=rP∞(y)_\infty=rP_\infty.

Since the affine curve is nonsingular and yy is integral over K[x]K[x], its coordinate ring K[x,y]K[x,y] is the integral closure of K[x]K[x] in FcF_c, hence the ring of functions regular away from P∞P_\infty by [27 Thm. 3.2.6]. Every such function has a unique expansion ∑j=0s−1aj(x)yj\sum_{j=0}^{s-1}a_j(x)y^j with aj(x)∈K[x]a_j(x)\in K[x], whose monomials xiyjx^iy^j have pairwise distinct pole orders is+jris+jr, and membership in L(mP∞)L(mP_\infty) is therefore equivalent to is+jr≤mis+jr\leq m for every nonzero term, proving Eq. (6).

We will also use the following irreducibility statement, which does not require a restriction on the characteristic or on cc.

Lemma 6. Let r>s≥2r>s\geq2 be relatively prime integers. Then, for every c∈Kc\in K, the polynomial Xr+Ys−cX^r+Y^s-c is irreducible in K[X,Y]K[X,Y].

Proof. View the polynomial as Ys+(Xr−c)Y^s+(X^r-c) over K(X)K(X). At the pole of XX, its constant coefficient has valuation −r-r, which is coprime to ss, and all intermediate coefficients are zero. Hence [27 Prop. 3.1.15] gives irreducibility in K(X)[Y]K(X)[Y]. Gauss’s lemma then gives irreducibility in K[X,Y]K[X,Y].

For A⊆K2A\subseteq K^2, its Zariski closure A‾ Z\overline{A}^{\,Z} is the common zero set in K2K^2 of all polynomials in K[U,V]K[U,V] that vanish on AA [28 Sec. 6.1].

Lemma 7. Let u,v∈Fu,v\in F be not both constant, and let S⊆XS\subseteq\mathcal{X} be a finite set containing all their poles. Set

A={(u(P),v(P)):P∈X∖S}.A=\{(u(P),v(P)):P\in\mathcal{X}\setminus S\}.

Then the Zariski closure Γ=A‾Z\Gamma= \overline{A}^{Z} is an irreducible plane curve, and Γ∖A\Gamma\setminus A is finite. The substitutions U↦uU \mapsto u and V↦vV \mapsto v identify K(Γ)K(\Gamma) with K(u,v)⊆FK(u,v) \subseteq F.

Proof. Let ρ:K[U,V]→F\rho: K[U,V] \to F send UU to uu and VV to vv. A rational function vanishing on X∖S\mathcal{X} \setminus S is zero, so the ideal of polynomials vanishing on AA is ker⁡ρ\ker\rho. Consequently,

K[Γ]≅K[u,v].K[\Gamma] \cong K[u,v].

This is a domain of transcendence degree one over KK. Hence Γ\Gamma is an irreducible plane curve and K(Γ)=K(u,v)K(\Gamma) = K(u,v) under the indicated identification.

Let Γ‾⊆P2\overline{\Gamma} \subseteq\mathbb{P}^{2} be the projective closure of Γ\Gamma. The rational map P↦[1:u(P):v(P)]P \mapsto[1 : u(P) : v(P)] extends to a morphism Φ:X→Γ‾\Phi: \mathcal{X} \to\overline{\Gamma} because X\mathcal{X} is nonsingular [28 Sec. 7.1, Corollary 1]. This morphism is nonconstant and therefore surjective. It follows that Γ∖A⊆Φ(S)\Gamma\setminus A \subseteq\Phi(S), which is finite.

Finally, the following affine form of Bézout’s theorem follows from the projective version by taking projective closures [28 Sec. 5.3, Corollary 3].

Theorem 8. Two plane curves over KK of degrees d1d_1 and d2d_2 with no common irreducible component have at most d1d2d_1d_2 distinct common affine points.

Bounds on the Insdel Distance of Linear Codes under Coordinate Permutations

We establish lower and upper bounds on the insdel distance attainable under coordinate permutations. We first derive tail estimates for noncrossing directed matchings under a common random vertex order. Applying these estimates to relation graphs of codeword pairs gives high-probability lower bounds in terms of the Hamming distance and symbol multiplicities, with applications to MDS codes, full-length RS codes, and two non-MDS evaluation codes. We then establish an upper bound for projective linear codes that holds for every coordinate order and, together with the probabilistic lower bounds, determines the optimal asymptotic distance under a symbol-multiplicity condition.

Maximum Noncrossing Matchings of Relation Graphs under a Common Random Order

Since both vertex classes of a relation graph share the same coordinate order, we first estimate the probability that a fixed directed matching is noncrossing under a uniformly random vertex order.

Lemma 9. Let MM be a fixed directed matching of size r≥1r \ge1 in a loopless directed graph G=(V,E)G = (V,E), and consider the directed subgraph (V,M)(V,M). If (V,M)(V,M) contains a directed cycle, then no total order of VV makes MM noncrossing. Otherwise, its nontrivial weakly connected components are directed paths. If (V,M)(V,M) has cc nontrivial weakly connected components, then a uniformly random total order of VV satisfies

P(M is noncrossing)≤1c!(r−c)!≤2rr!.\mathbb{P}(M\text{ is noncrossing}) \le\frac{1}{c!(r-c)!} \le\frac{2^{r}}{r!}.

Proof. By Proposition 4, every nontrivial weakly connected component of (V,M)(V,M) is a directed path or a directed cycle. Suppose that MM is noncrossing with respect to a vertex order ≺\prec and contains a directed cycle CC. Let V0V_0 be the vertex set of CC. The edges of CC define a permutation σ:V0→V0\sigma: V_0 \to V_0, where (v,σ(v))(v,\sigma(v)) is the edge leaving vv. Since MM is noncrossing, u≺vu \prec v implies σ(u)≺σ(v)\sigma(u) \prec\sigma(v) for all u,v∈V0u,v \in V_0, but every increasing permutation of a finite totally ordered set is the identity. Hence σ(v)=v\sigma(v) = v for every v∈V0v \in V_0, contradicting the assumption that GG is loopless.

Suppose now that the nontrivial weakly connected components of (V,M)(V,M) are cc directed paths. Since these paths have rr edges in total, the support of MM has r+cr+c vertices. Identify the positions in the order induced on this support with [r+c][r+c], and let DD and RR be the sets of positions occupied by tails and heads, respectively. The complements DcD^{c} and RcR^{c} consist of the terminal and initial vertices, respectively. They are disjoint sets of size cc, so there are at most

(r+cc)(rc)\binom{r+c}{c}\binom{r}{c}

possible ordered pairs (Dc,Rc)(D^{c},R^{c}).

Write D={d1<⋯<dr}D = \{d_1 < \cdots< d_r\} and R={s1<⋯<sr}R = \{s_1 < \cdots< s_r\}. A noncrossing matching must join did_i to sis_i for every ii. Thus DD and RR determine the edges on the ordered support. The cc path components of (V,M)(V,M) can be assigned to the resulting path components on [r+c][r+c] in at most c!c! ways. Each assignment determines all vertex positions along the paths. Since the relative order of the support is uniform,

P(M is noncrossing)≤(r+cc)(cc)c!(r+c)!=1c!(r−c)!=(rc)r!≤2rr!.\mathbb{P}(M\text{ is noncrossing})\le\frac{\binom{r+c}{c}\binom{c}{c}c!}{(r+c)!}=\frac{1}{c!(r-c)!}=\frac{\binom{r}{c}}{r!}\le\frac{2^r}{r!}.

We next show that the probability that a random order admits a large noncrossing directed matching can be bounded in terms of the edge count, with a sharper estimate available when the maximum indegree and outdegree are also controlled.

Proposition 10. Let G=(V,E)G=(V,E) be a loopless directed graph with at most mm edges, where m≥1m\ge1 is an integer. Choose a total order ≺\prec of VV uniformly at random. For every integer 1≤r≤m1\le r\le m,

P(L≺(G)≥r)≤(mr)2rr!.(7)\mathbb{P}\left(L_{\prec}(G)\ge r\right)\le\binom{m}{r}\frac{2^r}{r!}. \tag*{(7)}

If every indegree and outdegree is at most Δ\Delta, then

P(L≺(G)≥r)≤mr(r!)2exp⁡(2Δr3m).(8)\mathbb{P}\left(L_{\prec}(G)\ge r\right)\le\frac{m^r}{(r!)^2}\exp\left(2\sqrt{\frac{\Delta r^3}{m}}\right). \tag*{(8)}

Proof. The event L≺(G)≥rL_{\prec}(G)\ge r requires an rr-edge directed matching to be noncrossing. There are at most (mr)\binom{m}{r} such matchings, so Lemma 9 gives Eq. (7) by a union bound.

For the second estimate, Lemma 9 allows us to restrict attention to directed matchings MM for which every nontrivial weakly connected component of (V,M)(V,M) is a directed path. Fix the number cc of these path components and write av=dG+(v)a_v=d_G^+(v). The number of choices for their initial edges is at most

∑S⊆V∣S∣=c∏v∈Sav≤1c!(∑vav)c≤mcc!.\sum_{\substack{S\subseteq V\\ |S|=c}}\prod_{v\in S}a_v\le\frac{1}{c!}\left(\sum_v a_v\right)^c\le\frac{m^c}{c!}.

Label the chosen initial edges using a fixed auxiliary order of their tails. The path lengths form a vector of positive integers with sum rr, and there are (r−1c−1)\binom{r-1}{c-1} possible length vectors. Once these data are fixed, each remaining edge extends a path in at most Δ\Delta ways. Allowing repeated vertices can only increase the count, so there are at most

mcc!(r−1c−1)Δr−c\frac{m^c}{c!}\binom{r-1}{c-1}\Delta^{r-c}

directed matchings MM with rr edges and cc nontrivial path components in (V,M)(V,M). Lemma 9 now gives

P(L≺(G)≥r)≤∑c=1rmcΔr−c(c!)2(r−c)!(r−1c−1).\mathbb{P}\left(L_{\prec}(G)\ge r\right)\le\sum_{c=1}^{r}\frac{m^c\Delta^{r-c}}{(c!)^2(r-c)!}\binom{r-1}{c-1}.

Put j=r−cj=r-c and factor out mr/(r!)2m^r/(r!)^2. The remaining factor in the jj-th term is

1(j!)2(Δm)j(r!(r−j)!)2(r−1)!(r−1−j)!≤1(j!)2(Δr3m)j.\frac{1}{(j!)^2}\left(\frac{\Delta}{m}\right)^j\left(\frac{r!}{(r-j)!}\right)^2\frac{(r-1)!}{(r-1-j)!}\le\frac{1}{(j!)^2}\left(\frac{\Delta r^3}{m}\right)^j.

For x≥0x\ge0, we have

∑j≥0xj(j!)2≤(∑j≥0xj/2j!)2=e2x.\sum_{j\ge0}\frac{x^j}{(j!)^2}\le\left(\sum_{j\ge0}\frac{x^{j/2}}{j!}\right)^2=e^{2\sqrt{x}}.

Taking x=Δr3/mx=\Delta r^3/m proves Eq. (8).

Insdel Distance of Linear Codes under Random Coordinate Permutations

For a linear code CC, let C+=C+⟨1⟩C^{+}=C+\langle1\rangle. The following identity for the maximum symbol multiplicity of nonconstant codewords is immediate.

Lemma 11. For a linear code CC containing a nonconstant word,

max⁡u∈C∖⟨1⟩a∈Fq∣{i:ui=a}∣=n−dH(C+).\max_{\substack{u\in C\setminus\langle1\rangle\\a\in\mathbb{F}_q}}\left|\{i:u_i=a\}\right|=n-d_{\mathrm{H}}(C^{+}).

In what follows, we write μ(C):=n−dH(C+)\mu(C):=n-d_{\mathrm{H}}(C^{+}) for the maximum symbol multiplicity of nonconstant codewords in CC. Combining Lemma 11 and Proposition 10, we derive the following high-probability lower bound on the insdel distance.

Theorem 12. Let CC be a sequence of [n,k]q[n,k]_q linear codes containing a nonconstant word. Suppose that μ(C)=o(n)\mu(C)=o(n) and klog⁡q=o(nμ(C))k\log q=o\left(\sqrt{n\mu(C)}\right) as n→∞n\to\infty. For every fixed ε>0\varepsilon>0 and all sufficiently large nn, a uniformly random coordinate order satisfies

P(dI(C≺)≥2dH(C)−(2e+ε)nμ(C))≥1−exp⁡(−ε2nμ(C))⟶1.\mathbb{P}\left(d_{\mathrm{I}}(C_{\prec})\ge2d_{\mathrm{H}}(C)-(2e+\varepsilon)\sqrt{n\mu(C)}\right)\ge1-\exp\left(-\frac{\varepsilon}{2}\sqrt{n\mu(C)}\right)\longrightarrow1.

Proof. We first obtain finite estimates for an arbitrary [n,k]q[n,k]_q linear code containing a nonconstant word. For distinct nonconstant codewords, Lemma 11 and Eq. (3) in Section II give ∣E(G~u,v)∣≤nμ(C)\lvert E(\widetilde{G}_{u,v})\rvert\le n\mu(C) and dG~u,v+(i),dG~u,v−(i)≤μ(C)d^{+}_{\widetilde{G}_{u,v}}(i),d^{-}_{\widetilde{G}_{u,v}}(i)\le\mu(C).

For a constant codeword a1a1 and a nonconstant codeword uu, Lemma 11 gives

LCS⁡(a1,u≺)=∣{i:ui=a}∣≤μ(C).\operatorname{LCS}(a1,u_{\prec})=\left|\{i:u_i=a\}\right|\le\mu(C).

Hence, any pair with LCS greater than μ(C)\mu(C) must consist of two nonconstant codewords.

For a pair of distinct nonconstant codewords, the relation graph has n−dH(u,v)≤n−dH(C)n-d_{\mathrm{H}}(u,v)\le n-d_{\mathrm{H}}(C) diagonal edges. By Eq. (4) in Section II, a common subsequence of length greater than n−dH(C)+rn-d_{\mathrm{H}}(C)+r gives a noncrossing directed matching with at least rr edges in G~u,v\widetilde{G}_{u,v}. Applying Proposition 10 with m=nμ(C)m=n\mu(C) and Δ=μ(C)\Delta=\mu(C), and taking a union bound over fewer than q2kq^{2k} ordered pairs of distinct nonconstant codewords gives, for every integer 1≤r≤n1\le r\le n,

P(LCS⁡(C≺)>max⁡{μ(C),n−dH(C)+r})≤q2k(nμ(C)r)2rr!≤q2k(2e2nμ(C)r2)r.\mathbb{P}\left(\operatorname{LCS}(C_{\prec})>\max\{\mu(C),n-d_{\mathrm{H}}(C)+r\}\right)\le q^{2k}\binom{n\mu(C)}{r}\frac{2^r}{r!}\le q^{2k}\left(\frac{2e^2n\mu(C)}{r^2}\right)^r.

and

P(LCS⁡(C≺)>max⁡{μ(C),n−dH(C)+r})≤q2k(nμ(C))r(r!)2exp⁡(2r3n).(9)\mathbb{P}\left(\operatorname{LCS}(C_{\prec})>\max\{\mu(C),n-d_{\mathrm{H}}(C)+r\}\right)\le q^{2k}\frac{(n\mu(C))^r}{(r!)^2}\exp\left(2\sqrt{\frac{r^3}{n}}\right). \tag*{(9)}

Now assume μ(C)=o(n)\mu(C)=o(n) and klog⁡q=o(nμ(C))k\log q=o\left(\sqrt{n\mu(C)}\right). Fix ε>0\varepsilon>0 and put r=⌈(e+ε2)nμ(C)⌉r=\left\lceil\left(e+\frac{\varepsilon}{2}\right)\sqrt{n\mu(C)}\right\rceil. For sufficiently large nn, we have 1≤r≤n1\le r\le n and μ(C)≤r\mu(C)\le r. Since 2r≤(2e+ε)nμ(C)2r\le(2e+\varepsilon)\sqrt{n\mu(C)}, Eq. (9) gives

P(dI(C≺)<2dH(C)−(2e+ε)nμ(C))≤exp⁡(2klog⁡q−2rlog⁡renμ(C)+2rrn).\begin{aligned} \mathbb{P}\left(d_{\mathrm{I}}(C_{\prec})<2d_{\mathrm{H}}(C)-(2e+\varepsilon)\sqrt{n\mu(C)}\right) \\ &\le\exp\left(2k\log q-2r\log\frac{r}{e\sqrt{n\mu(C)}}+2r\sqrt{\frac{r}{n}}\right). \end{aligned}

The inequality xlog⁡x≥x−1x\log x\ge x-1 for x>0x>0 implies

rlog⁡renμ(C)≥r−enμ(C).r\log\frac{r}{e\sqrt{n\mu(C)}}\ge r-e\sqrt{n\mu(C)}.

Hence the exponent is at most

−εnμ(C)+2+2klog⁡q+2rrn.-\varepsilon\sqrt{n\mu(C)}+2+2k\log q+2r\sqrt{\frac{r}{n}}.

The last three terms are o(nμ(C))o\left(\sqrt{n\mu(C)}\right). For sufficiently large nn, the failure probability is therefore at most exp⁡(−εnμ(C)/2)\exp\left(-\varepsilon\sqrt{n\mu(C)}/2\right). □\square

When the symbol multiplicities are at most a fixed multiple of their average n/qn/q, the dimension condition follows from the Singleton bound. The resulting distance lower bound has the form 2n−O(n/q)2n-O(n/\sqrt{q}).

Corollary 13. Let CC be a sequence of [n,k]q[n,k]_q linear codes containing a nonconstant word, where q→∞q \to\infty. Suppose that

n−dH(C+)≤Knq.n-d_{\mathrm{H}}(C^+) \le K\frac{n}{q}.

For a fixed constant K>0K>0. For every fixed ε>0\varepsilon>0 and all sufficiently large qq, a uniformly random coordinate order satisfies

P(dI(C≺)≥2n−(2e+ε)Knq)≥1−exp⁡(−εn4q)⟶1.\mathbb{P}\left(d_{\mathrm{I}}(C_{\prec}) \ge2n-(2e+\varepsilon)\sqrt{K}\frac{n}{\sqrt{q}}\right) \ge1-\exp\left(-\frac{\varepsilon n}{4\sqrt{q}}\right)\longrightarrow1.

Proof. Lemma 11 and the Singleton bound give

nq≤μ(C)≤Knq,k≤dim⁡C+≤μ(C)+1≤2μ(C).\frac{n}{q}\le\mu(C)\le K\frac{n}{q},\qquad k\le\dim C^+\le\mu(C)+1\le2\mu(C).

In particular, μ(C)≥1\mu(C)\ge1 and n≥q/Kn\ge q/K. Thus μ(C)=o(n)\mu(C)=o(n) and

klog⁡qnμ(C)≤2Klog⁡qq⟶0.\frac{k\log q}{\sqrt{n\mu(C)}}\le2\sqrt{K}\frac{\log q}{\sqrt{q}}\longrightarrow0.

Apply Theorem 12 with ε/2\varepsilon/2. Since dH(C)≥n−μ(C)d_{\mathrm{H}}(C)\ge n-\mu(C), its distance lower bound is at least

2n−2μ(C)−(2e+ε2)nμ(C)≥2n−(2e+ε)Knq2n-2\mu(C)-\left(2e+\frac{\varepsilon}{2}\right)\sqrt{n\mu(C)} \ge2n-(2e+\varepsilon)\sqrt{K}\frac{n}{\sqrt{q}}

for sufficiently large q.Hereq. Here\sqrt{n\mu(C)}\le\sqrt{K},n/\sqrt{q}and$2μ(C)=o(n/q)and \$2\mu(C)=o(n/\sqrt{q}). Also, nμ(C)≥n/q\sqrt{n\mu(C)}\ge n/\sqrt{q}; thus the failure probability is at most exp⁡(−εn/(4q))\exp(-\varepsilon n/(4\sqrt{q})). Finally, n≥q/Kn\ge q/K implies n/q→∞n/\sqrt{q}\to\infty.

We first apply Theorem 12 to MDS codes containing the all-one vector.

Proposition 14. Let CC be a sequence of [n,k]q[n,k]_q MDS codes containing 1\mathbf{1}, where 2≤k<n2\le k<n and (k−1)(log⁡q)2=o(n)(k-1)(\log q)^2=o(n) as n→∞n\to\infty. For every fixed ε>0\varepsilon>0 and all sufficiently large nn, a uniformly random coordinate order ≺\prec satisfies

P(dI(C≺)≥2(n−k+1)−(2e+ε)(k−1)n)≥1−exp⁡(−ε2(k−1)n)⟶1.\mathbb{P}\left(d_{\mathrm{I}}(C_{\prec})\ge2(n-k+1)-(2e+\varepsilon)\sqrt{(k-1)n}\right) \ge1-\exp\left(-\frac{\varepsilon}{2}\sqrt{(k-1)n}\right)\longrightarrow1.

Proof. Since 1∈C\mathbf{1}\in C, we have C+=CC^+=C and μ(C)=n−dH(C)=k−1\mu(C)=n-d_{\mathrm{H}}(C)=k-1. The result follows from Theorem 12 because (k−1)(log⁡q)2=o(n)(k-1)(\log q)^2=o(n) implies μ(C)=o(n)\mu(C)=o(n) and klog⁡q=o(nμ(C))k\log q=o(\sqrt{n\mu(C)}).

Specializing Proposition 14 to full-length RS codes gives the following corollary.

Corollary 15. Let k≥2k\ge2 satisfy k=o(q/(log⁡q)2)k=o(q/(\log q)^2) as q→∞q\to\infty, and let α\alpha be a uniformly random ordering of Fq\mathbb{F}_q. For every fixed ε>0\varepsilon>0 and all sufficiently large qq,

P(dI(RSq,k(α))≥2(q−k+1)−(2e+ε)(k−1)q)≥1−exp⁡(−ε2(k−1)q)⟶1.\mathbb{P}\left(d_{\mathrm{I}}(\mathrm{RS}_{q,k}(\alpha))\ge2(q-k+1)-(2e+\varepsilon)\sqrt{(k-1)q}\right) \ge1-\exp\left(-\frac{\varepsilon}{2}\sqrt{(k-1)q}\right)\longrightarrow1.

Proof. Since full-length RS codes are MDS codes containing 1\mathbf{1}, the result follows from Proposition 14 with n=qn=q.

Remark 16. Let C=RSq,2(α)C=\mathrm{RS}_{q,2}(\alpha), where α\alpha is a uniformly random ordering of Fq\mathbb{F}_q. Replacing the count (r+cr)2\binom{r+c}{r}^2 in [22], proof of Prop. 2 by the exact count (r+cr)(cc)\binom{r+c}{r}\binom{c}{c} for pairs of increasing index sequences of length rr with a fixed union of size r+cr+c gives, for 3≤r<q3\le r<q,

P(LCS(C)≥r)≤q2∑c=1min⁡{r,q−r}qc(r−c)!(c!)2≤q2qr(r!)2exp⁡(r2q).\mathbb{P}(\mathrm{LCS}(C)\ge r)\le q^2\sum_{c=1}^{\min\{r,q-r\}}\frac{q^c}{(r-c)!(c!)^2}\le q^2\frac{q^r}{(r!)^2}\exp\left(\frac{r^2}{q}\right).

The last inequality follows by setting j=r−cj=r-c and using r!/(r−j)!≤rjr!/(r-j)! \le r^j. For every fixed ε>0\varepsilon>0, taking r=⌈(e+ε/2)q⌉r=\lceil(e+\varepsilon/2)\sqrt{q}\rceil and using r!≥(r/e)rr!\ge(r/e)^r yields dI(C)≥2q−(2e+ε)qd_{\mathrm I}(C)\ge2q-(2e+\varepsilon)\sqrt{q} with probability at least 1−exp⁡(−Ωε(q))1-\exp(-\Omega_{\varepsilon}(\sqrt{q})) for all sufficiently large qq.

We next apply Corollary 13 to two non-MDS codes obtained by evaluating affine functions.

Example 17. Let q≥3q\ge3 be a prime power. The code

C=RM⁡q(1,2)={(a+bx+cy)(x,y)∈Fq2:a,b,c∈Fq}C=\operatorname{RM}_q(1,2)=\{(a+bx+cy)_{(x,y)\in\mathbb{F}_q^2}:a,b,c\in\mathbb{F}_q\}

is the first-order Reed–Muller code on Fq2\mathbb{F}_q^2 [29]. Since every nonconstant affine function takes each value exactly qq times, CC has parameters [q2,3,q2−q]q[q^2,3,q^2-q]_q and is not MDS. It contains 11 and satisfies

μ(C)=n−dH(C+)=q=nq.\mu(C)=n-d_{\mathrm H}(C^+)=q=\frac{n}{q}.

For every fixed ε>0\varepsilon>0 and all sufficiently large qq, Corollary 13 with K=1K=1 gives

P(dI(C≺)≥2q2−(2e+ε)q3/2)≥1−exp⁡(−ε4q3/2)⟶1\mathop{\mathbf{P}}\left(d_{\mathrm I}(C_{\prec})\ge2q^2-(2e+\varepsilon)q^{3/2}\right) \ge1-\exp\left(-\frac{\varepsilon}{4}q^{3/2}\right)\longrightarrow1

for a uniformly random coordinate order ≺\prec.

A second example is obtained by evaluating affine functions on the affine rational points of a Hermitian curve.

Example 18. Let qq be a prime power and let SS be the set of affine Fq2\mathbb{F}_{q^2}-rational points of the Hermitian curve

yq+y=xq+1.y^q+y=x^{q+1}.

The Hermitian curve code

C={(a+bx+cy)(x,y)∈S:a,b,c∈Fq2}C=\{(a+bx+cy)_{(x,y)\in S}:a,b,c\in\mathbb{F}_{q^2}\}

has parameters [q3,3,q3−q−1]q2[q^3,3,q^3-q-1]_{q^2} and is not MDS [27 Sec. 8.3]. Since 1∈C1\in C, we have

μ(C)=n−dH(C+)=q+1≤2nq2,n=q3.\mu(C)=n-d_{\mathrm H}(C^+)=q+1\le2\frac{n}{q^2},\qquad n=q^3.

For every fixed ε>0\varepsilon>0 and all sufficiently large qq, Corollary 13 with alphabet size q2q^2 and K=2K=2 gives

P(dI(C≺)≥2q3−(2e+ε)2q2)≥1−exp⁡(−ε4q2)⟶1\mathop{\mathbf{P}}\left(d_{\mathrm I}(C_{\prec})\ge2q^3-(2e+\varepsilon)\sqrt{2}q^2\right) \ge1-\exp\left(-\frac{\varepsilon}{4}q^2\right)\longrightarrow1

for a uniformly random coordinate order ≺\prec.

An Upper Bound on the Insdel Distance of Projective Linear Codes

We now complement the preceding probabilistic lower bounds with an alphabet-dependent upper bound on the insdel distance of projective linear codes that holds for every coordinate order. Combined with the high-probability lower bound of Corollary 13, it determines the maximum attainable insdel distance to be 2n−Θ(n/q)2n-\Theta(n/\sqrt{q}) when the nonconstant codewords have symbol multiplicities O(n/q)O(n/q).

A linear code is projective if any two columns of a generator matrix are linearly independent. This ensures pairwise independence of coordinate matching indicators for two independent random codewords. A second-moment argument over consecutive blocks then yields a long common subsequence.

Theorem 19. Let CC be a projective [n,k]q[n,k]_q linear code with k≥2k\ge2. Then

dImax⁡(C)≤2n−(1−1⌊q⌋)⌊n⌊q⌋⌋.(10)d_{\mathrm I}^{\max}(C)\le2n-\left(1-\frac{1}{\lfloor\sqrt{q}\rfloor}\right)\left\lfloor\frac{n}{\lfloor\sqrt{q}\rfloor}\right\rfloor. \tag*{(10)}

Proof. Fix a coordinate order, and let g1,…,gn∈Fqkg_1,\ldots,g_n \in\mathbb{F}_q^k be the generator columns. Set b=⌊q⌋b=\lfloor\sqrt{q}\rfloor and M=⌊n/b⌋M=\lfloor n/b\rfloor, and take MM disjoint consecutive blocks of length bb. Choose U,V∈FqkU,V \in\mathbb{F}_q^k independently and uniformly. For each block BB, let

XB=∑i,j∈B1{U⋅gi=V⋅gj}.X_B=\sum_{i,j\in B}\mathbf{1}_{\{U\cdot g_i=V\cdot g_j\}}.

Since the generator columns are nonzero and pairwise nonproportional, distinct equalities in this sum impose independent linear conditions on (U,V)(U,V). Thus the indicators are pairwise independent, each with mean 1/q1/q, and

E[XB]=b2q,E[XB2]=b2q+b2(b2−1)q2.\mathbb{E}[X_B]=\frac{b^2}{q},\qquad\mathbb{E}[X_B^2]=\frac{b^2}{q}+\frac{b^2(b^2-1)}{q^2}.

By Cauchy–Schwarz,

P(XB>0)≥E[XB]2E[XB2]=b2q+b2−1.\mathbb{P}(X_B>0)\ge\frac{\mathbb{E}[X_B]^2}{\mathbb{E}[X_B^2]}=\frac{b^2}{q+b^2-1}.

Let YY count the blocks with XB>0X_B>0. Then

E[Y]≥Mb2q+b2−1.\mathbb{E}[Y]\ge M\frac{b^2}{q+b^2-1}.

Since Y=MY=M whenever U=VU=V, and P(U=V)=q−k\mathbb{P}(U=V)=q^{-k},

E[Y∣U≠V]≥Mb2/(q+b2−1)−q−k1−q−k.\mathbb{E}[Y\mid U\ne V]\ge M\frac{b^2/(q+b^2-1)-q^{-k}}{1-q^{-k}}.

As q≤b2+2bq\le b^2+2b and qk≥(b+1)2q^k\ge(b+1)^2, we have

b2/(q+b2−1)−q−k1−q−k≥b/(2(b+1))−q−k1−q−k≥b−12b.\frac{b^2/(q+b^2-1)-q^{-k}}{1-q^{-k}} \ge\frac{b/(2(b+1))-q^{-k}}{1-q^{-k}} \ge\frac{b-1}{2b}.

Consequently,

E[Y∣U≠V]≥b−12bM.\mathbb{E}[Y\mid U\ne V]\ge\frac{b-1}{2b}M.

Hence there exist U≠VU\ne V for which Y≥(b−1)M/(2b)Y\ge(b-1)M/(2b). The corresponding codewords are distinct, and one matching pair from each of these blocks gives a common subsequence of length at least YY. Therefore,

dI(C)≤2n−2Yd_I(C)\le2n-2Y
≤2n−(1−1b)M=2n−(1−1⌊q⌋)⌊n⌊q⌋⌋.\begin{aligned} \le2n-\left(1-\frac{1}{b}\right)M \\ &=2n-\left(1-\frac{1}{\lfloor\sqrt{q}\rfloor}\right)\left\lfloor\frac{n}{\lfloor\sqrt{q}\rfloor}\right\rfloor. \end{aligned}

Remark 20. We compare Theorem 19 with earlier upper bounds for projective [n,k]q[n,k]_q codes with k≥2k\ge2 as q→∞q\to\infty, assuming μ(C)=n−dH(C+)=O(n/q)\mu(C)=n-d_H(C^+)=O(n/q). Table II states the upper bounds directly for the insdel distance of an arbitrarily ordered code. The earlier bounds in the table have right-hand sides of the form 2n−O(n/q)2n-O(n/q), whereas Theorem 19 gives 2n−Θ(n/q)2n-\Theta(n/\sqrt{q}). Together with Corollary 13, this yields dImax⁡(C)=2n−Θ(n/q)d_I^{\max}(C)=2n-\Theta(n/\sqrt{q}), a uniformly random coordinate order attains the same asymptotic distance with high probability.

The strict half-Singleton bound applies only if 1∉C\mathbf{1}\notin C [12]. For the strict direct bound, Corollary 6.2 of [12] applies here for sufficiently large qq: projectivity holds by assumption, while dH(C)≥n−μ(C)>(n+1)/2d_H(C)\ge n-\mu(C)>(n+1)/2. The Singleton bound and C⊆C+C\subseteq C^+ give 1≤k−1≤n−dH(C)≤μ(C)=O(n/q)1\le k-1\le n-d_H(C)\le\mu(C)=O(n/q), and thus n/q=Ω(1)n/q=\Omega(1). In Chen’s bound [11 Thm. 2.1], h≺h_{\prec} is the number of selected linearly independent generator columns, and z≺z_{\prec} is the number of zero coordinates of a chosen nonzero codeword before the first or after the last selected position in the order ≺\prec. Hence h≺≤kh_{\prec}\le k and z≺≤n−dH(C)z_{\prec}\le n-d_H(C) for every ≺\prec, giving h≺+z≺−1=O(n/q)h_{\prec}+z_{\prec}-1=O(n/q) uniformly in ≺\prec. In Xie et al.’s bound [14], LL is a common lower bound on the Hamming weights of two linearly independent codewords. Since L≤nL\le n, we have ⌈L/(q−1)⌉=O(n/q)\lceil L/(q-1)\rceil=O(n/q).

BoundsUpper bounds on dI(C≺)d_I(C_{\prec})Asymptotic form of the bounds
Half-Singleton [10]2n−(4k−4)2n-(4k-4)2n−O(n/q)2n-O(n/q)
Strict half-Singleton [12]2n−(4k−2)2n-(4k-2)2n−O(n/q)2n-O(n/q)
Direct bound2dH(C)2d_H(C)2n−O(n/q)2n-O(n/q)
Strict direct bound [12]2(dH(C)−1)2(d_H(C)-1)2n−O(n/q)2n-O(n/q)
Chen [11 Thm. 2.1]2n−2(h≺+z≺−1)2n-2(h_{\prec}+z_{\prec}-1)2n−O(n/q)2n-O(n/q)
Xie et al. [14 Thm. 2.1]2n−2⌈L/(q−1)⌉2n-2\lceil L/(q-1)\rceil2n−O(n/q)2n-O(n/q)
Theorem 192n−(1−1⌊q⌋)⌈n⌊q⌋⌉2n-\left(1-\frac{1}{\lfloor\sqrt{q}\rfloor}\right)\left\lceil\frac{n}{\lfloor\sqrt{q}\rfloor}\right\rceil2n−Θ(n/q)2n-\Theta(n/\sqrt{q})

Table 2. Upper bounds on dI(C≺)d_I(C_{\prec}) for an arbitrary coordinate order ≺\prec of a projective [n,k]q[n,k]_q code with μ(C)=O(n/q)\mu(C)=O(n/q).

Explicit Orderings of Full-Length Reed–Solomon Codes with Large Insdel Distance

We now return to full-length RS codes and seek explicit orderings with distance 2q−Θ(q)2q-\Theta(\sqrt{q}) for fixed dimension. Corollary 15 and Theorem 19 show that random orderings attain this asymptotic distance. Over square fields, we construct such orderings by partitioning the evaluation points into consecutive blocks and using algebraic intersection bounds to control common values between blocks.

Lemma 21. Let GG be a bipartite graph with vertex classes V−V^{-} and V+V^{+}, both copies of a finite set VV. Let V=V1⊔⋯⊔VmV=V_1\sqcup\cdots\sqcup V_m be a partition of VV into nonempty subsets, and fix an order ≺\prec on VV in which these subsets appear as consecutive blocks in the order V1,…,VmV_1,\ldots,V_m. The order within each block is arbitrary, and the same order is used on both vertex classes. For each ii, let Vi−V_i^{-} and Vi+V_i^{+} denote the copies of ViV_i in V−V^{-} and V+V^{+}, respectively, and write G[Vi−,Vj+]G[V_i^{-},V_j^{+}] for the subgraph induced by Vi−∪Vj+V_i^{-}\cup V_j^{+}. Suppose that G[Vi−,Vj+]G[V_i^{-},V_j^{+}] has ordinary matching number at most bb for every 1≤i,j≤m1\leq i,j\leq m. Then

L≺(G)≤(2m−1)b.L_{\prec}(G)\leq(2m-1)b.

Proof. Let MM be a nonempty noncrossing matching, and list its edges in increasing order of their left endpoints. Their right endpoints occur in the same order. Thus, the corresponding block indices are nondecreasing in both coordinates. After removing consecutive repetitions, let (i1,j1),…,(it,jt)(i_1,j_1),\ldots,(i_t,j_t) be the block pairs visited. Since at least one index increases at each step,

t−1≤(it−i1)+(jt−j1)≤2(m−1).t-1\leq(i_t-i_1)+(j_t-j_1)\leq2(m-1).

The edges of MM belonging to any one block pair form an ordinary matching of size at most bb. Consequently,

∣M∣≤tb≤(2m−1)b.|M|\leq tb\leq(2m-1)b.

In the proof of Lemma 21, the block indices (i,j)(i,j) along a noncrossing matching are nondecreasing in both coordinates. The following figure shows a possible sequence of five distinct block pairs for m=3m=3, attaining the maximum 5.

Five successive block pairs for $m=3$

Figure 2. Five successive block pairs for m=3m=3.

For general dimension kk, we give the following construction of full-length RS codes. For each fixed kk, the resulting code has distance 2q−Θ(q)2q-\Theta(\sqrt{q}), hence the construction is order-optimal.

Theorem 22. Let k≥2k \ge2, and let q=q02q = q_0^2 be a square prime power of characteristic p>k+1p > k + 1. Choose θ∈Fq∖Fq0\theta\in\mathbb{F}_q \setminus\mathbb{F}_{q_0}. For each c∈Fq0c \in\mathbb{F}_{q_0}, define

Sc={x+θy:x,y∈Fq0, xk+1+yk=c}.S_c = \{x + \theta y : x,y \in\mathbb{F}_{q_0},\ x^{k+1} + y^k = c\}.

List the nonempty sets ScS_c consecutively to obtain an ordering α\alpha of Fq\mathbb{F}_q. Both the order of the sets and the orders within them may be arbitrary. Then

dI(RS⁡q,k(α))≥2q−4(1+(k+1)2(k−1)3)q.(11)d_{\mathrm{I}}(\operatorname{RS}_{q,k}(\alpha)) \ge2q - 4(1+(k+1)^2(k-1)^3)\sqrt{q}. \tag*{(11)}

For fixed kk, such an ordering can be constructed deterministically in time polynomial in qq.

To apply Lemma 21, we bound matchings between nonzero blocks through intersections of plane curves. Work over K=F‾qK=\overline{\mathbb{F}}_q, and let σ:a↦aq0\sigma:a\mapsto a^{q_0} be the Frobenius automorphism of Fq/Fq0\mathbb{F}_q/\mathbb{F}_{q_0}. For f∈Fq[T]f\in\mathbb{F}_q[T], write fσf^\sigma for the polynomial obtained by applying σ\sigma coefficientwise to ff. For c∈Fq0∗c\in\mathbb{F}_{q_0}^*, let FcF_c be the function field in Lemma 5 with (r,s)=(k+1,k)(r,s)=(k+1,k), and let XcX_c be its nonsingular projective model. We identify Xc∖{P∞}X_c\setminus\{P_\infty\} with the affine curve Xk+1+Yk=cX^{k+1}+Y^k=c. For a nonconstant polynomial f∈Fq[T]f\in\mathbb{F}_q[T], let Γf,c\Gamma_{f,c} be the Zariski closure in K2K^2 of the image of Xc∖{P∞}X_c\setminus\{P_\infty\} under the map

(x,y)⟼(f(x+θy),fσ(x+θq0y)).(x,y)\longmapsto\left(f(x+\theta y),f^\sigma(x+\theta^{q_0}y)\right).

The first coordinate function has pole order (k+1)deg⁡f(k+1)\deg f at P∞P_\infty. Hence, Lemma 7 with S={P∞}S=\{P_\infty\} shows that Γf,c\Gamma_{f,c} is an irreducible plane curve.

Lemma 23. Let c,d∈Fq0∗c,d\in\mathbb{F}_{q_0}^* and let f,h∈Fq[T]f,h\in\mathbb{F}_q[T] be nonconstant polynomials of degree less than kk. Then

deg⁡Γf,c≤(k+1)deg⁡f.(12)\deg\Gamma_{f,c}\le(k+1)\deg f. \tag*{(12)}

Moreover, Γf,c≠Γh,d\Gamma_{f,c}\ne\Gamma_{h,d} if f≠hf\ne h.

Proof. Let m=deg⁡fm=\deg f, by Lemma 7, a general affine line ℓ\ell meets Γf,c\Gamma_{f,c} in deg⁡Γf,c\deg\Gamma_{f,c} distinct points, all lying in the image of the map. Substituting the coordinate functions of the map into the equation of ℓ\ell gives a plane curve of degree at most mm that intersects Xk+1+Yk=cX^{k+1}+Y^k=c in at least deg⁡Γf,c\deg\Gamma_{f,c} distinct points. Bézout’s theorem (Theorem 8) now yields (12).

By Lemma 7, we identify

K(Γf,c)=K(f(x+θy),fσ(x+θq0y))⊆Fc.K(\Gamma_{f,c})=K\left(f(x+\theta y),f^\sigma(x+\theta^{q_0}y)\right)\subseteq F_c.

Let ama_m be the leading coefficient of ff, and let N=m(k+1)N=m(k+1). Both generators have pole divisor NP∞NP_\infty. Consider the normalized difference

w=f(x+θy)amθm−fσ(x+θq0y)amq0θmq0∈K(Γf,c).w=\frac{f(x+\theta y)}{a_m\theta^m}-\frac{f^\sigma(x+\theta^{q_0}y)}{a_m^{q_0}\theta^{mq_0}}\in K(\Gamma_{f,c}).

The ymy^m terms cancel, while the coefficient of xym−1xy^{m-1} is m(θ−1−θ−q0)≠0m(\theta^{-1}-\theta^{-q_0})\ne0, since m<pm<p and θ∉Fq0\theta\notin\mathbb{F}_{q_0}. A monomial xiyjx^iy^j has pole order ki+(k+1)jki+(k+1)j. Thus xym−1xy^{m-1} has pole order N−1N-1, whereas the other degree mm terms have pole order at most N−2N-2 and the lower-degree terms have pole order at most (m−1)(k+1)(m-1)(k+1). Since ww has no finite poles, (w)∞=(N−1)P∞(w)_\infty=(N-1)P_\infty. Eq. (5) therefore gives

[Fc:K(f(x+θy))]=N,[Fc:K(w)]=N−1.[F_c:K(f(x+\theta y))]=N,\qquad[F_c:K(w)]=N-1.

Both subfields lie in K(Γf,c)K(\Gamma_{f,c}), so the tower law shows that [Fc:K(Γf,c)][F_c:K(\Gamma_{f,c})] divides both NN and N−1N-1. These integers are coprime, and hence K(Γf,c)=FcK(\Gamma_{f,c})=F_c.

Suppose Γf,c=Γh,d\Gamma_{f,c}=\Gamma_{h,d}. The preceding calculation identifies FcF_c and FdF_d with the function field of their common image. Let x′,y′∈Fcx',y'\in F_c be the images of the generators of FdF_d. The first coordinate of the image has a unique pole on each curve. Thus their places at infinity correspond, and comparison of its pole orders gives deg⁡h=m\deg h=m. By Lemma 5,

L(kP∞)=⟨1,x⟩K,L((k+1)P∞)=⟨1,x,y⟩K.\mathcal{L}(kP_\infty)=\langle1,x\rangle_K,\qquad\mathcal{L}((k+1)P_\infty)=\langle1,x,y\rangle_K.

Since x′x' and y′y' have pole orders exactly kk and k+1k+1, respectively, they take the form

x′=ax+b,y′=ux+vy+e,av≠0.x'=ax+b,\qquad y'=ux+vy+e,\qquad av\ne0.

Equality of the coordinate functions on the common image yields

f(x+θy)=h(x′+θy′),f(x+\theta y)=h(x'+\theta y'),
fq0(x+θq0y)=hq0(x′+θq0y′).f^{q_0}(x+\theta^{q_0}y)=h^{q_0}(x'+\theta^{q_0}y').

After substituting these expressions and replacing x,yx,y by X,YX,Y, the differences of the two sides are polynomials of degree at most m<k+1m<k+1 that vanish on Xk+1+Yk=cX^{k+1}+Y^k=c. The ideal of this irreducible curve is generated by Xk+1+Yk−cX^{k+1}+Y^k-c. Each difference is therefore divisible by this polynomial, and the degree bound forces both differences to be zero polynomials. Comparing the XmX^m and Xm−1YX^{m-1}Y coefficients gives

a+θu=v=a+θq0u.a+\theta u=v=a+\theta^{q_0}u.

Thus u=0u=0 and v=av=a. The relation (x′)k+1+(y′)k=d(x')^{k+1}+(y')^k=d now shows that (aX+b)k+1+(aY+e)k−d(aX+b)^{k+1}+(aY+e)^k-d is a scalar multiple of Xk+1+Yk−cX^{k+1}+Y^k-c. Comparing the coefficients of Xk+1X^{k+1} and YkY^k gives ak+1=aka^{k+1}=a^k, and hence a=1a=1. Since p>k+1p>k+1, the coefficients of XkX^k and Yk−1Y^{k-1} give b=e=0b=e=0. It follows that c=dc=d, and the first coordinate identity reduces to f(x+θy)=h(x+θy)f(x+\theta y)=h(x+\theta y). Since x+θyx+\theta y is nonconstant, this implies f=hf=h.

Now we can prove Theorem 22.

Proof of Theorem 22. Let f,h∈Fq[T]f,h\in\mathbb{F}_q[T] be distinct nonconstant polynomials of degree less than kk. The edges between blocks ScS_c and SdS_d in their relation graph correspond to pairs of evaluation points with the same polynomial value. For x+θy∈Scx+\theta y\in S_c with x,y∈Fq0x,y\in\mathbb{F}_{q_0}, the corresponding point of Γf,c\Gamma_{f,c} is (f(x+θy),f(x+θy)q0)(f(x+\theta y),f(x+\theta y)^{q_0}). Hence, when c,d≠0c,d\ne0, distinct common values in f(Sc)∩h(Sd)f(S_c)\cap h(S_d) give distinct points of Γf,c∩Γh,d\Gamma_{f,c}\cap\Gamma_{h,d}. The curves are distinct by Lemma 23, so Bézout’s theorem bounds the number of common values by (k+1)2deg⁡fdeg⁡h(k+1)^2\deg f\deg h. Each value contributes at most min⁡{deg⁡f,deg⁡h}\min\{\deg f,\deg h\} edges to a matching, since a nonconstant polynomial takes any given value at most as many times as its degree. Thus the ordinary matching number between any two nonzero blocks is at most

(k+1)2deg⁡fdeg⁡hmin⁡{deg⁡f,deg⁡h}≤(k+1)2(k−1)3.(k+1)^2\deg f\deg h\min\{\deg f,\deg h\}\le(k+1)^2(k-1)^3.

We claim that ∣S0∣=q0|S_0|=q_0. Apart from (0,0)(0,0), the solutions of xk+1+yk=0x^{k+1}+y^k=0 over Fq0\mathbb{F}_{q_0} are parametrized by

(x,y)=(−tk,−tk+1),t∈Fq0×,(x,y)=(-t^k,-t^{k+1}),\qquad t\in\mathbb{F}_{q_0}^{\times},

where tt is uniquely recovered as y/xy/x, giving exactly q0−1q_0-1 nonzero solutions. Deleting all edges incident to S0S_0 on either side of a noncrossing matching therefore removes at most 2q02q_0 edges, leaving a matching supported on at most q0−1q_0-1 consecutive blocks on each side, with the preceding matching bound applicable to every pair of remaining blocks. Lemma 21 gives

LCS⁡(f(α),h(α))≤2q0+(2q0−3)(k+1)2(k−1)3\operatorname{LCS}(f(\alpha),h(\alpha))\le2q_0+(2q_0-3)(k+1)^2(k-1)^3
≤2(1+(k+1)2(k−1)3)q0.\le2\bigl(1+(k+1)^2(k-1)^3\bigr)q_0.

The LCS is at most k−1k-1 if exactly one polynomial is constant, and zero for distinct constants. This completes the proof.

In dimension two, we show that alternative choices of the level set polynomials yield the same asymptotic distance bound in characteristics 2 and 3.

Proposition 24. Let q=q02q=q_0^2 have characteristic p∈{2,3}p\in\{2,3\}. Choose θ∈Fq∖Fq0\theta\in\mathbb{F}_q\setminus\mathbb{F}_{q_0}, and set

(r,s)={(5,2),p=3,(5,3),p=2.(r,s)= \begin{cases} (5,2), & p=3,\\ (5,3), & p=2. \end{cases}

For each c∈Fq0c\in\mathbb{F}_{q_0}, define

Sc={x+θy:x,y∈Fq0, xr+ys=c}.S_c=\{x+\theta y:x,y\in\mathbb{F}_{q_0},\ x^r+y^s=c\}.

List the nonempty sets ScS_c consecutively to obtain an ordering α\alpha of Fq\mathbb{F}_q. Both the order of the sets and the orders within them may be arbitrary. Then

dI(RS⁡q,2(α))≥2q−100q+50.(13)d_{\mathrm{I}}(\operatorname{RS}_{q,2}(\alpha))\ge2q-100\sqrt{q}+50. \tag*{(13)}

Proof. The exponents satisfy gcd⁡(r,s)=1\gcd(r,s)=1, p∤rsp\nmid rs, and r−s=pr-s=p. Write θ2=τθ+ν\theta^2=\tau\theta+\nu, where τ,ν∈Fq0\tau,\nu\in\mathbb{F}_{q_0} and ν≠0\nu\ne0. For every nonidentity affine map γ(z)=az+b\gamma(z)=az+b with a≠0a\ne0, we claim that

∣Sc∩γ−1(Sd)∣≤25.(14)\left|S_c\cap\gamma^{-1}(S_d)\right|\le25. \tag*{(14)}

Write a=a0+a1θa=a_0+a_1\theta and b=b0+b1θb=b_0+b_1\theta. The points counted in Eq. (14) correspond to common affine points of

Xr+Ys=cX^r+Y^s=c

and

(a0X+νa1Y+b0)r+(a1X+(a0+τa1)Y+b1)s=d.(a_0X+\nu a_1Y+b_0)^r+(a_1X+(a_0+\tau a_1)Y+b_1)^s=d.

Both curves are absolutely irreducible of degree r=5r=5 by Lemma 6 and the invertibility of multiplication by aa. If the curves had a common component, their defining polynomials would differ by a nonzero scalar factor λ\lambda. Comparing homogeneous terms of degree rr would give

(a0X+νa1Y)r=λXr.(a_0X+\nu a_1Y)^r=\lambda X^r.

Thus a1=0a_1=0 and λ=a0r\lambda=a_0^r. The coefficients of Xr−1X^{r-1} and Ys−1Y^{s-1} then give b0=b1=0b_0=b_1=0, since p∤rsp\nmid rs. Comparing the coefficients of YsY^s gives a0r−s=1a_0^{r-s}=1. As r−s=pr-s=p, this forces a0=1a_0=1, contradicting γ≠id\gamma\ne\mathrm{id}. Then Bézout’s theorem proves Eq. (14).

For distinct nonconstant affine polynomials f,hf,h, the relation f(x)=h(y)f(x)=h(y) is y=γ(x)y=\gamma(x) for the nonidentity affine map γ=h−1∘f\gamma=h^{-1}\circ f. Its relation graph is a matching with at most 25 edges in each block pair. Lemma 21 gives

LCS⁡(f(α),h(α))≤25(2q0−1).\operatorname{LCS}(f(\alpha),h(\alpha))\le25(2q_0-1).

A distinct pair involving a constant polynomial has LCS at most one. This completes the proof.

Together with Theorem 22 for k=2k=2, this proposition gives deterministic orderings with distance 2q−Θ(q)2q-\Theta(\sqrt{q}) over every square field.

Conclusion

In this paper, we investigated how coordinate orderings affected the insertion-deletion performance of linear codes over large alphabets. The connection between common subsequences and noncrossing matchings provided a common perspective on the distance attainable by random permutations and the design of explicit orderings. For projective linear codes with suitably controlled symbol multiplicities, our results showed that random orderings attained the best possible asymptotic order Θ(n/q)\Theta(n/\sqrt{q}) of the gap from 2n2n. This understanding also led to explicit orderings for full-length Reed–Solomon codes of fixed dimension over square fields, which achieved a gap of the same square-root order.

A more precise understanding of the maximum attainable distance remains of interest, particularly the constants in the gap of order n/qn/\sqrt{q} from 2n2n. In particular, for full-length Reed–Solomon codes, it would be interesting to determine the coefficient of the q\sqrt{q} term for fixed dimensions and to understand how the maximum distance changes when the dimension grows with the field size. Extending the explicit constructions to arbitrary finite fields would also be a natural direction for further study.

References

References

  1. [1]M. Cheraghchi and J. Ribeiro, “An overview of capacity results for synchronization channels,” IEEE Trans. Inf. Theory, vol. 67, no. 6, pp. 3207–3232, Jun. 2021.arxiv.org/abs/1910.07199
  2. [2]B. Haeupler and A. Shahrabsi, “Synchronization strings and codes for insertions and deletions—A survey,” IEEE Trans. Inf. Theory, vol. 67, no. 6, pp. 3190–3206, Jun. 2021.arxiv.org/abs/2101.00711
  3. [3]V. I. Levenshtein, “Binary codes capable of correcting deletions, insertions, and reversals,” Sov. Phys. Dokl., vol. 10, no. 8, pp. 707–710, Feb. 1966.
  4. [4]R. R. Varshamov and G. M. Tenengolts, “Codes which correct single asymmetric errors,” Autom. Remote Control, vol. 26, no. 2, pp. 286–290, 1965.
  5. [5]J. Brakensiek, V. Guruswami, and S. Zbarsky, “Efficient low-redundancy codes for correcting multiple deletions,” IEEE Trans. Inf. Theory, vol. 64, no. 5, pp. 3403–3410, May 2018.
  6. [6]J. Sima and J. Bruck, “On optimal k-deletion correcting codes,” IEEE Trans. Inf. Theory, vol. 67, no. 6, pp. 3360–3375, Jun. 2021.DOI
  7. [7]V. Guruswami and J. Håstad, “Explicit two-deletion codes with redundancy matching the existential bound,” IEEE Trans. Inf. Theory, vol. 67, no. 10, pp. 6384–6394, Oct. 2021.
  8. [8]S. Liu, I. Tjuawinata, and C. Xing, “Explicit construction of q-ary 2-deletion correcting codes with low redundancy,” IEEE Trans. Inf. Theory, vol. 70, no. 6, pp. 4093–4101, Jun. 2024.arxiv.org/abs/2306.02868
  9. [9]K. A. S. Abdel-Ghaffar, H. C. Ferreira, and L. Cheng, “Correcting deletions using linear and cyclic codes,” IEEE Trans. Inf. Theory, vol. 56, no. 10, pp. 5223–5234, Oct. 2010.
  10. [10]K. Cheng, V. Guruswami, B. Haeupler, and X. Li, “Efficient linear and affine codes for correcting insertions/deletions,” SIAM J. Discrete Math., vol. 37, no. 2, pp. 748–778, Jun. 2023.
  11. [11]H. Chen, “Concordant-ordering-free upper bounds for linear insertion-deletion codes,” IEEE Trans. Inf. Theory, vol. 68, no. 8, pp. 5126–5132, Aug. 2022.DOI
  12. [12]Q. Ji, D. Zheng, H. Chen, and X. Wang, “Strict half-Singleton bound, strict direct upper bound for linear insertion-deletion codes and optimal codes,” IEEE Trans. Inf. Theory, vol. 69, no. 5, pp. 2900–2910, May 2023.arxiv.org/abs/2206.00287
  13. [13]B. Chen and G. Zhang, “Improved Singleton bound on insertion-deletion codes and optimal constructions,” IEEE Trans. Inf. Theory, vol. 68, no. 5, pp. 3028–3033, May 2022.arxiv.org/abs/2105.02004
  14. [14]C. Xie, H. Chen, L. Qu, and L. Liu, “New dimension-independent upper bounds on linear insdel codes,” Adv. Math. Commun., vol. 18, no. 6, pp. 1575–1589, Dec. 2024.
  15. [15]R. Qiu, S. Zhu, Y. Li, and Z. Sun, “On the indel error-correcting capacities of binary Reed–Muller codes and simplex codes,” IEEE Trans. Inf. Theory, vol. 72, no. 4, pp. 2099–2111, Apr. 2026.DOI
  16. [16]T. D. Duc, S. Liu, I. Tjuawinata, and C. Xing, “Explicit constructions of two-dimensional Reed–Solomon codes in high insertion and deletion noise regime,” IEEE Trans. Inf. Theory, vol. 67, no. 5, pp. 2808–2820, May 2021.arxiv.org/abs/1909.03426
  17. [17]S. Liu and I. Tjuawinata, “On 2-dimensional insertion-deletion Reed–Solomon codes with optimal asymptotic error-correcting capability,” Finite Fields Appl., vol. 73, Aug. 2021, Art. no. 101841.DOI
  18. [18]R. Con, A. Shpilka, and I. Tamo, “Reed Solomon codes against adversarial insertions and deletions,” IEEE Trans. Inf. Theory, vol. 69, no. 5, pp. 2991–3000, May 2023.
  19. [19]J. Liu, “Optimal RS codes and GRS codes against adversarial insertions and deletions and optimal constructions,” IEEE Trans. Inf. Theory, vol. 70, no. 9, pp. 6269–6279, Sep. 2024.DOI
  20. [20]R. Con, A. Shpilka, and I. Tamo, “Optimal two-dimensional Reed–Solomon codes correcting insertions and deletions,” IEEE Trans. Inf. Theory, vol. 70, no. 7, pp. 5012–5016, Jul. 2024.arxiv.org/abs/2311.02771
  21. [21]R. Con, Z. Guo, R. Li, and Z. Zhang, “Random Reed–Solomon codes achieve the half-Singleton bound for insertions and deletions over linear-sized alphabets,” in Proc. 52nd Int. Colloq. Automata, Languages, and Programming (ICALP), ser. Leibniz International Proceedings in Informatics (LIPIcs), vol. 334, 2025, pp. 60:1–60:21.arxiv.org/abs/2407.07299
  22. [22]P. Beelen, R. Con, A. Gruica, M. Montanucci, and E. Yaakobi, “Reed–Solomon codes against insertions and deletions: Full-length and rate-1/2 codes,” IEEE Trans. Inf. Theory, vol. 72, no. 2, pp. 1149–1160, Feb. 2026.
  23. [23]B. Haeupler and A. Shahrasbi, “Synchronization strings: Codes for insertions and deletions approaching the Singleton bound,” in Proc. 49th Annu. ACM SIGACT Symp. Theory Comput. (STOC), Jun. 2017, pp. 33–46.DOI
  24. [24]M. Kiwi, M. Loebl, and J. Matoušek, “Expected length of the longest common subsequence for large alphabets,” Adv. Math., vol. 197, no. 2, pp. 480–498, Nov. 2005.
  25. [25]L. Lovász and M. D. Plummer, Matching Theory. Providence, RI, USA: AMS Chelsea Publishing, 2009.
  26. [26]B. E. Sagan, Combinatorics: The Art of Counting, ser. Graduate Studies in Mathematics, vol. 210. Providence, RI, USA: American Mathematical Society, 2020.DOI
  27. [27]H. Stichtenoth, Algebraic Function Fields and Codes, 2nd ed. Berlin, Germany: Springer, 2009.DOI
  28. [28]W. Fulton, Algebraic Curves: An Introduction to Algebraic Geometry. Redwood City, CA, USA: Addison-Wesley, 1989.
  29. [29]P. Delsarte, J.-M. Goethals, and F. J. MacWilliams, “On generalized Reed–Muller codes and their relatives,” Inf. Control, vol. 16, no. 5, pp. 403–442, Jul. 1970.

Paper details

vlnc:W_ktbnf7ae
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents