\documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage[T1]{fontenc} \usepackage{lmodern,amsmath,amssymb,amsthm,booktabs} \usepackage[colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=blue]{hyperref} \usepackage{microtype} \hypersetup{pdftitle={Finite Multiset Codes and Affine Lattice Restrictions},pdfauthor={Daniel A. Pyle (project initiator); Lyra, powered by OpenAI (scientific work and drafting)},pdfsubject={Research note with AI contribution and verification disclosure},pdfkeywords={multiset codes, discrete simplex, affine lattice, high distance, AI assisted research}} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newcommand{\Z}{\mathbb Z} \newcommand{\A}{\mathcal A} \title{Finite Multiset Codes and Affine Lattice Restrictions} \author{Daniel A. Pyle\\\small Independent Researcher\\\small ORCID: \href{https://orcid.org/0009-0005-6456-1370}{0009-0005-6456-1370}\\[4pt]\small Scientific work and drafting by Lyra, powered by OpenAI\\\small See the contribution and verification statement in Section~\ref{sec:contributions}} \date{18 October 2026} \begin{document} \maketitle \begin{abstract} We study constant-weight nonnegative integer vectors under half-$\ell_1$ distance and compare arbitrary codes with full intersections of affine additive-subgroup cosets with the discrete simplex. A heavy-coordinate decomposition gives the exact reduction $A_q(n,n-s)=q+B_q(n,s)$ to codes whose coordinates are bounded by $s$. It determines the unrestricted optimum throughout $2n>(q+1)s$. For every $q\geq3$ and $s\geq2$, at $n=qs-1$ and $D=(q-1)s-1$ the unrestricted and full-coset optima are respectively $q+1$ and $q$; we classify all $q^2$ unrestricted extremizers. We retain a complete classification of both optima for three coordinates and $n<2D$. In the next ternary band, $2D\leq n<3D$, eight words are attainable precisely when $3n\geq8D$; equality yields an infinite eight-versus-seven full-coset separation. Exact finite certificates also give a six-versus-five gap at $(q,n,D)=(4,5,3)$ and the quinary single-deletion values $A_5(9,2)=143$ and $A_5(10,2)=201$. The proofs use intersection bounds and explicit integer affine combinations. The unrestricted decomposition extends known methods, and bibliographic novelty remains unresolved, particularly against a closely related 2024 paper not compared in full. \end{abstract} \section{Definitions and scope} For integers $q\geq2$ and $n\geq1$, let \[ S(n,q)=\{x\in\Z_{\geq0}^q:\textstyle\sum_i x_i=n\},\qquad d(x,y)=\tfrac12\sum_i|x_i-y_i|=n-\sum_i\min(x_i,y_i). \] A distance-$D$ code has distinct words at distance at least $D$, where $D$ is an integer with $1\leq D\leq n$. Its largest size is $A_q(n,D)$. Set \[ \Lambda_{q-1}=\{z\in\Z^q:\textstyle\sum_i z_i=0\}. \] Following the full-intersection definition in Kova\v{c}evi\'c and Tan~\cite[Definition 2]{KT}, write $A_{q,\rm lin}(n,D)$ for the largest size among codes \begin{equation}\label{eq:full} C=(t+L)\cap S(n,q),\qquad L\leq\Lambda_{q-1},\quad \sum_i t_i=n. \end{equation} Here $t$ is integral and every subgroup rank is allowed. The intersection must be \emph{full}: no pruning is permitted. Otherwise every code would qualify by taking the ambient affine integer lattice. Every containing coset is closed under integer affine combinations whose coefficients sum to one; the resulting points matter only when they remain in the finite simplex. Minimum distance $D$ corresponds to correction of up to $D-1$ deletions, or $\lfloor(D-1)/2\rfloor$ substitution-only errors~\cite[Theorems 1--2]{KT}. The deletion parameter is therefore one less than the minimum distance. For three coordinates only, equal coordinate sums imply \begin{equation}\label{eq:ternarymetric} d(x,y)=\max_i|x_i-y_i|. \end{equation} Indeed, either the positive or the negative coordinates of $x-y$ occupy just one coordinate, and their total magnitude is half its $\ell_1$ norm. This identity fails for $q\geq4$: $(1,1,0,0)$ and $(0,0,1,1)$ have half-$\ell_1$ distance two and maximum-coordinate distance one. We use overlap, not~\eqref{eq:ternarymetric}, in the general-alphabet results. \section{A capped-code reduction and an exact cone} For an integer $0\leq s(q+1)s$, then \[ A_q(n,D)=\begin{cases}q+1,&n\leq qs,\\q,&n>qs.\end{cases} \] \end{corollary} \begin{proof} Two light words satisfy \[ \sum_i\min(x_i,y_i)=2n-\sum_i\max(x_i,y_i)\geq2n-qs>s. \] Thus $B_q(n,s)\leq1$. A light word exists exactly when $n\leq qs$: necessity follows by summation, while sufficiency follows by distributing mass as evenly as possible among $q$ coordinates. This argument includes $s=0$, when no light word exists. \end{proof} For example, setting $s=2$ gives the exact formula \begin{equation}\label{eq:deletionbound} A_q(n,n-2)=\begin{cases}q+1,&q+2\leq n\leq2q,\\q,&n\geq2q+1.\end{cases} \end{equation} In the deletion notation of~\cite{KEZ}, this is $S_q(n,n-3)$. It sharpens the bound $q+\binom q2$ in their Proposition 12 throughout its stated range $n\geq q+2$ for $q\geq3$. This comparison concerns that specific proposition, not priority against all earlier literature. \section{A full-coset gap for every alphabet size} \begin{theorem}\label{thm:general-gap} For integers $q\geq3$ and $s\geq2$, set $n=qs-1$ and $D=(q-1)s-1$. Then \[ A_q(n,D)=q+1,\qquad A_{q,\rm lin}(n,D)=q. \] There are exactly $q^2$ optimal unrestricted codes on labeled coordinates. Choose an index $j$ and let $c_j=s-1$ and $c_i=s$ for $i\ne j$. Include $c$ and all vertices $ne_i$ for $i\ne j$. The remaining word is either $ne_j$ or $(n-1)e_j+e_\ell$ for one $\ell\ne j$. These codes form two coordinate-permutation orbits of sizes $q$ and $q(q-1)$. \end{theorem} \begin{proof} The cone condition holds because $2n-(q+1)s=(q-1)s-2>0$, and $n\leq qs$. Hence the unrestricted optimum is $q+1$. An optimal code has one light word $c$ and $q$ heavy words. Their $q$ nonempty, disjoint heavy-coordinate sets must each be singletons. Label the corresponding words $a_i$. The deficits $s-c_i$ are nonnegative integers summing to one; thus precisely one coordinate, say $j$, equals $s-1$ and all others equal $s$. For $i\ne j$, the overlap of $a_i$ with $c$ already equals $s$ in coordinate $i$. Since every coordinate of $c$ is positive, all other coordinates of $a_i$ must vanish; thus $a_i=ne_i$. For $a_j$, coordinate $j$ contributes $s-1$, leaving overlap at most one elsewhere. Every other coordinate of $c$ equals $s\geq2$, so the total mass of $a_j$ outside coordinate $j$ is at most one. This gives exactly the listed $q$ possibilities. They all work: their overlaps with $c$ are $s-1$ or $s$, with the other vertices zero or one, and distinct forced vertices have overlap zero. The unique light word distinguishes the $q$ choices of $j$, and the last word distinguishes the remaining choices. Permutations act transitively separately on the unshifted and shifted choices, proving the count and orbit statement. Every affine subgroup coset containing $c$ and the $q-1$ forced vertices contains \[ p=qc-\sum_{i\ne j}ne_i, \qquad p_j=q(s-1),\quad p_i=1\ (i\ne j). \] The coefficients sum to one. This is a nonnegative integer point of weight $n$, distinct from $c$, and \[ d(p,c)=(q-1)(s-1)=D-(q-2)\lfloor2n/3\rfloor,\end{cases}\qquad A_{\rm lin}(n,D)=\begin{cases}4,&D\leq2\lfloor n/3\rfloor,\\3,&D>2\lfloor n/3\rfloor.\end{cases} \] The optima differ precisely at $n=3k+2,D=2k+1,k\geq1$; there are nine unrestricted optimal codes, in orbits of sizes three and six. \end{theorem} \begin{proof} For $q=3$ the cone condition is $n<2D$, and $n\leq3(n-D)$ is equivalent to $D\leq\lfloor2n/3\rfloor$. This proves the unrestricted formula. For the full-coset construction let $k=\lfloor n/3\rfloor$, $r=n-3k$, and suppose $D\leq2k$. Put \[ H=\{z\in\Lambda_2:z_0\equiv z_1\equiv z_2\pmod3\},\quad L=kH,\quad t=(n,0,0). \] The least nonzero half-$\ell_1$ norm in $H$ is two: a norm-one vector is a permutation of $(1,-1,0)$, which fails the congruences, whereas $(1,1,-2)$ has norm two. The full intersection therefore has minimum distance at least $2k$. It contains the four words \[ (n,0,0),\quad(r,3k,0),\quad(r,0,3k),\quad(r+k,k,k), \] whose differences from $t$ are $k$ times vectors in $H$. The unrestricted upper bound forces the intersection to have exactly four words. The only possible remaining four-word parameters satisfy $2\lfloor n/3\rfloorr$, since its other two coordinates total less than $2D$. In $B_{ij}$ the two large coordinates are at most $D+r$ and the remaining one at most $r$. Thus $o$ is at distance less than $D$ from every word of every $B$ cell. A code containing $O$ has at most seven words. For a word in $C_i$ write $c_{ij}$ for its $j$th coordinate. Two simple consequences of separation will be used: \begin{align} A_i,C_i\text{ occupied}&\ \Longrightarrow\ \sum_{j\ne i}c_{ij}\geq D;\label{eq:P}\\ B_{ij},C_i\text{ occupied}&\ \Longrightarrow\ c_{ij}\leq (B_{ij})_j-D.\label{eq:Q} \end{align} In~\eqref{eq:P}, separation is possible only in coordinate $i$, giving $c_{ii}\leq n-D$. In~\eqref{eq:Q}, it is possible only in coordinate $j$, since coordinate $i$ is in $[D,2D)$ for both words and the third coordinate is below $D$. If $C_j$ also occurs, summing the two resulting inequalities gives $c_{ij}+c_{ji}\leq r$. If only $C_i$ occurs, it still gives $c_{ij}\leq r$. Nine words would occupy every $A,B,C$ cell. Summing~\eqref{eq:P} would make the total off-diagonal mass at least $3D$, while summing the three paired consequences of~\eqref{eq:Q} makes it at most $3r$, impossible. Thus eight is an upper bound. \subsection{The sharp threshold} An eight-word code occupies eight of the nine $A,B,C$ cells. There are three types of missing cell. If $A_0$ is missing, the off-diagonal masses in rows $C_1,C_2$ are at least $D$, and the mass in row $C_0$ exceeds $r$ because $c_{00}<2D$. The three $B$ constraints bound their sum by $3r$, implying $2D+r<3r$, impossible. If $B_{12}$ is missing, all $A,C$ cells occur. The remaining $B$ constraints and~\eqref{eq:P} yield \[ c_{10}+c_{20}\leq2r-(c_{01}+c_{02})\leq2r-D. \] Separation of $C_1,C_2$ is possible only in coordinate one or two. After exchanging these coordinates, suppose $c_{11}-c_{21}\geq D$. The sum of row $C_1$ then gives $c_{10}+c_{12}+c_{21}\leq D+r$. Since $c_{10}+c_{12}\geq D$, we obtain $c_{21}\leq r$. Since $c_{20}+c_{21}\geq D$, we obtain $c_{20}\geq D-r$. Consequently $2r-D\geq D-r$, or $3r\geq2D$. Equality would force $c_{10}=0$ and then $c_{12}\geq D$, contradicting its cell definition. This case requires strict inequality. If $C_0$ is missing, the remaining two rows have off-diagonal mass at least $D$, while the three $B$ constraints give \[ c_{10}\leq r,\qquad c_{20}\leq r,\qquad c_{12}+c_{21}\leq r. \] Their sum gives $2D\leq3r$. We have proved necessity of $3n\geq8D$. Conversely, if $2D/3\leq r0\}\quad(b\in V_{n+1}). \] We write $F$ for the downward clique to avoid confusing it with minimum distance $D$. Each clique contains at most one codeword. For $a\in V_{n-k}$, the translate $T_k(a)=a+V_k$ contains at most $S_5(k,1)$ codewords, since translation preserves distance. Assign nonnegative rational weights $w_R$ to finitely many such sets $R$, each with a valid cardinality bound $b_R$. If every vertex has coverage $\sum_{R\ni x}w_R\geq1$, then every code satisfies \begin{equation}\label{eq:cover} |C|\leq\sum_{x\in C}\sum_{R\ni x}w_R =\sum_Rw_R|C\cap R|\leq\sum_Rw_Rb_R. \end{equation} Orbit-symmetric weights do not presume that the unknown code is symmetric: each individual inequality remains valid and the certificate expands every orbit. \subsection{The prerequisite bounds} First, $S_5(3,1)\leq7$. Give weight one to each $U(a)$ with $a$ a permutation of $(0,0,0,0,2)$, and weight $1/2$ to each $F(b)$ with $b$ a permutation of $(0,1,1,1,1)$. A word of type $(3,0,0,0,0)$ or $(2,1,0,0,0)$ belongs to a $U$ clique; a word of type $(1,1,1,0,0)$ belongs to two $F$ cliques. Thus every vertex is covered, the total is $5+5/2=15/2$, and integrality gives seven. Second, $S_5(6,1)\leq42$ is established by the supplied complete binary certificate tree on the 210-vertex conflict graph. Its 1,637 nodes comprise 818 branches and 819 leaves. Each internal node selects an active vertex $v$. The exclusion branch removes $v$; the inclusion branch selects $v$ and removes it and its neighbors. These two cases exhaust all independent sets. At a leaf, nonnegative integer clique weights have denominator $M=10{,}000{,}000$, and cover each remaining active vertex to total at least $M$. If $a$ vertices have already been selected, the verified inequality is \[ \sum_jw_j+aM<43M. \] Consequently every leaf permits at most 42 total vertices. The verifier reconstructs the graph from pairwise distances, checks every clique, the complete tree, all cover inequalities, and strict integer bounds. The smallest positive scaled slack is 288; exact arithmetic, rather than a numerical tolerance, makes that slack conclusive. No solver status is a premise of this proof. \subsection{The length-ten certificate and construction} Table~\ref{tab:quinary} gives the complete 28-orbit certificate. For each representative, include every distinct coordinate permutation of the corresponding base and assign it the displayed numerator divided by 1380. The bounds are one for $U,F$, seven for $T_3$, and 42 for $T_6$. Expanded, these are 835 valid inequalities. Exact verification over all $\binom{14}{4}=1001$ vertices gives coverage at least one and total weighted right-hand side exactly 201. Equation~\eqref{eq:cover} proves the upper bound. The congruence code \[ C=\{x\in V_{10}:x_1+2x_2+3x_3+4x_4\equiv0\pmod5\} \] has 201 words by direct enumeration. Two conflicting words differ by $e_i-e_j$ for distinct indices, which changes their syndrome by the nonzero residue $i-j$. Thus the entire syndrome class is a distance-two code. The verifier also checks all 20,100 pairs directly, proving the lower bound and equality. At length nine, a second exact binary tree proves the upper bound 143. The graph has 715 vertices and 4,950 edges. Its constraints are 1,491 cliques, 210 translates of $V_3$ with bound seven, and 35 translates of $V_6$ with bound 42. The tree has 221 nodes, comprising 110 branches and 111 leaves. At a leaf with selected set $Q$ and active set $W$, a constraint $R$ has residual bound $b_R-|Q\cap R|$. Nonnegative integer weights cover every active vertex to at least $M=10{,}000{,}000$, and the verifier checks \[ |Q|M+\sum_R w_R(b_R-|Q\cap R|)<144M. \] This proves at most 143 words in every leaf. The minimum scaled slack is 6,965, and all checks use exact integers. The zero-syndrome class at length nine contains 143 words; all 10,153 pairs are checked, proving equality. The earlier rational cover giving upper bound 144 remains an optional weaker certificate, not the final result. \begin{table}[p] \centering \caption{Length-ten cover. Each weight is its numerator divided by 1380.}\label{tab:quinary} \begin{tabular}{c|c|r|r} Family & Representative & Numerator & Orbit size \\ \hline $U$ & $(0,0,0,0,9)$ & 564 & 5 \\ $U$ & $(0,0,0,1,8)$ & 270 & 20 \\ $U$ & $(0,0,0,2,7)$ & 72 & 20 \\ $U$ & $(0,0,0,3,6)$ & 222 & 20 \\ $U$ & $(0,0,1,1,7)$ & 24 & 30 \\ $U$ & $(0,0,1,2,6)$ & 246 & 60 \\ $U$ & $(0,0,1,3,5)$ & 222 & 60 \\ $U$ & $(0,0,2,3,4)$ & 198 & 60 \\ $U$ & $(0,0,3,3,3)$ & 396 & 10 \\ $U$ & $(0,1,1,2,5)$ & 144 & 60 \\ $U$ & $(0,1,1,3,4)$ & 100 & 60 \\ $U$ & $(0,1,2,2,4)$ & 202 & 60 \\ $U$ & $(0,1,2,3,3)$ & 304 & 60 \\ $U$ & $(0,2,2,2,3)$ & 279 & 20 \\ $U$ & $(1,1,1,1,5)$ & 64 & 5 \\ $U$ & $(1,1,1,3,3)$ & 58 & 10 \\ $F$ & $(1,1,1,1,7)$ & 492 & 5 \\ $F$ & $(1,1,1,2,6)$ & 101 & 20 \\ $F$ & $(1,1,1,4,4)$ & 242 & 10 \\ $F$ & $(1,1,2,3,4)$ & 56 & 60 \\ $F$ & $(1,2,2,3,3)$ & 64 & 30 \\ $T_{3}$ & $(0,0,0,0,7)$ & 396 & 5 \\ $T_{3}$ & $(0,0,0,2,5)$ & 222 & 20 \\ $T_{3}$ & $(0,0,0,3,4)$ & 48 & 20 \\ $T_{3}$ & $(0,0,2,2,3)$ & 24 & 30 \\ $T_{3}$ & $(0,1,1,2,3)$ & 1 & 60 \\ $T_{3}$ & $(1,1,1,2,2)$ & 138 & 10 \\ $T_{6}$ & $(0,0,0,0,4)$ & 420 & 5 \\ \end{tabular} \end{table} \subsection{Necessary conditions for equality} The independently expanded certificate has coverage exactly one except on permutations of $(0,0,0,1,9)$, with coverage $55/46$, and of $(0,1,3,3,3)$, with coverage $231/230$. If $|C|=201$, both inequalities in~\eqref{eq:cover} must be equalities. Such a code therefore omits those 40 excess-coverage vertices. Every positive-weight constraint is tight; in particular, each $T_6(4e_i)$ contains exactly 42 codewords, equivalently exactly 42 words satisfy $x_i\geq4$. These are necessary conditions, not a uniqueness or sufficiency claim. \subsection{Certificate verification} The bundle contains the prerequisite orbit certificate, compressed length-six and length-nine trees, final length-ten translated-simplex certificate, optional weaker length-nine cover, and two verifiers. The independent verifier imports no search code or numerical solver; it regenerates compositions, builds metric edges directly, expands every constraint orbit, and uses arbitrary-precision integers and rational fractions. Its checks remain active under Python optimization. Negative-control tests reject corrupted denominators, repeated or unreachable tree nodes, missing leaf coverage, and deleted orbit weights. Search software used floating-point optimization to discover candidate certificates, but only the checked exact data are premises of the result. \begin{thebibliography}{9} \bibitem{KT} M. Kova\v{c}evi\'c and V. Y. F. Tan, ``Codes in the Space of Multisets---Coding for Permutation Channels with Impairments,'' \emph{IEEE Transactions on Information Theory} 64(7), 5156--5169 (2018). \href{https://doi.org/10.1109/TIT.2017.2789292}{doi:10.1109/TIT.2017.2789292}. \url{https://arxiv.org/abs/1612.08837}. \bibitem{KEZ} A. Kreindel, I. B. Essayag, and A. L. Zabokritskiy (Yohananov), ``Multiset Deletion Codes: Cyclic Constructions, Bounds, and Exact Results,'' arXiv:2601.05636v2 (2026; revised 13 July). \url{https://arxiv.org/abs/2601.05636v2}. \bibitem{CMZ} T. Chen, Y. Ma, and X. Zhang, ``Optimal Codes with Small Constant Weight in $\ell_1$-Metric,'' arXiv:2003.00483v2 (2020; revised 9 October). \url{https://arxiv.org/abs/2003.00483v2}. \bibitem{KV} M. Kova\v{c}evi\'c and D. Vukobratovi\'c, ``Perfect Codes in the Discrete Simplex,'' \emph{Designs, Codes and Cryptography} 75(1), 81--95 (2015). \href{https://doi.org/10.1007/s10623-013-9893-5}{doi:10.1007/s10623-013-9893-5}. \url{https://arxiv.org/abs/1307.3142}. \bibitem{CHG} T. Chen, Z. He, and G. Ge, ``Constant $\ell_1$-Weight Codes Under $\ell_\infty$-Metric,'' \emph{IEEE Transactions on Information Theory} 70(7), 4928--4945 (2024). \href{https://doi.org/10.1109/TIT.2024.3385419}{doi:10.1109/TIT.2024.3385419}. Full-text comparison unresolved. \bibitem{Langi} Z. L\'angi, \emph{Relative Distance of Points of a Convex Body}, doctoral dissertation, ELTE TTK, Mathematics Doctoral School (2003), Chapter 2 and Theorem 6. \url{https://www.math.u-szeged.hu/~zlangi/publications/dissertation.pdf}. \end{thebibliography} \end{document}