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 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 , a uniformly random coordinate permutation yields insdel distance at least with high probability for sufficiently large . Furthermore, for projective linear codes satisfying the same symbol multiplicity condition, we show that the maximum attainable insdel distance is . As an application, for MDS codes containing the all-one vector, random coordinate permutations yield insdel distance at least with high probability whenever . In particular, for full-length Reed–Solomon (RS) codes, we obtain the lower bound with high probability for , 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 .
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 .
For vectors , the Hamming distance counts the coordinates in which they differ. Their insdel distance 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 , take the evaluation vector and consider the three-dimensional full-length Reed–Solomon code . This code has Hamming distance , but its insdel distances over the permutations of the coordinates are distributed as shown in Table I.
| Permutations | Percentage (%) | |
| 2 | 382 668 | 0.00614528 |
| 4 | 42 183 492 | 0.67742655 |
| 6 | 1 422 576 324 | 22.84521555 |
| 8 | 4 728 796 020 | 75.93994258 |
| 10 | 33 082 296 | 0.53127004 |
Table I. Insdel distance distribution over all coordinate permutations of over , where .
Several upper bounds on the insdel distance of linear codes have been established in recent years. For an linear code , Cheng et al. [10] proposed the half-Singleton bound, and Chen [11] gave its non-asymptotic version . Later, Ji et al. [12] sharpened it to when , 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 [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 , so the choice of a code amounts to ordering these evaluation points. Very recently, Beelen et al. [22] initiated this study. For general , they proved that if , there exists an ordering of such that the corresponding full-length RS code has insdel distance at least . For , they showed that for sufficiently large , a uniformly random ordering yields insdel distance at least with high probability for every fixed . 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 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 , how large can 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 , a uniformly random coordinate permutation yields insdel distance at least with high probability when the maximum symbol multiplicity among nonconstant codewords is (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 with high probability whenever . In particular, for full-length RS codes, taking gives insdel
distance at least with high probability whenever . For , this improves the lower bound established by Beelen et al. [22, Thm. 2] under and allows a wider range of dimensions. For , the bound with leading constant also follows from a refinement of their counting argument (Remark 16).
Maximum insdel distance of order . 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 , this bound is asymptotically tighter than previous bounds compared in Table II: the previously known bounds have deficits of from , whereas our bound has a deficit of . Together with our probabilistic lower bound, this determines under the same condition.
Explicit orderings achieve insdel distance for full-length RS codes. We construct deterministic orderings of full-length RS codes with distance 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 when the characteristic exceeds . A modified construction covers dimension two in every characteristic. These orderings are computable in time polynomial in 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 is a common subsequence of if there exist indices and such that for every . Let 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 ,
Consequently, for a code , we have
where .
For a code of fixed length, correcting up to deletions is equivalent to correcting up to 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 be a code with at least two codewords, and let be a nonnegative integer. Then can correct insertions and deletions if and only if
or equivalently, .
Common Subsequences of Words and Noncrossing Matchings in Bipartite Graphs
For , a common subsequence of length can be represented by a noncrossing matching of size 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 , a directed matching is a set of directed edges with pairwise distinct tails and pairwise distinct heads. Let and be disjoint copies of . The bipartite representation is the bipartite graph with vertex classes and , where and are adjacent exactly when [25]. Conversely, every bipartite graph on these two copies determines a directed graph on . This correspondence gives a bijection between matchings in and directed matchings in . The diagonal edges correspond to loops in , so deleting all diagonal edges corresponds to removing all loops. Throughout, we write for both the edge and its corresponding directed edge in .
Fix a total order on , which induces the same order on and . A matching is noncrossing [24], [25] with respect to if its edges can be indexed such that
A directed matching in is noncrossing with respect to if its corresponding matching in is noncrossing. For either representation , let denote the maximum size of a noncrossing matching with respect to .
We can now relate common subsequences to noncrossing matchings. Let . For , define the relation graph to be the bipartite graph with
and we denote by the corresponding loopless directed graph on whose edge set is . For a total order on (, equivalently), let and be obtained by arranging the coordinates of and according to . A noncrossing matching in with edges determines the common subsequence
Hence we have
The following example illustrates how the vertex order affects noncrossing matchings and the value of .
Example 3. Let and and write the relation graph as . Under the natural order , we have . Under the common order , the reordered words are and . Their common subsequence is realized by the position pairs
Figure 1 highlights this same matching under both orders. It is crossing under and noncrossing under . A common subsequence can contain at most two zeros and two ones, so its length is at most under every coordinate order. Hence

Figure 1. The relation graph for and under two common coordinate orders. The same matching of size 4 is highlighted in both panels.
By Lemma 1 and Eq. (2), the insdel distance between the two ordered vectors can be written as
For a code , write for the code obtained by arranging the coordinates of each codeword according to . Taking the minimum over distinct codewords gives
Therefore, determining the maximum insdel distance 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 are determined by symbol multiplicities. For each , define and . The edges joining occurrences of form . Since the edges of are partitioned into the sets , we have
Moreover, the degrees of and are and , respectively. The diagonal edges correspond to coordinates on which and agree, so their number is . Hence
Removing the diagonal edges from a noncrossing matching in leaves a noncrossing directed matching in . Consequently,
For a directed matching in , consider the directed subgraph with vertex set and edge set . Since the edges of have pairwise distinct tails and pairwise distinct heads, every vertex of has outdegree and indegree at most one. More generally, we have the following useful observation (see [26]). Here, and denote the outdegree and indegree of in a directed graph , respectively. The weakly connected components of are the connected components obtained by ignoring edge directions, and a component is nontrivial if it contains an edge.
Proposition 4 ([26]). Let be a finite loopless directed graph with and for every . Then every nontrivial weakly connected component of is either a directed path or a directed cycle.
In particular, the nontrivial weakly connected components of 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 be an algebraically closed field, and let be a nonsingular projective irreducible curve over , with function field . The places of correspond to the points of . Moreover, -isomorphisms between function fields of nonsingular projective curves induce isomorphisms of the corresponding curves [28 Sec. 7.1, Corollaries 3 and 4].
Let denote the set of places of , and let be the normalized discrete valuation at . A divisor is a finite integral sum of places, and we write if all . Since is algebraically closed, its degree is . For , its principal divisor and pole divisor are defined as
For every , we have [27 Thm. 1.4.11]
The Riemann–Roch space associated with a divisor is
For an integer , consists of the functions having no poles away from and pole order at most at , together with zero. For the level curves used later, these spaces have the following description.
Lemma 5. Let be relatively prime integers with , and let . Write for the function field of . The functions and have the same unique pole , with
For every integer ,
Proof. By [27 Prop. 3.1.15], the extension has degree and is totally ramified at infinity, since and . Writing for the unique place above infinity, the relation gives and .
Since the affine curve is nonsingular and is integral over , its coordinate ring is the integral closure of in , hence the ring of functions regular away from by [27 Thm. 3.2.6]. Every such function has a unique expansion with , whose monomials have pairwise distinct pole orders , and membership in is therefore equivalent to 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 .
Lemma 6. Let be relatively prime integers. Then, for every , the polynomial is irreducible in .
Proof. View the polynomial as over . At the pole of , its constant coefficient has valuation , which is coprime to , and all intermediate coefficients are zero. Hence [27 Prop. 3.1.15] gives irreducibility in . Gauss’s lemma then gives irreducibility in .
For , its Zariski closure is the common zero set in of all polynomials in that vanish on [28 Sec. 6.1].
Lemma 7. Let be not both constant, and let be a finite set containing all their poles. Set
Then the Zariski closure is an irreducible plane curve, and is finite. The substitutions and identify with .
Proof. Let send to and to . A rational function vanishing on is zero, so the ideal of polynomials vanishing on is . Consequently,
This is a domain of transcendence degree one over . Hence is an irreducible plane curve and under the indicated identification.
Let be the projective closure of . The rational map extends to a morphism because is nonsingular [28 Sec. 7.1, Corollary 1]. This morphism is nonconstant and therefore surjective. It follows that , 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 of degrees and with no common irreducible component have at most 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 be a fixed directed matching of size in a loopless directed graph , and consider the directed subgraph . If contains a directed cycle, then no total order of makes noncrossing. Otherwise, its nontrivial weakly connected components are directed paths. If has nontrivial weakly connected components, then a uniformly random total order of satisfies
Proof. By Proposition 4, every nontrivial weakly connected component of is a directed path or a directed cycle. Suppose that is noncrossing with respect to a vertex order and contains a directed cycle . Let be the vertex set of . The edges of define a permutation , where is the edge leaving . Since is noncrossing, implies for all , but every increasing permutation of a finite totally ordered set is the identity. Hence for every , contradicting the assumption that is loopless.
Suppose now that the nontrivial weakly connected components of are directed paths. Since these paths have edges in total, the support of has vertices. Identify the positions in the order induced on this support with , and let and be the sets of positions occupied by tails and heads, respectively. The complements and consist of the terminal and initial vertices, respectively. They are disjoint sets of size , so there are at most
possible ordered pairs .
Write and . A noncrossing matching must join to for every . Thus and determine the edges on the ordered support. The path components of can be assigned to the resulting path components on in at most ways. Each assignment determines all vertex positions along the paths. Since the relative order of the support is uniform,
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 be a loopless directed graph with at most edges, where is an integer. Choose a total order of uniformly at random. For every integer ,
If every indegree and outdegree is at most , then
Proof. The event requires an -edge directed matching to be noncrossing. There are at most 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 for which every nontrivial weakly connected component of is a directed path. Fix the number of these path components and write . The number of choices for their initial edges is at most
Label the chosen initial edges using a fixed auxiliary order of their tails. The path lengths form a vector of positive integers with sum , and there are possible length vectors. Once these data are fixed, each remaining edge extends a path in at most ways. Allowing repeated vertices can only increase the count, so there are at most
directed matchings with edges and nontrivial path components in . Lemma 9 now gives
Put and factor out . The remaining factor in the -th term is
For , we have
Taking proves Eq. (8).
Insdel Distance of Linear Codes under Random Coordinate Permutations
For a linear code , let . The following identity for the maximum symbol multiplicity of nonconstant codewords is immediate.
Lemma 11. For a linear code containing a nonconstant word,
In what follows, we write for the maximum symbol multiplicity of nonconstant codewords in . Combining Lemma 11 and Proposition 10, we derive the following high-probability lower bound on the insdel distance.
Theorem 12. Let be a sequence of linear codes containing a nonconstant word. Suppose that and as . For every fixed and all sufficiently large , a uniformly random coordinate order satisfies
Proof. We first obtain finite estimates for an arbitrary linear code containing a nonconstant word. For distinct nonconstant codewords, Lemma 11 and Eq. (3) in Section II give and .
For a constant codeword and a nonconstant codeword , Lemma 11 gives
Hence, any pair with LCS greater than must consist of two nonconstant codewords.
For a pair of distinct nonconstant codewords, the relation graph has diagonal edges. By Eq. (4) in Section II, a common subsequence of length greater than gives a noncrossing directed matching with at least edges in . Applying Proposition 10 with and , and taking a union bound over fewer than ordered pairs of distinct nonconstant codewords gives, for every integer ,
and
Now assume and . Fix and put . For sufficiently large , we have and . Since , Eq. (9) gives
The inequality for implies
Hence the exponent is at most
The last three terms are . For sufficiently large , the failure probability is therefore at most .
When the symbol multiplicities are at most a fixed multiple of their average , the dimension condition follows from the Singleton bound. The resulting distance lower bound has the form .
Corollary 13. Let be a sequence of linear codes containing a nonconstant word, where . Suppose that
For a fixed constant . For every fixed and all sufficiently large , a uniformly random coordinate order satisfies
Proof. Lemma 11 and the Singleton bound give
In particular, and . Thus and
Apply Theorem 12 with . Since , its distance lower bound is at least
for sufficiently large \sqrt{n\mu(C)}\le\sqrt{K},n/\sqrt{q}. Also, ; thus the failure probability is at most . Finally, implies .
We first apply Theorem 12 to MDS codes containing the all-one vector.
Proposition 14. Let be a sequence of MDS codes containing , where and as . For every fixed and all sufficiently large , a uniformly random coordinate order satisfies
Proof. Since , we have and . The result follows from Theorem 12 because implies and .
Specializing Proposition 14 to full-length RS codes gives the following corollary.
Corollary 15. Let satisfy as , and let be a uniformly random ordering of . For every fixed and all sufficiently large ,
Proof. Since full-length RS codes are MDS codes containing , the result follows from Proposition 14 with .
Remark 16. Let , where is a uniformly random ordering of . Replacing the count in [22], proof of Prop. 2 by the exact count for pairs of increasing index sequences of length with a fixed union of size gives, for ,
The last inequality follows by setting and using . For every fixed , taking and using yields with probability at least for all sufficiently large .
We next apply Corollary 13 to two non-MDS codes obtained by evaluating affine functions.
Example 17. Let be a prime power. The code
is the first-order Reed–Muller code on [29]. Since every nonconstant affine function takes each value exactly times, has parameters and is not MDS. It contains and satisfies
For every fixed and all sufficiently large , Corollary 13 with gives
for a uniformly random coordinate order .
A second example is obtained by evaluating affine functions on the affine rational points of a Hermitian curve.
Example 18. Let be a prime power and let be the set of affine -rational points of the Hermitian curve
The Hermitian curve code
has parameters and is not MDS [27 Sec. 8.3]. Since , we have
For every fixed and all sufficiently large , Corollary 13 with alphabet size and gives
for a uniformly random coordinate order .
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 when the nonconstant codewords have symbol multiplicities .
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 be a projective linear code with . Then
Proof. Fix a coordinate order, and let be the generator columns. Set and , and take disjoint consecutive blocks of length . Choose independently and uniformly. For each block , let
Since the generator columns are nonzero and pairwise nonproportional, distinct equalities in this sum impose independent linear conditions on . Thus the indicators are pairwise independent, each with mean , and
By Cauchy–Schwarz,
Let count the blocks with . Then
Since whenever , and ,
As and , we have
Consequently,
Hence there exist for which . The corresponding codewords are distinct, and one matching pair from each of these blocks gives a common subsequence of length at least . Therefore,
Remark 20. We compare Theorem 19 with earlier upper bounds for projective codes with as , assuming . 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 , whereas Theorem 19 gives . Together with Corollary 13, this yields , a uniformly random coordinate order attains the same asymptotic distance with high probability.
The strict half-Singleton bound applies only if [12]. For the strict direct bound, Corollary 6.2 of [12] applies here for sufficiently large : projectivity holds by assumption, while . The Singleton bound and give , and thus . In Chen’s bound [11 Thm. 2.1], is the number of selected linearly independent generator columns, and is the number of zero coordinates of a chosen nonzero codeword before the first or after the last selected position in the order . Hence and for every , giving uniformly in . In Xie et al.’s bound [14], is a common lower bound on the Hamming weights of two linearly independent codewords. Since , we have .
Table 2. Upper bounds on for an arbitrary coordinate order of a projective code with .
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 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 be a bipartite graph with vertex classes and , both copies of a finite set . Let be a partition of into nonempty subsets, and fix an order on in which these subsets appear as consecutive blocks in the order . The order within each block is arbitrary, and the same order is used on both vertex classes. For each , let and denote the copies of in and , respectively, and write for the subgraph induced by . Suppose that has ordinary matching number at most for every . Then
Proof. Let 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 be the block pairs visited. Since at least one index increases at each step,
The edges of belonging to any one block pair form an ordinary matching of size at most . Consequently,
In the proof of Lemma 21, the block indices along a noncrossing matching are nondecreasing in both coordinates. The following figure shows a possible sequence of five distinct block pairs for , attaining the maximum 5.

Figure 2. Five successive block pairs for .
For general dimension , we give the following construction of full-length RS codes. For each fixed , the resulting code has distance , hence the construction is order-optimal.
Theorem 22. Let , and let be a square prime power of characteristic . Choose . For each , define
List the nonempty sets consecutively to obtain an ordering of . Both the order of the sets and the orders within them may be arbitrary. Then
For fixed , such an ordering can be constructed deterministically in time polynomial in .
To apply Lemma 21, we bound matchings between nonzero blocks through intersections of plane curves. Work over , and let be the Frobenius automorphism of . For , write for the polynomial obtained by applying coefficientwise to . For , let be the function field in Lemma 5 with , and let be its nonsingular projective model. We identify with the affine curve . For a nonconstant polynomial , let be the Zariski closure in of the image of under the map
The first coordinate function has pole order at . Hence, Lemma 7 with shows that is an irreducible plane curve.
Lemma 23. Let and let be nonconstant polynomials of degree less than . Then
Moreover, if .
Proof. Let , by Lemma 7, a general affine line meets in distinct points, all lying in the image of the map. Substituting the coordinate functions of the map into the equation of gives a plane curve of degree at most that intersects in at least distinct points. Bézout’s theorem (Theorem 8) now yields (12).
By Lemma 7, we identify
Let be the leading coefficient of , and let . Both generators have pole divisor . Consider the normalized difference
The terms cancel, while the coefficient of is , since and . A monomial has pole order . Thus has pole order , whereas the other degree terms have pole order at most and the lower-degree terms have pole order at most . Since has no finite poles, . Eq. (5) therefore gives
Both subfields lie in , so the tower law shows that divides both and . These integers are coprime, and hence .
Suppose . The preceding calculation identifies and with the function field of their common image. Let be the images of the generators of . 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 . By Lemma 5,
Since and have pole orders exactly and , respectively, they take the form
Equality of the coordinate functions on the common image yields
After substituting these expressions and replacing by , the differences of the two sides are polynomials of degree at most that vanish on . The ideal of this irreducible curve is generated by . Each difference is therefore divisible by this polynomial, and the degree bound forces both differences to be zero polynomials. Comparing the and coefficients gives
Thus and . The relation now shows that is a scalar multiple of . Comparing the coefficients of and gives , and hence . Since , the coefficients of and give . It follows that , and the first coordinate identity reduces to . Since is nonconstant, this implies .
Now we can prove Theorem 22.
Proof of Theorem 22. Let be distinct nonconstant polynomials of degree less than . The edges between blocks and in their relation graph correspond to pairs of evaluation points with the same polynomial value. For with , the corresponding point of is . Hence, when , distinct common values in give distinct points of . The curves are distinct by Lemma 23, so Bézout’s theorem bounds the number of common values by . Each value contributes at most 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
We claim that . Apart from , the solutions of over are parametrized by
where is uniquely recovered as , giving exactly nonzero solutions. Deleting all edges incident to on either side of a noncrossing matching therefore removes at most edges, leaving a matching supported on at most consecutive blocks on each side, with the preceding matching bound applicable to every pair of remaining blocks. Lemma 21 gives
The LCS is at most 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 have characteristic . Choose , and set
For each , define
List the nonempty sets consecutively to obtain an ordering of . Both the order of the sets and the orders within them may be arbitrary. Then
Proof. The exponents satisfy , , and . Write , where and . For every nonidentity affine map with , we claim that
Write and . The points counted in Eq. (14) correspond to common affine points of
and
Both curves are absolutely irreducible of degree by Lemma 6 and the invertibility of multiplication by . If the curves had a common component, their defining polynomials would differ by a nonzero scalar factor . Comparing homogeneous terms of degree would give
Thus and . The coefficients of and then give , since . Comparing the coefficients of gives . As , this forces , contradicting . Then Bézout’s theorem proves Eq. (14).
For distinct nonconstant affine polynomials , the relation is for the nonidentity affine map . Its relation graph is a matching with at most 25 edges in each block pair. Lemma 21 gives
A distinct pair involving a constant polynomial has LCS at most one. This completes the proof.
Together with Theorem 22 for , this proposition gives deterministic orderings with distance 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 of the gap from . 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 from . In particular, for full-length Reed–Solomon codes, it would be interesting to determine the coefficient of the 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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]L. Lovász and M. D. Plummer, Matching Theory. Providence, RI, USA: AMS Chelsea Publishing, 2009.
- [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]H. Stichtenoth, Algebraic Function Fields and Codes, 2nd ed. Berlin, Germany: Springer, 2009.DOI
- [28]W. Fulton, Algebraic Curves: An Introduction to Algebraic Geometry. Redwood City, CA, USA: Addison-Wesley, 1989.
- [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.