Perfect code

Sphere packing condition for a perfect code

C 𝑆𝑛𝑞 is a perfect 𝑒-error correcting code, iff the Hamming balls B𝑒(𝐶) B𝑟(𝐷) = for any two codewords 𝐶 𝐷 and #m/thm/code

|C|𝑒𝑖=0(𝑛𝑖)(𝑞1)𝑖=𝑞𝑛
Proof

Given a codeword 𝑐 C, the number of strings with Hamming distance 𝑖 is given by

{𝑥𝑆𝑛𝑞:𝑑(𝑥,𝑐)=𝑖}=(𝑛𝑖)(𝑞1)𝑖

since there are (𝑛𝑖) combinations of positions different from 𝑐, and each differing position may be one of 𝑞 1 letters. Hence, for a code to be perfect, the closed balls of radius 𝑒 must partition 𝑆𝑛𝑞, giving the expression above.

The latter part can be interpreted as

The first 𝑒 +1 terms of a row in Pascal's triangle sum to a power of 𝑞.


#state/tidy | #lang/en | #SemBr