Abstract
Given an alphabet Σ = {a 1,...,a n} and a corresponding list of weights [w 1,...,w n], an optimal prefix code is a prefix code for Σ that minimizes the weighted length of a code string, defined to be \(\sum_{i=1}^{n} w_i l_i\), where l i is the length of the codeword assigned to a i. This problem is equivalent to the following problem: given a list of weights [w 1,...,w n], find an optimal binary code tree, that is, a binary tree T that minimizes the weighted path length \(\sum_{i=1}^{n} w_i l_i\), where l i is the level of the i-th leaf of T from left to right. If the list of weights is sorted, this problem can be solved in O(n) by one of the efficient implementations of Huffman’s Algorithm [Huf52]. Any tree constructed by Huffman’s Algorithm is called a Huffman tree.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Garey, M.R.: Optimal binary search trees with restricted maximal depth. Siam Journal on Computing 3(2), 101–110 (1974)
Gilbert, E.N.: Codes based on innacurate source probabilities. IEEE Transactions on Information Theory 17, 304–314 (1971)
Huffman, D.A.: A method for the construction of minimum-redundancy codes. In: Proc. Inst. Radio Eng., pp. 1098–1101 (September 1952); Published as Proc. Inst. Radio Eng. 40(9)
Larmore, L.L., Hirschberg, D.S.: A fast algorithm for optimal length-limited Huffman codes. Journal of the ACM 37(3), 464–473 (1990)
McMillan, B.: Two inequalities implied by unique decipherability. IEEE Transaction on Information Theory 22, 155–156 (1956)
Schieber, B.: Computing a minimum-weight k-link path in graphs with the concave Monge property. In: Proceedings of the Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, California, pp. 405–411, January 22–24 (1995)
Turpin, A., Moffat, A.: Efficient implementation of the packagemerge paradigm for generating length-limited codes. In: Houle, M.E., Eades, P. (eds.) Proceedings of Conference on Computing: The Australian Theory Symposium, Townsville, pp. 187–195, January 29–30 (1996); Australian Computer Science Communications
Zobel, J., Moffat, A.: Adding compression to a full-text retrieval system. Software—Practice and Experience 25(8), 891–903 (1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Milidiú, R.L., Laber, E.S. (2000). Linear Time Recognition of Optimal L-Restricted Prefix Codes. In: Gonnet, G.H., Viola, A. (eds) LATIN 2000: Theoretical Informatics. LATIN 2000. Lecture Notes in Computer Science, vol 1776. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10719839_23
Download citation
DOI: https://doi.org/10.1007/10719839_23
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67306-4
Online ISBN: 978-3-540-46415-0
eBook Packages: Springer Book Archive