arXiv:2610.30615math.COOct 2026

Manuscript Offprint

arXiv:2610.30615

The Ternary and Quaternary Cases of the $\{2,4\}$-Distance Code Conjecture

Yen-Chi Roger Lin, Valjakas Djaljapayan, Wei-Hsuan Yu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

For an integer q≥2q \geq 2, let Aq(n,{2,4})A_q(n, \{2, 4\}) be the largest cardinality of an unrestricted q-ary code of length nn in which any two distinct words have Hamming distance 2 or 4. We prove that

Aq(n,{2,4})=1+(n2)(q∈{3,4},  n≥6),A_{q}(n,\{2,4\})=1+\binom{n}{2}\qquad(q\in\{3,4\},\;n\geq6),

thereby settling the two remaining alphabet sizes in the conjecture of Boyvalenkov, Delchev, Zinoviev, and Zinoviev; the binary case was settled previously. The quaternary result implies the ternary result by alphabet inclusion. For n≥16n \geq 16, the quaternary upper bound is proved combinatorially. After normalizing one word to zero, the weight-four supports form a 2-intersecting family; exact support intersections force symbol synchronization and restrict support multiplicities. We combine the nontrivial intersection theorem with matching arguments and a three-coordinate projection lemma. The finite lengths 6≤n≤136 \leq n \leq 13 are handled by a complete Hamming-isometry reduction to exact clique decisions, and n=14,15n = 14, 15 by a smaller exact weighted-clique relaxation. All finite decisions are reproduced by two standalone integer-only C++17 verifiers provided as supplementary source files.

Keywords: few-distance code, Hamming space, ternary code, quaternary code, intersecting family, exact clique verification

2020 MSC: 94B65, 05D05, 05C35

∗^{*}Corresponding author.

Email addresses: 115281004@cc.ncu.edu.tw (Valjakas Djaljapayan), whyu@math.ncu.edu.tw (Wei-Hsuan Yu), yclin@math.ntnu.edu.tw (Yen-Chi Roger Lin)

1. Introduction

For an alphabet Σ\Sigma with ∣Σ∣=q|\Sigma| = q, Hamming distance on Σn\Sigma^n counts the coordinates on which two words differ. If D⊆{1,…,n}D \subseteq \{1, \ldots, n\}, write Aq(n,D)A_q(n, D) for the largest size of a subset C⊆ΣnC \subseteq \Sigma^n for which d(x,y)∈Dd(x, y) \in D whenever x≠yx \neq y. In particular, codes need not be linear, and the alphabet need not be a field.

The classical coding-theory background is developed in [21, 26, 30, 23]. The study of prescribed-distance codes is related to Delsarte's association-scheme inequalities [12, 4, 8], to semidefinite refinements [28, 19, 6], and to intersection theorems for uniform set systems [15, 22, 16, 17, 31, 1, 2, 18, 20]. Earlier work on codes with few distances includes [13, 9, 7, 24]. The analogous Euclidean and spherical problems provide related techniques and bounds [11, 25, 3, 27, 32].

The construction

Cstd={0}∪{wij:1≤i<j≤n},(1)C_{\mathrm{s t d}}=\{0\}\cup\{w_{i j}:1\leq i<j\leq n\}, \tag{1}

where wijw_{ij} has a distinguished nonzero symbol in positions i, j and zero elsewhere, has pairwise distances in {2,4}\{2, 4\}. Thus

Aq(n,{2,4})≥1+(n2)(q≥2).(2)A_{q}(n,\{2,4\})\geq1+\binom{n}{2}\qquad(q\geq2). \tag{2}

Boyvalenkov, Delchev, Zinoviev, and Zinoviev [7, Conjecture 1(i)] conjectured that equality holds for q∈{2,3,4}q \in \{2, 3, 4\} and every n≥6n \geq 6. The binary case follows from the work of Barg, Glazyrin, Kao, Lai, Tseng, and Yu [5]. We establish the two remaining cases.

Theorem 1.1. For each integer n≥6n \geq 6 and each q∈{3,4}q \in \{3, 4\},

Aq(n,{2,4})=1+(n2).A_{q}(n,\{2,4\})=1+\binom{n}{2}.

It suffices to prove the assertion for q=4q = 4. Indeed, if q≤rq \leq r, every qq-ary code embeds isometrically in an rr-ary Hamming space, so

Aq(n,D)≤Ar(n,D).(3)A_{q}(n,D)\leq A_{r}(n,D). \tag{3}

The construction (1) then gives the same lower bound for q = 3. This observation avoids repeating the quaternary argument in the ternary setting.

Our proof uses a support–symbol interaction specific to the forbidden odd distances. Once a word is normalized to zero, every other word has weight two or four. The family of weight-four supports is 2-intersecting; if two of those supports meet in precisely two coordinates, the symbols on their intersection must agree. Consequently, the usual unweighted intersection bounds can be strengthened by local multiplicity constraints. If all weight-four supports contain a common two-set, the remaining coordinate pairs form a graph whose matching number governs the argument. The only additional ingredient required for the four-symbol alphabet is a bound on projections to three coordinates.

These structural arguments prove the claim for n≥16n \geq 16. For the ten remaining lengths we use exact, reproducible finite decisions, described mathematically in Section 8. Such computer-assisted methods are standard in extremal clique calculations [10, 29]; the present verification uses neither floating-point optimization nor an unverified heuristic. The finite computations and their supporting code are logically separate from the infinite-range proof.