## Description

A linear \(q\)-ary code whose codewords all have one of two possible nonzero Hamming weights.

## Notes

See [1,2] for overviews of two-weight codes and Refs. [3,4] for examples.There is a classification of two-weight codes of length 40 [5] as well as of \([n,m,d]_q\) codes with the two weights \(n,d\) [6].Sizes of maximal two-weight, three-weight, and four-weight binary codes have been determined [7].

## Parent

## Child

## Cousins

- Divisible code — Two-weight codes are \(m\)-divisible, where \(m\) is the greatest common factor of their two possible weights.
- Projective geometry code — There are several correpondences between projective and two-weight codes [2,6,8].
- Weight-two code — Codewords of two-weight codes have one of two possible Hamming weights, while those of weight-two codes have Hamming weight two.

## References

- [1]
- A. E. Brouwer, "Two-weight Codes." Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021) DOI
- [2]
- R. Calderbank and W. M. Kantor, “The Geometry of Two-Weight Codes”, Bulletin of the London Mathematical Society 18, 97 (1986) DOI
- [3]
- A. Cossidente and O. H. King, “Some two-character sets”, Designs, Codes and Cryptography 56, 105 (2010) DOI
- [4]
- A. Cossidente and G. Marino, “Veronese embedding and two–character sets”, Designs, Codes and Cryptography 42, 103 (2006) DOI
- [5]
- I. Bouyukliev, M. Dzhumalieva-Stoeva, and V. Monev, “Classification of Binary Self-Dual Codes of Length 40”, IEEE Transactions on Information Theory 61, 4253 (2015) DOI
- [6]
- D. Jungnickel and V. D. Tonchev, “The classification of antipodal two-weight linear codes”, Finite Fields and Their Applications 50, 372 (2018) DOI
- [7]
- A. Barg et al., “On the size of maximal binary codes with 2, 3, and 4 distances”, (2022) arXiv:2210.07496
- [8]
- A. E. Brouwer and M. van Eupen, Designs, Codes and Cryptography 11, 261 (1997) DOI

## Page edit log

- Victor V. Albert (2023-04-15) — most recent

## Cite as:

“Two-weight code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2023. https://errorcorrectionzoo.org/c/two_weight