Use a fixed logarithm base , and write . All relative entropies below use this same base. Adopt and for .
For Gibbs inequality, if at some point, the relative entropy is infinite and the required conclusion is immediate. Otherwise let . The elementary inequality , with equality only at , gives, for every ,ConsequentlyThis argument applies to a countable discrete probability distribution too: the difference between the two sides of the pointwise inequality is nonnegative, and the negative part of the entropy summand is bounded by , hence summable. Thus no subtraction of divergent series is involved. Equality forces both and equality in every pointwise inequality; hence on and off . Conversely plainly gives zero. Therefore .
For the log-sum inequality, set , , and normalize to the probability distributions , . When is nonempty, positivity ensures , and direct expansion givesThus normalization reduces the log-sum inequality to Gibbs inequality. Equality holds exactly when . The empty-set case is the zero identity under the usual zero-mass convention.
For the final bound, partition the alphabet using and put , . Since the total signed difference is zero,Apply the log-sum inequality separately to and its complement. The same normalization argument works for countable sets of finite total mass, using the countable Gibbs inequality just proved. It yields the binary partition bound for relative entropyZero block masses are interpreted by the stated conventions; a positive mass divided by zero makes the bound infinite. The given binary estimate now impliesThis is Pinsker's inequality. Equivalently, for the total variation distance , the bound is . The factor keeps the statement valid for either bits or natural-logarithm units.
For discrete random variables, write for the joint probability mass function and for its marginal. The conditional entropy is the average of the entropies of the conditional distributions:Conditional distributions at zero-probability values of can be chosen arbitrarily; they contribute nothing. Here denotes Shannon entropy, with one common logarithm base and .
For , use and sum with weight . Summing out in the first term givesFor countable alphabets, the entropy contributions are nonnegative, so the equality remains valid with extended values by summing nonnegative terms. Applying this identity successively to the prefix and proves the chain rule for information entropy:For , the conditioning tuple is empty and the term is .
For the subset inequalities, first suppose the marginal entropies are finite, so all joint entropies below are finite by the chain rule and the assumed conditioning reduces entropy property. Put , and let be the joint entropy with coordinate omitted. Apply the two-variable chain rule in the order to getThe inequality holds because the prefix conditioning set is contained in the set of all other coordinates. Summing over and using the chain rule givesThis proves Han's entropy inequality. In terms of the normalized subset entropy, and , hence for .
Apply the same result to each -element coordinate set . It givesWhen this is summed over all -subsets, each fixed -subset occurs once for each possible added coordinate, namely times. ThereforeSubstitute and the analogous identity at . The binomial coefficient identity cancels the common positive factor and givesThis is the monotonicity of normalized subset entropies, obtained from the local -coordinate inequality by explicit counting.
If some marginal entropy is infinite, each subset average contains at least one subset including that coordinate. The entropy of such a subset is at least that marginal entropy, by the nonnegative conditional-entropy chain rule, so every is infinite. The inequalities then hold in the extended sense. Otherwise the finite-entropy proof applies. For independent random variables the averages are all ; repeated copies of one variable instead give , illustrating the entropy reduction caused by redundancy.
A binary block code of length is a nonempty subset . Its size is , the number of distinct codewords. The Hamming distance counts coordinates at which two words differ. The code's minimum Hamming distance is when there are at least two words. No pairwise minimum exists for a singleton code; it can be assigned as a convention when needed.
A binary linear code is a vector subspace of . If its dimension is , a generator matrix has a basis of as its rows, givingTo match the coordinate-row convention, take a parity-check matrix of size , with independent columns, and defineThe transpose is the usual parity-check matrix with one column per coordinate. By rank-nullity theorem, the displayed kernel has dimension . The two constructions agree when : the generator's row space lies in the parity-check kernel and has the same dimension, hence equals it. Conversely, for a given , choose the columns of as a basis of its dual code ; orthogonality and the dimension formula give exactly as the kernel.
For a nonzero linear code, is a nonzero codeword whenever are distinct codewords, and . Conversely compare any nonzero codeword with zero. Thus the minimum Hamming distance of a linear code is the least nonzero Hamming weight.
Write for the row associated with coordinate . A nonzero binary vector is a codeword exactly whenIts nonzero coordinate positions therefore index a linearly dependent set of rows. Conversely, a dependence among a set of rows has coefficients in , not all zero; putting these coefficients in the corresponding coordinates gives a nonzero codeword of weight no greater than the number of rows in that set. Taking minima in both directions proves the parity-check dependencies determine minimum distance criterion:Rows here are indexed by positions: equal row vectors at different positions are two distinct members of the indexed family. In the usual matrix convention, the same result refers to columns of . For the zero code, neither a nonzero codeword nor a dependent coordinate set exists, so both minima can consistently be interpreted as .
For the Hamming code, let , set , and let the rows of be all nonzero vectors of , each once. These rows include the standard basis, so has rank and the code has dimension and size . There is no dependence involving one row, because no row is zero, or two rows, because no rows are equal. For , any two distinct nonzero vectors have a distinct nonzero sum , which is another row. These three rows sum to zero. Thus for .
The perfectness of a Hamming code also has a direct decoding proof. Given any received word , its syndrome is . A zero syndrome means . Otherwise it equals exactly one row . The vector then has syndrome zero and is the unique codeword obtainable by changing one coordinate. There is no other codeword at distance at most one: its necessary correction would have to have the same syndrome, and among zero and all single-coordinate errors the syndromes are precisely the distinct vectors of . Therefore the radius-one Hamming balls about codewords partition .
Equivalently, each ball contains words; disjointness and show that none are uncovered. Hence every nondegenerate binary Hamming code is a perfect single-error-correcting code. For , the construction is the singleton code , whose one radius-one ball is also the whole ambient space. This deals with the degenerate boundary without falsely claiming its minimum distance is three.
Let the distinct codewords be . No linearity assumption is needed. Sum their Hamming distances over unordered distinct pairs:Each summand is at least the minimum Hamming distance , so .
For coordinate , let be the number of codewords whose th bit is . Exactly unordered pairs differ at that coordinate. Summing coordinate contributions givessince . Combining the two bounds and dividing by gives , hence . Under , division is legitimate, proving the Plotkin boundBecause is an integer, it also satisfies the floor of the right-hand side. The binary alphabet is essential to the coordinate count; this proof applies to arbitrary binary block codes, not just linear ones.
Use the homogeneous weight enumerator conventionThus records ones, records zeros, and the ordinary weight enumerator is . For a binary linear code of dimension and its dual code , the MacWilliams identity isor, equivalently, . The second form applies the first to the dual and uses .
One can verify the variable order directly from the character identity . If is not orthogonal to , translation by a codeword having odd inner product pairs positive and negative terms, giving zero; otherwise all terms are one. After multiplying by and summing over , coordinate contributes when , and when . Their product is exactly the stated substitution.
For a Hamming code with , its dual is the binary simplex code, generated by the rows of the usual parity-check matrix . There are dual words. A nonzero message produces the evaluations as runs over all nonzero vectors of . Exactly of them are one: the nonzero linear functional takes each value equally often on the whole vector space, and removing zero removes a zero value only. This proves the constant weight of a binary simplex code.
Put , so . The dual enumerator is therefore . Applying the MacWilliams identity gives the Hamming code weight enumeratorIn one variable this isFor example, gives ; gives . For , the expression is , agreeing with the singleton code. Setting in the homogeneous formula gives , the correct number of codewords.
Articles by others on the same topic
There are currently no matching articles.