A block code assigns source messages to words of a fixed length over an alphabet. Its codewords form a subset of that fixed-length word space; a binary block code uses the two-symbol finite field .
A binary code is a set of distinct words in whose minimum pairwise Hamming distance is . Here is the block length and is the number of codewords.
An error-correcting code is a set of codewords chosen with enough separation to recover a transmitted message after specified errors. For equal-length words and bit-flip errors, separation is measured by Hamming distance. If the minimum distance is , any nonzero pattern of at most flips changes a valid word into an invalid word and can therefore be detected. Every pattern of at most flips can be corrected by choosing the unique nearby codeword.
The distinction matters. A distance-two code detects a single flip but need not locate it; a distance-three code corrects a single flip. The triangle inequality explains the correction threshold: a received word within distance of two distinct codewords would put those codewords within distance , a contradiction. Actual decoders also need an efficient way to find the nearby word; a parity-check matrix and syndrome decoding exploit the structure of a linear code to do this.
A binary repetition code represents one bit by repeating it times, using codewords and . Their Hamming distance is , and the code rate is . For odd , the majority function recovers the input whenever fewer than half the positions have flipped. Even allows a tied vote, so a decoder must specify how it handles that case.
For , the received words decode to zero; decode to one. The decoder therefore corrects every single flip. This guarantee concerns the number of flipped positions, independent of any probabilistic model.
If each position passes independently through a binary symmetric channel with crossover probability , a decoded error requires at least two flips. The binomial distribution gives
At , the uncoded error probability is , while the three-bit code's decoded error probability is . This improvement costs three transmitted bits per message bit. For , ; for , one should first exploit the known tendency to invert symbols rather than applying the same majority rule blindly.
Figure 1.
Three-bit majority decoding corrects one flip and lowers the error probability at the cost of rate
. Details.
Independent flips are an essential assumption for the displayed formula. If a single common disturbance flips all three positions together with probability , repetition provides no improvement. More efficient error-correcting codes distribute redundancy across larger message blocks; repetition is useful as a transparent example of the geometry and the reliability–rate tradeoff.
The Hamming distance between two equal-length words is the number of coordinates in which they differ.
The Hamming space of length over a finite field is the set equipped with Hamming distance, the number of coordinates at which two words differ. The Hamming weight of a word is its distance from zero.
This is the maximum Hamming distance between the characteristic vectors of members of a set family. In a down-set, one can replace a pair by disjoint subsets with the same union, so the maximum distance equals the largest size of a union of two members. A t-intersecting family has diameter at most .
On binary words of length , normalized Hamming distance is the fraction of differing coordinates. Unlike unscaled Hamming distance, it makes the Hamming cubes a Lévy family under uniform probability measures.
The Hamming cube is , or equivalently , equipped with Hamming distance. Under its uniform probability measure, the distance from a fixed vertex has the binomial distribution with parameters . This converts geometric ball sizes into probability tails.
An inclusion-maximal separated set of separation covers the Hamming cube by strict-radius balls. The Hoeffding lower-tail bound for Hamming balls then gives at least selected vertices. At this yields vertices, all separated by at least .
This Hamming distance on partitions identifies a group with its complement because exchanging the two group names does not change the partition. Complementation is an isometry of the ordinary Hamming distance, so minimizing over this two-element group action gives a quotient metric and preserves the triangle inequality. Negating a zero-one indicator is not complementation; with membership vectors, it is.
Suppose encodes the true partition and is a unit estimated eigenvector. Every coordinate of the wrong sign contributes at least to . Since this is at most , which is the squared Frobenius distance between the rank-one orthogonal projection matrices, the bound follows. Coordinates estimated as zero may be assigned consistently to either group.
The minimum distance of a code is the least Hamming distance between distinct codewords. For a linear code, translation invariance makes this equal to the least Hamming weight of a nonzero codeword.
The relative minimum distance of a length- code of minimum distance is . It expresses the guaranteed separation as a fraction of the block length.
// Target: algebra.bigb
The quantity is the largest cardinality of a length- code over an alphabet of size with minimum Hamming distance at least . The code need not be linear.
// Target: algebra.bigb
The Hamming ball of radius about a word is the set of words whose Hamming distance from is at most .
For , the exponential growth rate of a q-ary Hamming ball is . Stirling's formula gives the exponent of each summand , and the sum lies between its largest term and times that term. Above the entropy-maximizing radius fraction, the exponent is one.
// Target: algebra.bigb
For a uniform vertex of the Hamming cube, distance from a fixed vertex is the sum of independent Bernoulli random variables with parameter . The lower-tail Hoeffding inequality implies that the fraction of vertices at distance at most , , is at most . Strict-radius balls satisfy the same upper bound.
For , the number of binary words within Hamming distance of a fixed word is at most , with the binary entropy function in natural logarithms. In , each summand weight for is at least . Also , so . These two bounds give the approximate-recovery denominator in the list-decoding Fano inequality.
A code of minimum distance is perfect if its Hamming balls of radius partition the ambient word space. Every word then has a unique nearest codeword within the code's error-correction radius.
The length- binary Golay code is the cyclic code over generated by
It has dimension , minimum Hamming distance , and its radius- Hamming balls partition . Its parity extension has length , dimension , and minimum Hamming distance .
// Target: algebra.bigb
The extended binary Golay code is the parity extension of the length- binary Golay code. It is a self-dual code and a doubly even code, with minimum Hamming distance eight. Its radius-three Hamming balls are disjoint but do not cover its Hamming space; it is not a perfect code.
For a binary symmetric matrix with , the syndrome of an error relative to the column parity-check matrix is . An error of total Hamming weight at most three has at most one nonzero bit in one half. Test , each , , and each for weights at most three, two, three and two respectively. These identify , , and . For the extended binary Golay code, minimum Hamming distance eight guarantees that at most one such error exists.
Suppose a binary symmetric matrix satisfies , has one row of Hamming weight eleven and eleven rows of Hamming weight seven, and every sum of two distinct rows has Hamming weight six. Then generates a self-dual code. Its rows have weights twelve or eight; their mutual orthogonality makes every generated word doubly even. A weight-four word would have left-half weight one, two, three or four. The first two cases are excluded by the stated row weights; weight three would force to be a unit vector and hence to be a row of ; weight four would force . Thus weight four is impossible and the minimum Hamming distance is eight.
The generator polynomial of a cyclic code defining the binary Golay code is .
A root of the binary Golay generator polynomial has order , and the Frobenius endomorphism shows that are roots: . The BCH bound gives minimum Hamming distance at least five. The circular autocorrelation of the binary Golay generator makes its parity extension doubly even, excluding original weights five and six. The generator itself has Hamming weight seven, proving that the distance is exactly seven.
// Target: algebra.bigb
The polynomial identity , where , implies
Every coefficient is the binary inner product of the coefficient vector of with one cyclic shift. Thus every such inner product is one. Appending a parity bit to the cyclic shifts gives mutually orthogonal weight-eight vectors, so orthogonal generators of doubly even codes applies.
// Target: algebra.bigb
For a code of length , size , and minimum distance over an alphabet of size , puncturing coordinates gives the Singleton bound
The Plotkin bound limits a code whose minimum distance is more than the average distance between unrestricted words. For a binary code with and even ,
Puncturing a code at one coordinate deletes that coordinate from every codeword. For a code of minimum distance , puncturing preserves its number of words and gives minimum distance or .

Articles by others on the same topic (0)

There are currently no matching articles.