TOPICS
Search

Anticode


An anticode of diameter at most d is a set of words whose pairwise Hamming distances are at most d. Unlike an error-correcting code, which separates distinct codewords, an anticode bounds their separation from above (Horlemann and Ravi 2026).

Let m_q(n,d) be the maximum size of an anticode of length n over the finite field F_q, and let A_q(n,d) be the family of all such anticodes. For fixed prime power q and 4<=d<=n-1, Horlemann and Ravi (2026) proved

 |A_q(n,d)|=2^((1+o(1))m_q(n,d))

as n->infty, except when q=2 and d=n-1. The diameter d may depend on n. At the excluded binary endpoint the exact count is 3^(2^(n-1)), including the empty anticode.

A linear anticode is a subspace of F_q^n with the stated diameter bound. Its support consists of the coordinates that are nonzero in some member. Horlemann and Ravi (2026) credit AI with suggesting support size as the organizing parameter for their related enumeration of linear anticodes.


See also

Codeword, Error-Correcting Code, Hamming Distance

Explore with Wolfram|Alpha

References

Ahlswede, R. and Khachatrian, L. H. "The Diametric Theorem in Hamming Spaces--Optimal Anticodes." Adv. Appl. Math. 20, 429-449, 1998. https://doi.org/10.1006/aama.1998.0588.Horlemann, A.-L. and Ravi, A. "The Asymptotic Number of Anticodes in Hamming Spaces." 22 Oct 2026. https://arxiv.org/abs/2610.31618.

Cite this as:

Weisstein, Eric W. "Anticode." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Anticode.html

Subject classifications