The Huffman algorithm is simple, efficient, and produces the best codes for the individual data symbols. The discussion in Chapter 2 however, shows that the only case where it produces ideal variable-length codes (codes whose average size equals the entropy) is when the symbols have probabilities of occurrence that are negative powers of 2 (i.e., numbers such as 1/2, 1/4, or 1/8). This is because the Huffman method assigns a code with an integral number of bits to each symbol in the alphabet. Information theory tells us that a symbol with probability 0.4 should ideally be assigned a 1.32-bit code, because —log2 0.4 ≈ 1.32. The Huffman method, however, normally assigns such a symbol a code of one or two bits.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2008 Springer-Verlag London Limited
About this chapter
Cite this chapter
(2008). Arithmetic Coding. In: A Concise Introduction to Data Compression. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-1-84800-072-8_4
Download citation
DOI: https://doi.org/10.1007/978-1-84800-072-8_4
Publisher Name: Springer, London
Print ISBN: 978-1-84800-071-1
Online ISBN: 978-1-84800-072-8
eBook Packages: Computer ScienceComputer Science (R0)