Skip to main content

Efficient Implementation of the WARM-UP Algorithm for the Construction of Length-Restricted Prefix Codes

  • Chapter
  • First Online:
Algorithm Engineering and Experimentation (ALENEX 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1619))

Included in the following conference series:

Abstract

Given an alphabet = {a 1. . ., a n} with a corresponding list of positive weights {w 1, . . ., w n} and a length restriction L, the length-restricted prefix code problem is to find, a prefix code that minimizes ∑ ni=1 w i l i, where l i, the length of the codeword assigned to ai, cannot be greater than L, for i = 1, . . ., n. In this paper, we present an efficient implementation of the WARM-UP algorithm, an approximative method for this problem. The worst-case time complexity of WARM-UP is O(n log n+n logw n), where w n is the greatest weight. However, some experiments with a previous implementation of WARM-UP show that it runs in linear time for several practical cases, if the input weights are already sorted. In addition, it often produces optimal codes. The proposed implementation combines two new enhancements to reduce the space usage of WARM-UP and to improve its execution time. As a result, it is about ten times faster than the previous implementation of WARM-UP and overcomes the LRR Package Method, the faster known exact method.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

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. Aggarwal, Schieber, and Tokuyama. Finding a minimum-weight k-link path in graphs with the concave monge property and applications. GEOMETRY: Discrete & Computational Geometry, 12, 1994.

    Google Scholar 

  2. J. Brian Connell. A Huffman-Shannon-Fano code. In Proceedings of the IEEE, volume 61, pages 1046–1047, July 1973.

    Article  Google Scholar 

  3. Shimon Even. Graph Algorithms. Computer Science Press, 1979.

    Google Scholar 

  4. A. S. Fraenkel and S. T. Klein. Bounding the depth of search trees. The Computer Journal, 36(7):668–678, 1993.

    Article  Google Scholar 

  5. R.G. Gallager. Variations on a theme of huffman. IEEE Transaction on Information Theory, IT-24(6):668–674, November 1978.

    Article  MathSciNet  Google Scholar 

  6. D. Harman. Overview of the second text retrieval conference (trec-2). Information Processing Management, 31(3):271–289, 1995.

    Article  Google Scholar 

  7. D. A. Huffman. A method for the construction of minimum-redundancy codes. In Proc. Inst. Radio Eng., pages 1098–1101, September 1952. Published as Proc. Inst. Radio Eng., volume 40, number 9.

    Google Scholar 

  8. Katajainen, Moffat, and Turpin. A fast and space-economical algorithm for length-limited coding. In ISAAC: 6th International Symposium on Algorithms and Computation (formerly SIGAL International Symposium on Algorithms), Organized by. Special Interest Group on Algorithms (SIGAL) of the Information Processing Society of Japan (IPSJ) and the Technical Group on Theoretical Foundation of Computing of the Institute of Electronics, Information and Communication Engineers (IEICE)), 1995.

    Google Scholar 

  9. Lawrence L. Larmore and Daniel S. Hirschberg. A fast algorithm for optimal length-limited Huffman codes. Journal of the ACM, 37(3):464–473, July 1990.

    Article  MATH  MathSciNet  Google Scholar 

  10. Ruy L. Milidiú and Eduardo S. Laber. Warm-up algorithm: A lagrangean construction of length restricted huffman codes. Technical Report 15, Departamento de Informática, PUC-RJ, Rio de Janeiro, Brasil, January 1996.

    Google Scholar 

  11. Ruy L. Milidiú and Eduardo S. Laber. Improved bounds on the inefficiency of length restricted codes. Technical Report 33, Departamento de Informática, PUCRJ, Rio de Janeiro, Brasil, January 1997.

    Google Scholar 

  12. Ruy L. Milidiú, Artur A. Pessoa, and Eduardo S. Laber. Practical use of the warm-up algorithm on length-restricted codes. In Ricardo Baeza-Yates, editor, Proceedings of the Fourth Latin American Workshop on String Processing, volume 8 of International Informatics Series, pages 80–94, Valparaiso, Chile, November 1997. Carleton University Press.

    Google Scholar 

  13. Ruy L. Milidiú, Artur A. Pessoa, and Eduardo S. Laber. A space-economical algorithm for minimum-redundancy coding. Technical Report 02, Departamento de Informática, PUC-RJ, Rio de Janeiro, Brasil, January 1998.

    Google Scholar 

  14. Ruy L. Milidiú, Artur A. Pessoa, and Eduardo S. Laber. Two space-economical algorithms for calculating minimum redundancy prefix codes. In Proceedings of the DCC (to appear), March 1999.

    Google Scholar 

  15. A. Moffat and A. Turpin. On the implementation of minimum-redundancy prefix codes. IEEE Transactions on Communications, 45(10):1200–1207, October 1995.

    Article  Google Scholar 

  16. A. Moffat and A. Turpin. Efficient construction of minimum-redundancy codes for large alphabets. IEEE Transactions on Information Theory, 44(4), July 1998.

    Google Scholar 

  17. Alistair Moffat and Jyrki Katajainen. In-place calculation of minimum-redundancy codes. In Selim G. Akl, Frank K. H. A. Dehne, Jörg-Rüdiger Sack, and Nicola Santoro, editors, Algorithms and Data Structures, 4th International Workshop, volume 955 of Lecture Notes in Computer Science, pages 393–402, Kingston, Ontario, Canada, 16–18 August 1995. Springer.

    Google Scholar 

  18. Edleno S. Moura, Gonzalo Navarro, and Nivio Ziviani. Indexing compressed text. In Ricardo Baeza-Yates, editor, Proceedings of the Fourth Latin American Workshop on String Processing, volume 8 of International Informatics Series, pages 95–111, Valparaiso, Chile, November 1997. Carleton University Press.

    Google Scholar 

  19. Baruch Schieber. Computing a minimum-weight k-link path in graphs with the concave Monge property. In Proceedings of the Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 405–411, San Francisco, California, 22–24 January 1995.

    Google Scholar 

  20. Eugene S. Schwartz. An optimum encoding with minimum longest code and total number of digits. Information and Control, 7(1):37–44, March 1964.

    Article  MATH  MathSciNet  Google Scholar 

  21. R. M. Stallman. Using and Porting GNU CC, 1995. Available at the URL http://ocean.ucc.ie/utils/manuals/gcc/gcc.ps.

  22. A. Turpin and A. Moffat. Practical length-limited coding for large alphabets. The Computer Journal, 38(5):339–347, 1995.

    Article  Google Scholar 

  23. Andrew Turpin. Efficient Prefix Coding. PhD thesis, University of Melbourne, Departament of Computer Science, July 1998.

    Google Scholar 

  24. Andrew Turpin and Alistair Moffat. Efficient implementation of the package-merge paradigm for generating length-limited codes. In Michael E. Houle and Peter Eades, editors, Proceedings of Conference on Computing: The Australian Theory Symposium, pages 187–195, Townsville, 29–30 January 1996. Australian Computer Science Communications.

    Google Scholar 

  25. J. van Leeuwen. On the construction of Huffman trees. In S. Michaelson and R. Milner, editors, Third International Colloquium on Automata, Languages and Programming, pages 382–410, University of Edinburgh, 20–23 July 1976. Edinburgh University Press.

    Google Scholar 

  26. Justin Zobel and Alistair Moffat. Adding compression to a full-text retrieval system. Software—Practice and Experience, 25(8):891–903, August 1995.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Milidiú, R.L., Pessoa, A.A., Laber, E.S. (1999). Efficient Implementation of the WARM-UP Algorithm for the Construction of Length-Restricted Prefix Codes. In: Goodrich, M.T., McGeoch, C.C. (eds) Algorithm Engineering and Experimentation. ALENEX 1999. Lecture Notes in Computer Science, vol 1619. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48518-X_1

Download citation

  • DOI: https://doi.org/10.1007/3-540-48518-X_1

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66227-3

  • Online ISBN: 978-3-540-48518-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics