TOPICS
Search

Constant-Weight Code


A constant-weight code is an error-correcting code in which every codeword has the same Hamming weight. For binary codes, this means that each codeword contains the same number w of ones. Let A(n,d,w) be the greatest number of binary codewords of length n, weight w, and pairwise Hamming distance at least d (Dzoba 2026).

For pairwise Hamming distance at least 4, A(n,4,w) equals the independence number of the Johnson graph J(n,w). Two distinct binary codewords of weight w are adjacent in this graph precisely when their Hamming distance is 2.

Dzoba (2026) constructed codes giving the following improved lower bounds. These are existence bounds, not claims of optimality.

nwlower bound for A(n,6,w)
271119305
271224804
271327783
28911388
281019110
29914781
291027183
291142042

Each code is a union of orbits of a prescribed permutation group. Dzoba (2026) reports that Claude designed and ran the searches and produced the constructions under the author's direction. Claude and Codex supplied separately written checking programs.

Chang (2026) obtained the upper bound

 A(19,6,8)<=673.

The proof supplies a certificate checked using exact rational arithmetic for a semidefinite programming bound less than 674. Chang (2026) reports using GPT and Claude to prepare the computational code.


See also

Codeword, Error-Correcting Code, Hamming Distance, Hamming Weight

Explore with Wolfram|Alpha

References

Chang, J. "A New Upper Bound for A(19,6,8)." 30 Oct 2026. https://arxiv.org/abs/2611.00173v1.Dzoba, C. "New Lower Bounds for Binary Constant-Weight Codes from Prescribed-Automorphism Search, and Two Quantum Codes Meeting Their Upper Bounds." 16 Oct 2026. https://arxiv.org/abs/2610.24025.Huffman, W. C. and Pless, V. Fundamentals of Error-Correcting Codes. Cambridge, England: Cambridge University Press, 2003. https://doi.org/10.1017/CBO9780511807077.

Cite this as:

Weisstein, Eric W. "Constant-Weight Code." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Constant-WeightCode.html

Subject classifications