Manuscript Offprint
arXiv:2609.08662Linear Programming Bounds for LCD Codes via Gauss Phases
Gauss-Phase LP Bounds for LCD Codes
Ming-Hsuan Kang and Maosheng Xiong
Department of Applied Mathematics, National Yang Ming Chiao Tung University, Hsinchu, Taiwan.
Department of Mathematics, The Hong Kong University of Science and Technology, Clear Water Bay, Hong Kong.
*Corresponding author(s). E-mail(s): kmsming@gmail.com; Contributing authors: mamsxiong@ust.hk;
Abstract
For , we show that a -dimensional linear code over the finite field of order is linear complementary dual (LCD) exactly when one root-of-unity value of its weight enumerator has magnitude . We convert the phase of this value, together with the parity type in the binary case, into exact linear constraints on the weight distribution and incorporate them into a Gauss-phase linear program. The resulting program uses only the ordinary weight distributions of the code and its dual and adds only a constant-size set of branch equations to the usual Hamming/MacWilliams constraints, so it remains close in size to the standard Hamming LP while retaining additional arithmetic information. Computations over the audited binary and ternary ranges show systematic strengthening of the Hamming LCD relaxation. In the binary case, comparison with the established mixed joint-weight-enumerator LP yields four strict improvements, lowering the benchmark upper bound by one in each case. Each strict comparison is verified exactly by rational feasibility witnesses and integer Farkas certificates.
Keywords: linear complementary dual code, linear programming, weight enumerator, quadratic Gauss sum, joint weight enumerator
MSC Classification: 94B05, 11E04, 90C05
LCD codes were introduced by Massey [14] and later became useful in implementations resistant to side-channel and fault-injection attacks [3]. Their extremal distance problem is especially meaningful over and : for , every linear code is monomially equivalent to an LCD code [4], while monomial equivalence preserves Hamming weight.
For a code , let wt() denote the Hamming weight of and write
Set , , and
Then, for , the LCD property has the uniform characterization
For an LCD code, the phase of , together with the parity type when , gives exact totals of codewords in weight classes modulo 4 when and modulo 3 when . These equalities can be added directly to the usual Hamming/MacWilliams linear program.
The resulting Gauss-phase LP uses only the ordinary weight distributions of and , so it remains close in size to the standard Hamming LP. In the audited ranges it improves the Hamming LCD bound in 62 binary and 39 ternary parameter pairs. For binary LCD codes we also compare it with the established mixed joint-weight-enumerator LP of Alahmadi, Deza, Dutour Sikirié, and Solé [1]. The Gauss-phase LP gives four strict improvements,
In the reverse direction, the screening computation gives at ; this case is not asserted as an exact comparison.
The root-of-unity viewpoint has several established antecedents. Greene identified weight enumerators as Tutte-polynomial specializations [9]; binary bicycle-space special values were developed by Vertigan and Pendavingh [15, 16], with ternary analogues in [8, 10]. Our contribution is to specialize these values to binary and ternary LCD codes, derive the resulting weight-residue equations, and use them to obtain certified finite-length LP bounds.
2 Common preliminaries and the Hamming LCD baseline
For a code , put
Then the weight enumerator introduced in the Introduction is
For the rest of the paper, is an code with , and we abbreviate
The q-ary Krawtchouk polynomial is
and the ambient shell of weight has size
The MacWilliams equations are [13]
For fixed , the classical Hamming/Delsarte LP [6] consists of real variables satisfying (2) and
If is LCD, then and are disjoint outside zero, so shellwise counting gives
These are the Hamming-level LCD inequalities used in [7, 11]; together with (2) and (3), they form the Hamming LCD baseline used below.
We shall repeatedly use the Gram criterion. If is a full-row-rank generator matrix of and denotes its transpose, then
Indeed, the kernel of the Gram matrix represents in the row basis of . Hence is LCD if and only if is LCD, and in that case
with the two summands orthogonal.
For LP pseudo-distributions, the MacWilliams equations have the following formal polynomial form.
Lemma 2.1 (Formal MacWilliams identity). Let real arrays and satisfy (2), and put
Then
Proof Multiply the -th equation in (2) by , sum over , and use
□
3 Ternary Gauss-phase characterization and LP
The ternary case is the cleanest instance of the method because Hamming weight modulo three is the ordinary Euclidean quadratic form.
3.1 Restricted quadratic form and the LCD criterion
Let have dimension , and write , . Since
we have
Thus the root-of-unity value is exactly the quadratic Gauss sum of the restricted Euclidean form.
Theorem 3.1 (Ternary Gauss characterization). With the notation above,
Consequently
Proof Writing in the squared magnitude gives
The inner character sum equals for and zero otherwise. For one also has , so the outer sum contributes . The LCD equivalence follows from (5).
3.2 Exact phase and residue classes
Let denote the quadratic character of . For a ternary LCD code , let be a Gram matrix and put
This sign is basis-independent.
Proposition 3.2 (Ternary Gauss phase). If is an -dimensional LCD code, then
Proof A nondegenerate ternary form diagonalizes. In dimension one, for ,
multiplying the one-dimensional factors proves the formula.
For , define
The usual root-of-unity filter gives
Since and , where an overline denotes complex conjugation, and since denotes the real part of , Proposition 3.2 gives
Since
only two of these three rows are independent. In the LP below we keep the a = 0 and a = 1 rows; the a = 2 row is then implied by the code size.
3.3 Duality and formal LP transport
For an actual LCD code, with orthogonal summands. Taking Gram determinants in an orthogonal basis and using that the ambient standard form has square determinant gives
The same phase transport holds at the LP level without assuming that the variables come from a code.
Proposition 3.3 (Formal ternary transport). Let real arrays satisfy MacWilliams. Then
Hence, if a sign is imposed through , then automatically
Thus the compatible dual mod-three residue rows are algebraically redundant in the LP.
Proof Evaluate (6) at . The transformed argument is , , and real coefficients give . Fourier inversion then recovers all dual residue totals.
3.4 Complete LP formulation
Fix
For a sign branch , put
Substituting and into (9) gives the two retained code-side residue targets, namely the branch values of and . We denote them by and :
Once is fixed, are explicit integers; no complex numbers occur in the LP.
Definition 3.4 (Ternary Gauss-phase LP). For fixed and , the -branch is the linear feasibility problem in
subject to
The ternary Gauss-phase relaxation is feasible if at least one of the two sign branches is feasible. Every ternary LCD code produces a feasible point in one of them. Hence, if both branches are infeasible, no such code exists. For fixed , test downward; the first value for which at least one branch is feasible is the ternary Gauss-phase LP distance endpoint.
4 Binary Gauss-phase characterization and LP
The binary case has the same philosophy but a richer quadratic object: Hamming weight modulo four is a -valued quadratic refinement rather than an ordinary field-valued quadratic form.
4.1 The mod-four quadratic refinement and LCD criterion
For , put
Then
Let have dimension , radical , and .
Theorem 4.1 (Binary Gauss characterization). One has
Consequently
Proof Using (20) in the squared magnitude gives
On , the map is a character. Its sum is zero when nontrivial and when trivial. The final equivalence follows from the Gram criterion.
4.2 Exact phase, parity type, and residue classes
Write if U contains an odd-weight word and otherwise.
Proposition 4.2 (Binary Gauss phase). If is an -dimensional LCD code, then its normalized Gauss sum is an eighth root of unity. Thus there is such that
This phase index is the Brown invariant of the mod-four quadratic refinement. Its admissible values are
Proof This is the standard Gauss-sum classification of nonsingular -valued quadratic forms; the orthonormal and symplectic types give the displayed phase sets [2, 5, 12, 17].
For , define
and, for , set
The four-point root-of-unity filter is
Here , , and . Therefore Proposition 4.2 gives
Since , only three rows are independent. In the LP below we retain the a = 0, 1, 2 rows; the a = 3 row is implied by the code size.
4.3 Duality, endpoint type, and formal LP transport
For an actual binary LCD code,
Let . The parity type of the dual is determined by this all-one vector:
The pair is impossible for an LCD code, since then .
At the LP level the required dual phase data follow directly from MacWilliams.
Proposition 4.3 (Formal binary transport). For arbitrary real arrays satisfying (2),
Thus imposing a branch value with forces the formal dual phase , while determines the dual parity type through (25). Consequently the compatible dual residue rows are redundant in the LP.
Proof Evaluate (6) at ; the transformed argument is , and real coefficients give . At , only the term survives in the expanded MacWilliams polynomial, giving (27).
4.4 Complete LP formulation
Fix
Generate an admissible branch as follows.
(i) Choose a parity type and .
(ii) Choose an endpoint selector and set
(iii) Discard the branch if or if
For a retained branch, let be the integers in
and set
Thus , but the LP itself uses only the integers . Substituting and into (23) gives the three displayed residue equations below.
Definition 4.4 (Binary Gauss-phase LP). For fixed and an admissible branch , the -branch is the linear feasibility problem in
subject to
The binary Gauss-phase relaxation is feasible if at least one admissible branch is feasible. Every binary LCD code lies in one branch, so infeasibility of every branch proves nonexistence. For fixed , test downward; the first feasible value is the binary Gauss-phase LP distance endpoint.
Remark 4.5 (Why the endpoint selector is retained). The row is not merely bookkeeping. At , deleting it changes the Gauss-phase endpoint from 4 to 5.
5 The binary mixed joint-weight-enumerator benchmark
For binary LCD codes we compare the Gauss-phase LP with the mixed joint-weight-enumerator LP of Alahmadi, Deza, Dutour Sikirié, and Solé [1]. This model is used only as a benchmark, so we record the constraints needed for the comparison and refer to [1] for the derivation of the joint MacWilliams identity.
Put . For , let count the coordinate states 00,01,10,11, respectively, and put
For an actual code, counts the corresponding ordered pairs . These four counts determine
Since is LCD, , so is a bijection from onto . This explains the code, dual, and ambient-shell marginals below.
Definition 5.1 (Binary mixed benchmark LP). Fix and . The benchmark is the linear feasibility problem in
The variables satisfy the binary Hamming LCD baseline (2), (3), and (4). In addition,
Here (38) is , while (40) is . For impose
where each sum is over , and for impose
again over .
Finally, define the joint enumerator
and
Writing , impose the four-variable MacWilliams invariance
Equation (44) is the joint MacWilliams identity from [1]. Equating coefficients gives an ordinary linear system. Online Resource 1 contains the explicit coefficient matrix and the exact implementation checks used here. For fixed , the mixed benchmark endpoint is the largest for which is feasible.
6 Numerical bounds and exact verification
• Hamming-to-Gauss audit.
-
Binary: 62 strict improvements among 190 parameter pairs through .
-
Ternary: 39 strict improvements among 91 parameter pairs through .
-
Comparison with the published binary mixed LP. Among the 62 binary rebaseline cases:
– 57 cases give the same endpoint;
– the Gauss-phase LP is strictly stronger in four cases:
- (18, 5) : 8 → 7;
- (20, 7) : 8 → 7;
– one reverse case appears in the screening computation: (20, 8) : 7 → 6, where the mixed LP is stronger.
-
Exact evidence for the four Gauss improvements. – 4 rational mixed-LP witnesses at the larger endpoints; – 16 branchwise integer Farkas certificates excluding all compatible Gauss branches there; each certificate is a nonnegative integer combination of LP rows whose left-hand sides cancel while the combined right-hand side is negative; – 4 rational Gauss witnesses at the improved endpoints.
-
Independent validation. The Gauss-phase residue identities were checked on all nonzero proper binary subspaces through length 7 and ternary subspaces through length 6.
-
Exactness policy. Floating point is used only to locate candidate cases. The four strict Gauss-over-mixed improvements above are exact. The reverse case (20, 8) is a screening observation and is not included among the exact endpoint claims.
Data and code availability
All code, exact certificates, feasibility witnesses, and machine-readable results supporting this article are maintained in the project repository. The repository is private during peer review and will be made public upon acceptance. A frozen, self-contained snapshot is supplied as Online Resource 1; complete reproduction instructions and an artifact map are provided in the repository README.
Statements and Declarations
Funding
The work of Ming-Hsuan Kang was supported by the National Science and Technology Council, Taiwan, under Grant NSTC 115-2115-M-A49-010.
Competing interests
The authors declare no competing interests.
Use of generative AI
During manuscript preparation, the authors used OpenAI Codex to assist with manuscript restructuring, software integration, and computational consistency checks. The authors independently reviewed and validated the mathematical statements, computations, and final text and take full responsibility for the work.
References
[1] A. Alahmadi, M. Deza, M. Dutour Sikirić, and P. Solé, The joint weight enumerator of an LCD code and its dual, Discrete Applied Mathematics 257 (2019), 12–18, https://doi.org/10.1016/j.dam.2018.10.032.
[2] E. H. Brown, Jr., Generalizations of the Kervaire invariant, Annals of Mathematics 95 (1972), 368–383, https://doi.org/10.2307/1970804.
[3] C. Carlet and S. Guilley, Complementary dual codes for counter-measures to side-channel attacks, Advances in Mathematics of Communications 10 (2016), 131–150, https://doi.org/10.3934/amc.2016.10.131.
[4] C. Carlet, S. Mesnager, C. Tang, Y. Qi, and R. Pellikaan, Linear codes over are equivalent to LCD codes for , IEEE Transactions on Information Theory 64 (2018), 3010–3017, https://doi.org/10.1109/TIT.2018.2789347.
[5] C. Carlet, S. Mesnager, C. Tang, and Y. Qi, New characterization and parametrization of LCD codes, IEEE Transactions on Information Theory 65 (2019), 39–49, https://doi.org/10.1109/TIT.2018.2829873.
[6] P. Delsarte, An algebraic approach to the association schemes of coding theory, Philips Research Reports Supplements 10 (1973), 1–97.
[7] S. T. Dougherty, J.-L. Kim, B. Özkaya, L. Sok, and P. Solé, The combinatorics of LCD codes: linear programming bound and orthogonal matrices, International Journal of Information and Coding Theory 4 (2017), 116–128, https://doi.org/10.1504/IJICOT.2017.083827.
[8] E. Gioan and M. Las Vergnas, On the evaluation at of the Tutte polynomial of a ternary matroid, Journal of Algebraic Combinatorics 25 (2007), 1–6, https://doi.org/10.1007/s10801-006-0035-2.
[9] C. Greene, Weight enumeration and the geometry of linear codes, Studies in Applied Mathematics 55 (1976), 119–128, https://doi.org/10.1002/sapm1976552119.
[10] F. Jaeger, Tutte polynomials and bicycle dimension of ternary matroids, Proceedings of the American Mathematical Society 107 (1989), 17–25, https://doi.org/10.1090/S0002-9939-1989-0979049-1.
[11] E. Karabakla and B. Özkaya, Extended LP bound for LCD codes and new binary and ternary LCD codes, Applicable Algebra in Engineering, Communication and Computing (2026), online first, https://doi.org/10.1007/s00200-025-00716-3.
[12] M. C. López-Díaz and I. Fernández-Rúa, An invariant for quadratic forms valued in Galois rings of characteristic 4, Finite Fields and Their Applications 13 (2007), 946–961, https://doi.org/10.1016/j.ffa.2006.03.006.
[13] F. J. MacWilliams, A theorem on the distribution of weights in a systematic code, Bell System Technical Journal 42 (1963), 79–94, https://doi.org/10.1002/j.1538-7305.1963.tb04003.x.
[14] J. L. Massey, Linear codes with complementary duals, Discrete Mathematics 106/107 (1992), 337–342, https://doi.org/10.1016/0012-365X(92)90563-U.
[15] R. A. Pendavingh, On the evaluation at of the Tutte polynomial of a binary matroid, Journal of Algebraic Combinatorics 39 (2014), 141–152, https://doi.org/10.1007/s10801-013-0442-0.
[16] D. Vertigan, Bicycle dimension and special points of the Tutte polynomial, Journal of Combinatorial Theory, Series B 74 (1998), 378–396, https://doi.org/10.1006/jctb.1998.1860.
[17] J. A. Wood, Witt's extension theorem for mod four valued quadratic forms, Transactions of the American Mathematical Society 336 (1993), 445–461, https://doi.org/10.1090/S0002-9947-1993-1085946-7.