Optimal Prefix Codes with Fewer Distinct Codeword Lengths are Faster to Construct
Ahmed Belal, Amr Elmasry

TL;DR
This paper presents a new, faster method for constructing optimal prefix codes that reduces the number of distinct codeword lengths, leading to improved computational efficiency especially when the number of lengths is small.
Contribution
The authors introduce a novel algorithm for minimum-redundancy prefix codes that avoids explicit Huffman tree construction and achieves faster runtimes based on the number of distinct codeword lengths.
Findings
Algorithm runs in O(k·n) time, where k is the number of distinct codeword lengths.
No algorithm can construct optimal prefix codes faster than o(k·n) time.
When weights are presorted, the algorithm performs O(9^k · log^{2k} n) comparisons.
Abstract
A new method for constructing minimum-redundancy binary prefix codes is described. Our method does not explicitly build a Huffman tree; instead it uses a property of optimal prefix codes to compute the codeword lengths corresponding to the input weights. Let be the number of weights and be the number of distinct codeword lengths as produced by the algorithm for the optimum codes. The running time of our algorithm is . Following our previous work in \cite{be}, no algorithm can possibly construct optimal prefix codes in time. When the given weights are presorted our algorithm performs comparisons.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
