Take , as required for the lower bound in this part. A binary Huffman code has a full binary tree: every merge has two children, and all codewords are leaves. More generally an optimal prefix code for positive-probability symbols cannot have an internal vertex with only one child, since suppressing that vertex shortens its descendant codewords and reduces the expected length.
Choose a leaf of maximum depth . Its sibling must also be a leaf, since an internal sibling would have a descendant deeper than . These two leaves give the deepest sibling property of an optimal prefix code, and there are only leaves altogether. Therefore
For the degenerate singleton alphabet, an empty codeword suffices and ; the stated lower bound consequently excludes .
If all leaves of a full binary tree have depth , all binary paths of length end in leaves. Thus it has exactly leaves and . Equivalently, equality in the Kraft inequality gives .
Conversely, when a complete depth- tree is a prefix code with mean length . For any prefix lengths , convexity gives
so . The complete tree is optimal. A Huffman code attains this optimum, and equality in the strictly convex first inequality forces all its lengths to equal . Hence, for ,
This also proves that ties in the Huffman construction do not change the conclusion.
Use the balancing fact proved by the exchange argument in part d: every leaf of an optimal tree has depth or . A full binary tree with this property has all possible vertices at level ; at least one of these is split into two deepest leaves. Thus
These inequalities characterize the maximum codeword length exactly:
In the suggested notation , , this is for and for . The distinction at a power of two is important.
Suppose a leaf has depth . By part a there is a sibling pair of leaves at depth . These leaves are disjoint from the shallow leaf and its descendants, since a leaf has no descendants. Modify the prefix tree of a code by splitting the shallow leaf into two leaves at depth and replacing the deepest sibling pair by their parent as one leaf at depth . The number of leaves remains , so assign the equiprobable source letters bijectively to the new leaves.
The sum of depths for the three affected leaves changes from to . The change is
All other depths are unchanged. Since probabilities are equal, this strictly decreases the expected codeword length, contradicting the optimality of the Huffman code. This is the balancing exchange for a uniform optimal prefix code. There is therefore no leaf of depth at most , proving
The argument applies to every optimal binary prefix tree for the uniform source, independently of how Huffman ties are resolved.
A full binary tree has Kraft sum one. For example, place mass one at the root and divide each internal vertex's mass equally between its children; a leaf at depth receives , and the total mass on leaves remains one. Using part d gives the two equations
Multiplying the second equation by and subtracting the first gives the uniform-source Huffman length distribution
If , the first number is zero and every codeword has length . Otherwise both levels occur. The corresponding mean length is .
For the uniform 27-symbol model, . The uniform-source Huffman length distribution gives
Thus five symbols receive four-bit codewords and the other 22 receive five-bit codewords. To realize these lengths, start with all 32 binary words of length five and collapse any five disjoint sibling pairs into their four-bit parents. This leaves exactly five leaves at depth four and 22 at depth five. All source letters have the same probability, so which five letters receive the shorter codewords is arbitrary.
The expected codeword length is
The 27 symbols may represent 26 letters and a space, but this idealization keeps them equiprobable; it is not an empirical frequency model of English.
Use base-two logarithms and put , with . Zero-probability letters can be omitted. The random variables are self-information values, are IID, and have finite mean because the alphabet is finite. Independence gives
For an arbitrary , define the typical set
The weak law of large numbers implies . Every string in this set satisfies
This is the asymptotic equipartition property for the given finite IID source, here obtained directly from the weak law of large numbers.
For the upper bound, summing the lower bound on typical-string probabilities yields . For sufficiently large , its probability is at least , so it is an admissible set in the definition of . Hence
For the lower bound, let be any admissible set and write . Then
Each member of this intersection has probability at most . Therefore, for all sufficiently large ,
This applies in particular to a minimum-size admissible set, giving a liminf at least . Letting proves both existence and the value of the minimal high-probability source-set exponent:
For a deterministic source, and , consistent with the formula.
For coding, label the strings in an admissible set with distinct binary indices of length . A decoder reconstructs those strings exactly and may fail outside the set. Thus asymptotically bits per source symbol describe any fixed fraction of the probability mass. More strongly, every rate permits block codes with error tending to zero: choose , encode the typical strings individually and reserve one index for all other strings. The required number of indices is at most for large .
Conversely, a block encoder with at most outputs can reconstruct at most that many distinct input strings correctly. If , choose . Its success probability is at most
This gives the strong converse for fixed-rate source coding. It is the operational significance of the information entropy limit for reliable source encoding at a rate. The allowance of a small reconstruction error matters: a fixed-length code that must encode every possible string without error generally needs the larger rate .
We give the bounds for an alphabet of size , including the binary case . Let be a length- code with codewords and minimum Hamming distance at least , where . Write for the maximum code size at a given distance and
for the number of words in a Hamming ball of radius . The th term chooses the changed coordinates and the alternative symbols in each.
For the Hamming bound, put . Balls of radius around distinct codewords are disjoint: a common point would, by the triangle inequality, make their distance at most . Counting those balls inside the ambient words proves
No linearity is needed. For a linear code of dimension over , replace by .
For the Gilbert–Varshamov bound, construct a code greedily, adding any word at distance at least from all previously selected words, until none remains. The process terminates because the space is finite. Its maximality implies that the radius- balls around its codewords cover the whole space: an uncovered word could have been added. These balls may overlap, but the size of their union is at most the sum of their sizes. Hence the constructed code has , proving the existence bound
One may take the ceiling on the right because code size is integral.
For completeness, the sharper linear version is the Varshamov bound for linear codes. When is a prime power and , an linear code exists provided
Set and choose columns of an parity-check matrix in order. When choosing column , exclude all combinations of at most earlier columns, including the zero combination. There are at most forbidden vectors, smaller than by the assumed inequality. A column can therefore be chosen. Inductively every set of at most chosen columns is independent: a relation involving the newest one would express it as a combination of at most earlier columns. The kernel has dimension at least and minimum Hamming distance at least , since a low-weight kernel vector would be such a column relation. If its dimension is larger than , take a -dimensional subspace. This proves the stated linear existence claim; it does not assume the greedy nonlinear code was linear.
To derive the asymptotic bounds, define the q-ary entropy
with the continuous endpoint conventions. Its derivative is , so it is increasing on and has maximum one at . Stirling's formula gives, uniformly for integer ,
The sum defining is between its largest summand and times that summand. For radius fractions tending to , monotonicity of makes the largest exponent tend to . Consequently the Hamming ball volume exponent is
For , the exponent is one: use a radius fraction just below for a lower bound and for an upper bound.
Set and define the asymptotic rate-distance function by
The code rate is and the relative minimum distance is . A limsup suffices; no unproved existence of a limit for optimal code sizes is required. The packing radii have fraction tending to , so the finite Hamming bound and the volume exponent give the asymptotic Hamming bound
The covering radii have fraction tending to , giving the asymptotic Gilbert–Varshamov bound
For larger , this covering argument gives only the trivial lower bound zero, not the expression obtained by extending the decreasing information entropy function beyond its maximum.
The asymptotic lower bound is also achievable by linear codes over a finite field. For and sufficiently large , take redundancy , so . The linear existence condition produces dimension at least ; its rate has liminf at least . At , use the whole space, of rate one. In particular, for binary codes the bounds reduce to
where is the binary entropy function.
Use binary codes, so the polynomial modulus is in . A cyclic code is a linear subspace of invariant under the cyclic shift . Identify a word with . Addition is coefficientwise, and multiplication is polynomial multiplication reduced modulo . In the quotient ring
multiplication by is exactly that cyclic shift. Closure under this map and linear combinations gives closure under multiplication by every polynomial, so a cyclic code is an ideal of . Conversely, an ideal is a linear subspace closed under multiplication by , proving the correspondence.
Take the inverse image of in . This is an ideal containing . The polynomial division algorithm shows directly that it has a unique monic generator : choose a nonzero polynomial of least polynomial degree and divide any other member by it; the remainder is in the ideal and has smaller polynomial degree, so must vanish. If two monic generators existed, mutual divisibility would make them equal. Because belongs to the ideal, . Conversely every monic divisor of defines an ideal of . Thus the generator polynomial of a cyclic code satisfies
For a nonzero code, is its nonzero polynomial representative of least polynomial degree. For the zero code, use , whose residue in is zero; this standard convention covers that endpoint despite its having no nonzero codeword.
Let and , and put . Every codeword has a unique representation with : dividing an arbitrary multiplier by does not change its product with modulo . The words have distinct leading degrees below and are independent. Consequently
The statement remains valid for the zero code, with an empty basis, and the full code, with .
For length 16, characteristic two gives . Its only monic divisors are for . Hence all binary cyclic codes of length a power of two in this case are
There are exactly 17 codes, forming the chain . This is a repeated-root cyclic code situation, so it would be incorrect to count just square-free factors. Their canonical check polynomials of a cyclic code are . An explicit expansion of each generator is .
The canonical check polynomial of a cyclic code is
Indeed means . Since , cancellation in the polynomial ring gives , exactly code membership. No coprimality of and is needed, including for length 16.
There is a normalization qualification in the printed definition. The kernel condition alone does not force the supplied polynomial to equal this canonical . If , write and with . Then holds exactly when , so its kernel is the ideal generated by . Therefore
Equivalently with . Requiring the monic divisor of selects the canonical check polynomial of a cyclic code. For example gives the same kernel as , since is a unit modulo , but is generally a different polynomial. Given any permitted , taking recovers the canonical .
To construct a parity-check matrix, write the canonical and its reciprocal polynomial . Take coefficient vectors, padded to length , of
as the rows of . Here because , so these rows have successive leading degrees and are independent. For a word , row has dot product , the coefficient of in the ordinary product . If , then with . This product has no terms in degrees , so . The kernel of has dimension , the same as , proving . This proves the reciprocal-polynomial parity-check matrix construction and identifies its rows as a basis for the dual of a cyclic code.
Alternatively, a supplied check polynomial of a cyclic code reduced modulo , , gives the polynomial multiplication parity-check matrix
This circulant matrix represents multiplication by modulo , so its kernel is and its matrix rank is . Selecting independent rows yields a rank- parity-check matrix even without initially normalizing the supplied polynomial.
The syndrome labels the coset . Indeed if and only if , equivalently . There are cosets, each with words, and the syndrome classification of code cosets gives a bijection between them and . If is a transmitted codeword plus an error, then : the syndrome determines the error coset. Choosing a minimum-weight coset leader and subtracting it performs minimum-distance decoding. The error itself need not be uniquely identified, but it is unique when its weight is at most , since the corresponding error-correction balls are disjoint.
For the repetition code, the nonzero codeword is the all-ones word, so
Their product is , and the generator polynomial degree gives dimension one. For the single parity-check code, membership is , equivalent to divisibility by . Thus
Its dimension is ; it is the even-weight code.
Finally, factor the binary length-seven modulus:
A standard cyclic realization of the Hamming code of length seven uses
Its dimension is four. The reciprocal-check construction gives
Its columns are exactly the seven distinct nonzero vectors of , so no word of weight one or two is in its kernel. The generator itself has weight three, so the minimum Hamming distance is exactly three; this is the Hamming code. Reversing the cyclic coordinate order gives the equally valid reciprocal choice
The polynomial answer therefore depends on the cyclic coordinate convention, while the resulting codes are equivalent.

Articles by others on the same topic (0)

There are currently no matching articles.