= Error detection and correction
{wiki}
<Error detection and correction> adds structured redundancy to messages so that corruption can be noticed or repaired. For a block <block code> with minimum <Hamming distance> $d$, all patterns of at most $d-1$ symbol changes are detectable, and all patterns of at most $\lfloor(d-1)/2\rfloor$ changes are uniquely correctable.
The correction bound follows because radius-$t$ <Hamming balls> around distinct <codewords> are disjoint when $2t<d$. For example, encoding a bit as $000$ or $111$ gives distance three, so majority decoding corrects one flipped bit. A single <parity bit> detects one flipped bit but cannot identify its position; detection and correction require different amounts of information.
Back to article page