Perfect code
= Perfect code
{wiki}
A code of minimum distance $d$ is perfect if its <Hamming balls> of radius $\lfloor(d-1)/2\rfloor$ partition the ambient word space. Every word then has a unique nearest codeword within the code's error-correction radius.