Optimal Prefix Free Code in Linear Time
J\'er\'emy Barbay

TL;DR
This paper presents a linear-time algorithm for computing optimal prefix free codes from unsorted weights, significantly improving over previous methods and leveraging specific hardware instructions and theoretical insights.
Contribution
It introduces a novel linear-time algorithm for Huffman coding that outperforms existing complexity bounds in standard computational models.
Findings
Achieves linear time complexity in the number of machine words.
Improves over previous $O(N ext{log}N)$ and $O(N ext{log} ext{log}N)$ algorithms.
Utilizes hardware-specific instructions and theoretical results for optimal prefix codes.
Abstract
We describe an algorithm computing an optimal prefix free code from unsorted positive integer weights in time linear in the number of machine words holding those weights. This algorithm takes advantage of common non-algebraic instructions, and of specific results on optimal prefix free codes. This result improves over the state of the art complexities of in the algebraic decision tree model and in the RAM model for the computation of Huffman's codes, a landmark in compression and coding since 1952.
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.
Taxonomy
TopicsAlgorithms and Data Compression · semigroups and automata theory · Machine Learning and Algorithms
