{"id":"arxiv/2610.30613","url":"https://arxiv.org/abs/2610.30613","tags":["math.CO"],"score":0,"title":"Asymptotically Sharp Length Thresholds for \\texorpdfstring{$q$}{q}-ary Codes with Distances \\texorpdfstring{$2$}{2} and \\texorpdfstring{$4$}{4}","domain":"math.CO","source":"arxiv","authors":["Valjakas Djaljapayan","Yen-Chi Roger Lin","Wei-Hsuan Yu"],"reviews":0,"subject":"math.CO","summary":"For an integer $q\\ge5$, let $A_q(n,\\{2,4\\})$ be the largest cardinality of a subset of a $q$-ary Hamming space of length $n$ in which every two distinct words have distance $2$ or $4$. Set \\[ N(q)=\\left\\lceil\\max\\left\\{2q+1, \\frac{17+\\sqrt{8q^2+96q-95}}2\\right\\}\\right\\rceil. \\] We prove that $A_q(n,\\{2,4\\})=1+\\binom n2$ for every $n\\ge N(q)$. In particular, $N(q)=2q+1$ for $q\\ge26$. An explicit code of size $q(n-2)$ shows that the least eventual threshold $N_*(q)$ satisfies $N_*(q)\\ge2q-1$; consequently $2q-1\\le N_*(q)\\le2q+1$ for every $q\\ge26$. The argument applies to arbitrary integer…","category":"research","comments":0,"disputed":false,"division":"math","mentions":0,"discussed":0,"published":"2026-10-22","reactions":{}}