Skip to main content

Worst-Case Optimal Adaptive Prefix Coding

  • Conference paper
Algorithms and Data Structures (WADS 2009)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5664))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Article  MathSciNet  MATH  Google Scholar 

  2. Andersson, A., Thorup, M.: Dynamic ordered sets with exponential search trees. Journal of the ACM 54(3) (2007)

    Google Scholar 

  3. Faller, N.: An adaptive system for data compression. In: Record of the 7th Asilomar Conference on Circuits, Systems and Computers, pp. 593–597 (1973)

    Google Scholar 

  4. 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)

    Article  MathSciNet  MATH  Google Scholar 

  5. Gagie, T.: Dynamic Shannon coding. In: Proceedings of the 12th European Symposium on Algorithms, pp. 359–370 (2004)

    Google Scholar 

  6. Gagie, T.: Dynamic Shannon coding. Information Processing Letters 102(2–3), 113–117 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  7. Gagie, T., Karpinski, M., Nekrich, Y.: Low-memory adaptive prefix coding. In: Proceedings of the Data Compression Conference, pp. 13–22 (2009)

    Google Scholar 

  8. Gagie, T., Nekrich, Y.: Tight bounds for online stable sorting and comparison-based guessing games (submitted)

    Google Scholar 

  9. Gallager, R.G.: Variations on a theme by Huffman. IEEE Transactions on Information Theory 24(6), 668–674 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  10. Gilbert, E.N., Moore, E.F.: Variable-length binary encodings. Bell System Technical Journal 38, 933–967 (1959)

    Article  MathSciNet  Google Scholar 

  11. Huffman, D.A.: A method for the construction of minimum-redundancy codes. Proceedings of the IRE 40(9), 1098–1101 (1952)

    Article  MATH  Google Scholar 

  12. Karpinski, M., Nekrich, Y.: A fast algorithm for adaptive prefix coding. Algorithmica (to appear)

    Google Scholar 

  13. Knuth, D.E.: Dynamic Huffman coding. Journal of Algorithms 6(2), 163–180 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  14. Krause, R.M.: Channels which transmit letters of unequal durations. Information and Control 5(1), 13–24 (1962)

    Article  MathSciNet  MATH  Google Scholar 

  15. 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)

    Article  MathSciNet  MATH  Google Scholar 

  16. Moffat, A., Turpin, A.: On the implementation of minimum redundancy prefix codes. IEEE Transactions on Communications 45(10), 1200–1207 (1997)

    Article  Google Scholar 

  17. Nekrich, Y.: An efficient implementation of adaptive prefix coding. In: Proceedings of the Data Compression Conference, p. 396 (2007)

    Google Scholar 

  18. Schwartz, E.S., Kallick, B.: Generating a canonical prefix encoding. Communications of the ACM 7(3), 166–169 (1964)

    Article  MATH  Google Scholar 

  19. Shannon, C.E.: A mathematical theory of communication. Bell System Technical Journal 27, 379–423, 623–656 (1948)

    Article  MathSciNet  MATH  Google Scholar 

  20. Turpin, A., Moffat, A.: On-line adaptive canonical prefix coding with bounded compression loss. IEEE Transactions on Information Theory 47(1), 88–98 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  21. Vitter, J.S.: Design and analysis of dynamic Huffman codes. Journal of the ACM 1987(4), 825–845 (1987)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics