Abstract
Among error-correcting codes there are “perfect codes”, in which every word lies near exactly one codeword. Their number condition is that the points of the spheres around the codewords add up to exactly the number of words. What this paper shows is that this number condition is only necessary for a perfect code to exist: at length $90$ the condition holds but there is no code, and this is seen not by a global count but only by a local count with two positions fixed. No new theorem or law is claimed.
First, the Hamming code is perfect——at length $7$ the radius-one spheres ($8$ points) around its $16$ codewords cover the $128$ words exactly once each: every one of the $128$ words has exactly $1$ codeword within distance $1$ (Section 2).
Second, the Golay code is perfect too——at length $23$ it has $4096$ codewords of minimum weight $7$; radius-three spheres have $2048$ points and fill $4096\times2048=2^{23}$ exactly (Section 3).
Third, few lengths meet the number condition——searching lengths up to $20000$ and up to $8$ errors corrected, apart from Hamming codes and trivial repetition codes only length $23$ (three errors) and length $90$ (two errors) appear (Section 4).
Fourth, and this is the core. At length $90$ the numbers fit, $1+90+4005=4096=2^{12}$, yet there is no code——the $88$ weight-three words containing two given positions would have to be covered three at a time by weight-five codewords, and $88/3=\mathbf{29.333333}$ is not an integer (Section 4).
Fifth, a global count shows no contradiction——the $117480$ weight-three words covered ten at a time by weight-five codewords need $11748$ of them, a whole number. For the Golay code the local count also divides, $20/4=5$, and counting gives $5$ (Section 4).
Sixth, the separator is whether one counts globally or locally with positions fixed——that the global numbers fit does not guarantee that the local numbers fit (Section 5).
Keywords: perfect code, Hamming bound, error-correcting code, Golay code, sphere packing.
Scope (what is not claimed)
No new theorem or law is claimed——the Hamming codes, the Golay code, the sphere-counting bound (Hamming bound), and the counting argument that no perfect code of length $90$ exists are all standard. Only binary codes are treated. The classification of perfect codes is not proved——that there are no binary perfect codes other than Hamming codes, the Golay code and trivial ones is cited, not proved. The search is limited——lengths meeting the number condition were sought up to $20000$ and up to $8$ errors corrected. Decoding procedures are not treated. Relation to earlier papers: Paper 315 showed that which dimension is special depends on the question, and stated in its scope note: “coding theory is not entered; the correspondence between sphere packing and error-correcting codes is not treated”——this paper takes that seat and counts how spheres pack in the space of words. Paper 281 showed that the quantum Hamming bound holds with equality at length $5$, that is, that a quantum perfect code exists——this paper looks at the classical side, at a case where the numbers for equality fit and yet no code exists. Paper 163 showed that “a good code exists” and “here is a good code” are different sentences——this paper adds that “the numbers fit” and “it exists” are different sentences too. Paper 300 wrote that numerical agreement alone is not taken as sharing a root——the number condition here likewise does not guarantee existence by agreement alone; it is a caution of the same shape. What is added is checking exhaustively that the Hamming and Golay codes fill the space of words exactly, searching for lengths that meet the number condition, setting side by side that at length $90$ the global count divides while the local count does not, and placing the separator on global versus local counting.
1. Notation and the Question
Setting: from the $2^n$ binary words of length $n$, choose $2^k$ as codewords. If any two codewords differ in at least $2e+1$ places, up to $e$ errors can be corrected by returning to the nearest codeword. The spheres of radius $e$ around the codewords do not overlap, so
$$2^k\sum_{i=0}^{e}\binom{n}{i}\le 2^n,$$and when equality holds every word lies in exactly one sphere. That is a perfect code.
Observation 1.1 for equality, $\sum_{i\le e}\binom{n}{i}$ must be a power of $2$. That is a number condition, easily checked——whether a code exists whenever the numbers fit is another question.
Question: when the points of the spheres divide the whole exactly, must the perfect code exist?
2. The Hamming Code
Computation 2.1: the Hamming code of length $7$ (parity-check columns the binary numbers $1$ to $7$) was built exhaustively. It has $16$ codewords, the minimum weight of a non-zero codeword is $3$, radius-one spheres have $8$ points, and $16\times8=128=2^7$. Counting, for each of the $128$ words, the codewords within distance $1$ gives a minimum and a maximum of $1$. For Hamming codes of length $2^r-1$, $2^{n-r}(1+n)=2^n$ holds for each of $r=3,4,5,6$.
Observation 2.2 the local count divides too. There are $6$ weight-two words containing a given position, covered by the weight-three codewords containing that position, two each; $6/2=3$ divides, and counting gives $3$——the numbers fit globally and locally.
3. The Golay Code
Computation 3.1: the Golay code of length $23$ was built from the generator polynomial $x^{11}+x^{10}+x^6+x^5+x^4+x^2+1$.
| weight | $0$ | $7$ | $8$ | $11$ | $12$ | $15$ | $16$ | $23$ |
|---|---|---|---|---|---|---|---|---|
| codewords | $1$ | $253$ | $506$ | $1288$ | $1288$ | $506$ | $253$ | $1$ |
There are $4096$ codewords of minimum weight $7$; radius-three spheres have $1+23+253+1771=2048$ points, and $4096\times2048=8388608=2^{23}$.
Observation 3.2 for the Golay code, too, the local count divides. There are $20$ weight-four words containing three given positions, covered four at a time by weight-seven codewords; $20/4=5$ divides, and counting gives $5$——the global count $\binom{23}{4}/\binom{7}{4}=253$ also matches the $253$ codewords of weight $7$.
4. The Number Condition and Length $90$
Computation 4.1: pairs $(n,e)$ with $\sum_{i\le e}\binom{n}{i}$ a power of $2$ were sought for $e$ from $2$ to $8$ and $n$ up to $20000$ (excluding trivial repetition codes $n=2e+1$). Only $(n,e)=(23,3)$ and $(90,2)$ appear; the first is the Golay code. The second meets the number condition: $1+90+4005=4096=2^{12}$.
Computation 4.2: suppose a perfect code of length $90$ correcting two errors exists, and contains $0$. There are $88$ weight-three words with $1$ in the first two positions. Each lies within distance $2$ of exactly one codeword, which must have weight $5$ and contain its three positions. A weight-five codeword containing the first two positions covers exactly $3$ such words, one for each choice of its remaining three positions. So $88$ must be divisible by $3$, but $88/3=\mathbf{29.333333}$, remainder $1$.
Observation 4.3 this is the core. At length $90$ the number condition holds, yet there is no perfect code——that the points of the spheres divide the whole exactly does not guarantee that the spheres can actually be packed.
Observation 4.4 a global count shows no contradiction. There are $\binom{90}{3}=117480$ weight-three words in all, each weight-five codeword covering $\binom{5}{3}=10$, so $11748$ weight-five codewords would do, a whole number——the contradiction appears only when two positions are fixed.
5. The Separator
Observation 5.1 the separator is whether one counts globally or locally with positions fixed. The Hamming and Golay codes fit both globally and locally; length $90$ fits globally and not locally——the global number condition is necessary, and the local count is a stronger necessary condition.
Observation 5.2 taking the seat left by Paper 315. It showed that which dimension is special depends on the question, and set aside the correspondence between sphere packing and error-correcting codes in its scope note——this paper counts how spheres pack in the space of words at lengths $7$, $23$ and $90$.
Observation 5.3 beside Paper 281 and Paper 163. Paper 281 showed that the quantum Hamming bound holds with equality at length $5$; Paper 163 showed that “a good code exists” and “here is a good code” are different sentences——on the classical side, this paper shows at length $90$ that “the numbers fit” and “it exists” are different sentences too.
Observation 5.4 a caution of the same shape as Paper 300. Paper 300 wrote that numerical agreement alone is not taken as sharing a root——the number condition here likewise does not guarantee a code by agreement alone. That the numbers fit is a reason to start the next count, not a conclusion.
Observation 5.5 what is not said. That the binary perfect codes are only the Hamming codes, the Golay code and trivial ones is cited, not proved; the search stopped at length $20000$——what is shown is only that the number condition and existence are separate, counted out in one example.
6. Roll Call and Closing
- the length-$7$ Hamming code: $16\times8=128$ (Computation 2.1): every word covered exactly once.
- locally too, $6/2=3$ (Observation 2.2): counting gives $3$.
- the Golay code: $4096\times2048=2^{23}$ (Computation 3.1): minimum weight $7$.
- the Golay code’s local count $20/4=5$ (Observation 3.2): counting gives $5$.
- the number condition is met by $(23,3)$ and $(90,2)$ (Computation 4.1): up to length $20000$.
- at length $90$, $1+90+4005=2^{12}$ (Computation 4.1): the numbers fit.
- locally, $88/3=\mathbf{29.333333}$ (Computation 4.2): not whole; the core.
- globally, $117480/10=11748$ (Observation 4.4): whole.
- taking the seat left by Paper 315 (Observation 5.2): sphere packing and codes.
- the separator is global versus local (Observation 5.1): fitting numbers do not guarantee existence.
Closing: Among error-correcting codes there are perfect codes, in which every word lies near exactly one codeword; their number condition is that the points of the spheres divide the whole exactly. The Hamming and Golay codes meet the condition and exist——the length-$7$ Hamming code covers the $128$ words exactly once with $16$ spheres of $8$ points, and the length-$23$ Golay code fills $2^{23}$ with $4096$ spheres of $2048$ points; for both, the local count with positions fixed also divides. At length $90$ the number condition holds, yet there is no code——$1+90+4005=4096=2^{12}$ fits, but the $88$ weight-three words containing two given positions would have to be covered three at a time by weight-five codewords, and $88/3=\mathbf{29.333333}$ is not whole. Counted globally, $117480/10=11748$ is whole and shows no contradiction. The separator is whether one counts globally or locally with positions fixed——that the global numbers fit guarantees neither that the local numbers fit nor that the code exists. Placed among the earlier papers——this takes the seat for sphere packing and codes that Paper 315 left in its scope note. Beside the quantum perfect code of Paper 281 and the distinction between “exists” and “here it is” in Paper 163, it shows the distinction between “the numbers fit” and “it exists”. It is a caution of the same shape as Paper 300’s refusal to take numerical agreement alone as sharing a root. To be honest——the classification of binary perfect codes is cited, not proved; the search stopped at length $20000$ and $8$ errors; decoding is not treated.
References
- Golay, M. J. E. (1949). Notes on Digital Coding. Proceedings of the IRE.
- Hamming, R. W. (1950). Error Detecting and Error Correcting Codes. Bell System Technical Journal.
- MacWilliams, F. J., & Sloane, N. J. A. (1977). The Theory of Error-Correcting Codes. North-Holland.
- van Lint, J. H. (1999). Introduction to Coding Theory (3rd ed.). Springer.
- Yamagishi, Y. (2026). “A Good Code Exists” and “Here Is a Good Code” Are Different Sentences [Paper 163]. Zenodo. 10.5281/zenodo.22092677
- Yamagishi, Y. (2026). It Cannot Be Copied, Yet It Can Be Corrected [Paper 281]. Zenodo. 10.5281/zenodo.22171058
- Yamagishi, Y. (2026). The Three Hundredth Census: Whether Two Things Share a Root Is Decidable [Paper 300]. Zenodo. 10.5281/zenodo.22171914
- Yamagishi, Y. (2026). Which Dimension Is Special Depends on the Question [Paper 315]. Zenodo. 10.5281/zenodo.22208139
Reference
Yamagishi, Y. (2026). Meeting the Condition That the Spheres Fill Space Exactly Does Not Mean the Code Exists [Paper 597]. YOI: https://www.yamagishiyuuki.com/yoi/597
DOI: 10.5281/zenodo.23014414
ORCID: 0009-0006-8587-3450
PDF (English) · PDF (Japanese) · Date proof of the English PDF (OpenTimestamps .ots) · SHA256SUMS
The record page for this paper (in Japanese, with the PDFs in each language and the date proof): YOI 597. This paper is a preprint and has not been peer reviewed.