Skip to main content

Fast and Compact Prefix Codes

  • Conference paper
SOFSEM 2010: Theory and Practice of Computer Science (SOFSEM 2010)

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

Abstract

It is well-known that, given a probability distribution over n characters, in the worst case it takes Θ(n logn) bits to store a prefix code with minimum expected codeword length. However, in this paper we first show that, for any ε with 0 < ε< 1/2 and 1 /ε = O(polylog(n)), it takes O(n loglog(1 / ε)) bits to store a prefix code with expected codeword length within an additive ε of the minimum. We then show that, for any constant c > 1, it takes O(n 1 / c logn) bits to store a prefix code with expected codeword length at most c times the minimum. In both cases, our data structures allow us to encode and decode any character in O(1) time.

Funded in part by Millennium Institute for Cell Dynamics and Biotechnology (ICDB), Grant ICM P05-001-F, Mideplan, Chile.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. Adler, M., Maggs, B.M.: Protocols for Asymmetric Communication Channels. Journal of Computer and System Sciences 63(4), 573–596 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  2. Beame, P., Fich, F.E.: Optimal Bounds for the Predecessor Problem and Related Problems. Journal of Computer and System Sciences 65(1), 38–72 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  3. Ferragina, P., Manzini, G., Mäkinen, V., Navarro, G.: Compressed Representations of Sequences and Full-Text Indexes. ACM Transactions on Algorithms 3(2), Article 20 (2007)

    Google Scholar 

  4. Fredman, M.L., Komlós, J., Szemerédi, E.: Storing a Sparse Table with O1 Worst Case Access Time. Journal of the ACM 31(3), 538–544 (1984)

    Article  MATH  Google Scholar 

  5. 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  MATH  MathSciNet  Google Scholar 

  6. Gagie, T.: Compressing Probability Distributions. Information Processing Letters 97(4), 133–137 (2006)

    Article  MathSciNet  Google Scholar 

  7. Gagie, T.: Large alphabets and incompressibility. Information Processing Letters 99(6), 246–251 (2006)

    Article  MathSciNet  Google Scholar 

  8. Gagie, T.: Dynamic asymmetric communication. Information Processing Letters 108(6), 352–355 (2008)

    Article  MathSciNet  Google Scholar 

  9. Gagie, T., Nekrich, Y.: Worst-Case Optimal Adaptive Prefix Coding. In: Proceedings of the Algorithms and Data Structures Symposium (WADS), pp. 315–326 (2009)

    Google Scholar 

  10. Gilbert, E.N., Moore, E.F.: Variable-Length Binary Encodings. Bell System Technical Journal 38, 933–967 (1959)

    MathSciNet  Google Scholar 

  11. Grossi, R., Gupta, A., Vitter, J.: High-Order Entropy-Compressed Text Indexes. In: Proceedings of the 14th Symposium on Discrete Algorithms (SODA), pp. 841–850 (2003)

    Google Scholar 

  12. Karpinski, M., Nekrich, Y.: A Fast Algorithm for Adaptive Prefix Coding. Algorithmica 55(1), 29–41 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  13. Katona, G.O.H., Nemetz, T.O.H.: Huffman Codes and Self-Information. IEEE Transactions on Information Theory 22(3), 337–340 (1976)

    Article  MATH  MathSciNet  Google Scholar 

  14. Klein, S.T.: Skeleton Trees for the Efficient Decoding of Huffman Encoded Texts. Information Retrieval 3(4), 315–328 (2000)

    Google Scholar 

  15. Milidiú, R.L., Laber, E.S.: Bounding the Inefficiency of Length-Restricted Prefix Codes. Algorithmica 31(4), 513–529 (2001)

    Article  MATH  MathSciNet  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. Munro, J.I., Raman, V.: Succinct Representation of Balanced Parentheses and Static Trees. SIAM Journal on Computing 31(3), 762–776 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  18. Nakatsu, N.: Bounds on the Redundancy of Binary Alphabetical Codes. IEEE Transactions on Information Theory 37(4), 1225–1229 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  19. Schwarz, E.S., Kallick, B.: Generating a Canonical Prefix Encoding. Communications of the ACM 7(3), 166–169 (1964)

    Article  Google Scholar 

  20. Sheinwald, D.: On Binary Alphabetic Codes. In: Proceedings of the Data Compression Conference (DCC), pp. 112–121 (1992)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gagie, T., Navarro, G., Nekrich, Y. (2010). Fast and Compact Prefix Codes. In: van Leeuwen, J., Muscholl, A., Peleg, D., Pokorný, J., Rumpe, B. (eds) SOFSEM 2010: Theory and Practice of Computer Science. SOFSEM 2010. Lecture Notes in Computer Science, vol 5901. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11266-9_35

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-11266-9_35

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-11265-2

  • Online ISBN: 978-3-642-11266-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics