Abstract
A common complaint about adaptive prefix coding is that it is much slower than static prefix coding. Karpinski and Nekrich recently took an important step towards resolving this: they gave an adaptive Shannon coding algorithm that encodes each character in O (1) amortized time and decodes it in O (logH + 1) amortized time, where H is the empirical entropy of the input string s. For comparison, Gagie’s adaptive Shannon coder and both Knuth’s and Vitter’s adaptive Huffman coders all use Θ(H + 1) amortized time for each character. In this paper we give an adaptive Shannon coder that both encodes and decodes each character in O (1) worst-case time. As with both previous adaptive Shannon coders, we store s in at most (H + 1) |s| + o (|s|) bits. We also show that this encoding length is worst-case optimal up to the lower order term. In short, we present the first algorithm for adaptive prefix coding that encodes and decodes each character in optimal worst-case time while producing an encoding whose length is also worst-case optimal.
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
Andersson, A., Bro Miltersen, P., Thorup, M.: Fusion trees can be implemented with AC0 instructions only. Theoretical Computer Science 215(1–2), 337–344 (1999)
Andersson, A., Thorup, M.: Dynamic ordered sets with exponential search trees. Journal of the ACM 54(3) (2007)
Faller, N.: An adaptive system for data compression. In: Record of the 7th Asilomar Conference on Circuits, Systems and Computers, pp. 593–597 (1973)
Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. Journal of Computer and System Sciences 47(3), 424–436 (1993)
Gagie, T.: Dynamic Shannon coding. In: Proceedings of the 12th European Symposium on Algorithms, pp. 359–370 (2004)
Gagie, T.: Dynamic Shannon coding. Information Processing Letters 102(2–3), 113–117 (2007)
Gagie, T., Karpinski, M., Nekrich, Y.: Low-memory adaptive prefix coding. In: Proceedings of the Data Compression Conference, pp. 13–22 (2009)
Gagie, T., Nekrich, Y.: Tight bounds for online stable sorting and comparison-based guessing games (submitted)
Gallager, R.G.: Variations on a theme by Huffman. IEEE Transactions on Information Theory 24(6), 668–674 (1978)
Gilbert, E.N., Moore, E.F.: Variable-length binary encodings. Bell System Technical Journal 38, 933–967 (1959)
Huffman, D.A.: A method for the construction of minimum-redundancy codes. Proceedings of the IRE 40(9), 1098–1101 (1952)
Karpinski, M., Nekrich, Y.: A fast algorithm for adaptive prefix coding. Algorithmica (to appear)
Knuth, D.E.: Dynamic Huffman coding. Journal of Algorithms 6(2), 163–180 (1985)
Krause, R.M.: Channels which transmit letters of unequal durations. Information and Control 5(1), 13–24 (1962)
Milidiú, R.L., Laber, E.S., Pessoa, A.A.: Bounding the compression loss of the FGK algorithm. Journal of Algorithms 32(2), 195–211 (1999)
Moffat, A., Turpin, A.: On the implementation of minimum redundancy prefix codes. IEEE Transactions on Communications 45(10), 1200–1207 (1997)
Nekrich, Y.: An efficient implementation of adaptive prefix coding. In: Proceedings of the Data Compression Conference, p. 396 (2007)
Schwartz, E.S., Kallick, B.: Generating a canonical prefix encoding. Communications of the ACM 7(3), 166–169 (1964)
Shannon, C.E.: A mathematical theory of communication. Bell System Technical Journal 27, 379–423, 623–656 (1948)
Turpin, A., Moffat, A.: On-line adaptive canonical prefix coding with bounded compression loss. IEEE Transactions on Information Theory 47(1), 88–98 (2001)
Vitter, J.S.: Design and analysis of dynamic Huffman codes. Journal of the ACM 1987(4), 825–845 (1987)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Gagie, T., Nekrich, Y. (2009). Worst-Case Optimal Adaptive Prefix Coding. In: Dehne, F., Gavrilova, M., Sack, JR., Tóth , C.D. (eds) Algorithms and Data Structures. WADS 2009. Lecture Notes in Computer Science, vol 5664. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03367-4_28
Download citation
DOI: https://doi.org/10.1007/978-3-642-03367-4_28
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-03366-7
Online ISBN: 978-3-642-03367-4
eBook Packages: Computer ScienceComputer Science (R0)