Next Article in Journal
An Effective and Efficient Genetic-Fuzzy Algorithm for Supporting Advanced Human-Machine Interfaces in Big Data Settings
Next Article in Special Issue
Editorial: Special Issue on Data Compression Algorithms and Their Applications
Previous Article in Journal
A Numerical Approach for the Filtered Generalized Čech Complex
Previous Article in Special Issue
Finding Patterns in Signals Using Lossy Text Compression
Open AccessArticle

Optimal Prefix Free Codes with Partial Sorting

Departamento de Ciencias de la Computación, Universidad de Chile, 8370448 Santiago, Chile
This paper is an extended version of our paper published in the proceedings of the 27th Annual Symposium on Combinatorial Pattern Matching (CPM 2016) (Tel Aviv, Israel, 27–29 June 2016).
Algorithms 2020, 13(1), 12;
Received: 29 November 2019 / Revised: 23 December 2019 / Accepted: 25 December 2019 / Published: 31 December 2019
(This article belongs to the Special Issue Data Compression Algorithms and their Applications)
We describe an algorithm computing an optimal prefix free code for n unsorted positive weights in time within O ( n ( 1 + lg α ) ) O ( n lg n ) , where the alternation α [ 1 . . n 1 ] approximates the minimal 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 n and alternation α . Such results refine the state of the art complexity of Θ ( n lg n ) in the worst case over instances of size n in the same computational model, a landmark in compression and coding since 1952. Beside the new analysis technique, such improvement is obtained by combining a new algorithm, inspired by van Leeuwen’s algorithm to compute optimal prefix free codes from sorted weights (known since 1976), with a relatively minor extension of Karp et al.’s deferred data structure to partially sort a multiset accordingly to the queries performed on it (known since 1988). Preliminary experimental results on text compression by words show α to be polynomially smaller than n, which suggests improvements by at most a constant multiplicative factor in the running time for such applications. View Full-Text
Keywords: deferred data structure; Huffman; median; optimal prefix free codes; partial sum; van Leeuwen deferred data structure; Huffman; median; optimal prefix free codes; partial sum; van Leeuwen
Show Figures

Figure 1

MDPI and ACS Style

Barbay, J. Optimal Prefix Free Codes with Partial Sorting. Algorithms 2020, 13, 12.

Show more citation formats Show less citations formats
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

Back to TopTop