Optimal Prefix Free Codes With Partial Sorting
J\'er\'emy Barbay

TL;DR
This paper introduces an algorithm for computing optimal prefix free codes that adapts to the amount of sorting needed, achieving near-optimal complexity and refining the classic worst-case bounds.
Contribution
It presents a novel algorithm that computes optimal prefix free codes with complexity depending on partial sorting, improving over the traditional $O(n \\lg n)$ bound.
Findings
Achieves complexity within a constant factor of the optimal in the algebraic decision tree model.
Refines the classic $\\Theta(n \\lg n)$ worst-case complexity for prefix free codes.
Combines van Leeuwen's algorithm with deferred data structures for partial sorting.
Abstract
We describe an algorithm computing an optimal prefix free code for unsorted positive weights in time within , where the alternation measures the amount of sorting required by the computation. This asymptotical complexity is within a constant factor of the optimal in the algebraic decision tree computational model, in the worst case over all instances of size and alternation . Such results refine the state of the art complexity of in the worst case over instances of size in the same computational model, a landmark in compression and coding since 1952, by the mere combination of van Leeuwen's algorithm to compute optimal prefix free codes from sorted weights (known since 1976), with Deferred Data Structures to partially sort a multiset depending on the queries on it (known since 1988).
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.
