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.

Iskandar (2026) constructed codes giving the following lower bounds. Each construction is a union of orbits under a specified cyclic coordinate permutation, with exact reconstruction and distance-checking certificates.

ndwlower bound for A(n,d,w)
1647841
2045876
25467800
29454491
2965333
364511207
384513737
394515618
444525585
544560632
554566144
604594105
6245107360

Iskandar (2026) reports AI assistance with the computational search, certificate software, and structural analysis.

Nonbinary codes attaining the exact covering bound at odd minimum distance are generalized Steiner systems. For fixed alphabet size, weight, and covering strength, Wang et al. (2026) proved existence at every sufficiently large length satisfying the necessary divisibility conditions.


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.00173.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.Iskandar, P. R. A. "Thirteen Improved Binary Constant-Weight Codes with Explicit Cyclic Orbit Certificates." 10 Nov 2026. https://arxiv.org/abs/2611.24958.Wang, X.; Li, S.; and Shi, M. "The Existence of Generalized Steiner Systems." 19 Nov 2026. https://arxiv.org/abs/2611.26226.

Cite this as:

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

Subject classifications