Abstract

We study asymptotically the redundancy of Huffman (and other) codes. It has been known from the inception of the Huffman (1952) code that in the worst case its redundancy-defined as the excess of the code length over the optimal (ideal) code length-is not more than one. However, to the best of our knowledge no precise asymptotic results have been reported in literature thus far. We consider here a memoryless binary source generating a sequence of length n distributed as binomial (n, p) with p being the probability of emitting 0. Based on the results of Stubley (1994), we prove that for p<1/2 the average redundancy R~/sub n//sup H/ of the Huffman code becomes as n/spl rarr//spl infin/: R~/sub n//sup H/={(3/2-(1/ln2+o(1))=0.057304..., /spl alpha/ irrational); (3/2-(1/M)(- 1/2 )); (-(1/M(1-2/sup -1/M/))2/sup - <n M="" beta="" spl="" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">/M/); (+O(/spl rho//sup n/), /spl alpha/=N/M rational); where /spl alpha/=log/sub 2/(1-p)/p and /spl beta/=-log/sub 2/(1-p), /spl rho/&lt;1, M, N are integers such that gcd (N, M)=1, and <x>=x-[x] is the fractional part of x. The appearance of the fractal-like function explains the erratic behavior of the Huffman redundancy, and its "resistance" to succumb to a precise analysis. As a side result, we prove that the average redundancy of the Shannon block code is as n/spl rarr//spl infin/: R~/sub n//sup S/{( 1/2 +o(1), /spl alpha/ irrational); ( 1/2 -1/M (<Mn beta="" spl=""/>- 1/2 )); (+O(/spl rho//sup n/), /spl alpha/=N/M rational); where /spl rho/&lt;1. Finally, we derive the redundancy of the Golomb (1966) code (for the geometric distribution) which can be viewed as a special case of the Huffman and Shannon codes, Golomb's code redundancy has only oscillating behavior (i.e., there is not convergent mode). These findings are obtained by analytic methods such as theory of distribution of sequences modulo 1 and Fourier series.</x></n>

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call