Advertisement

Policy-Based Benchmarking of Weak Heaps and Their Relatives,

  • Asger Bruun
  • Stefan Edelkamp
  • Jyrki Katajainen
  • Jens Rasmussen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6049)

Abstract

In this paper we describe an experimental study where we evaluated the practical efficiency of three worst-case efficient priority queues: 1) a weak heap that is a binary tree fulfilling half-heap ordering, 2) a weak queue that is a forest of perfect weak heaps, and 3) a run-relaxed weak queue that extends a weak queue by allowing some nodes to violate half-heap ordering. All these structures support Delete and Delete-min in logarithmic worst-case time. A weak heap supports Insert and Decrease in logarithmic worst-case time, whereas a weak queue reduces the worst-case running time of Insert to O(1), and a run-relaxed weak queue that of both Insert and Decrease to O(1). As competitors to these structures, we considered a binary heap, a Fibonacci heap, and a pairing heap. Generic programming techniques were heavily used in the code development. For benchmarking purposes we developed several component frameworks that could be instantiated with different policies.

Keywords

Priority Queue Left Child Element Comparison Component Framework Binomial Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, & Tools, 2nd edn. Pearson Education, Inc., London (2007)Google Scholar
  2. 2.
    Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley, Reading (2001)Google Scholar
  3. 3.
    Brodal, G.S.: Worst-case efficient priority queues. In: Proceedings of the 7th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 52–58. ACM/SIAM (1996)Google Scholar
  4. 4.
    Brown, M.R.: Implementation and analysis of binomial queue algorithms. SIAM Journal on Computing 7(3), 298–319 (1978)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Bruun, A.: Effektivitetsmåling på krydsninger af svage og binomiale prioritetskøer, CPH STL Report 2010-2, Department of Computer Science, University of Copenhagen (2010)Google Scholar
  6. 6.
    Chan, T.M.: Quake heaps: A simple alternative to Fibonacci heaps (2009) (unpublished manuscript)Google Scholar
  7. 7.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)zbMATHGoogle Scholar
  8. 8.
    Department of Computer Science, University of Copenhagen, The CPH STL (2000–2010), Website accessible at http://cphstl.dk/
  9. 9.
    Driscoll, J.R., Gabow, H.N., Shrairman, R., Tarjan, R.E.: Relaxed heaps: An alternative to Fibonacci heaps with applications to parallel computation. Communications of the ACM 31(11), 1343–1354 (1988)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Dutton, R.D.: Weak-heap sort. BIT 33(3), 372–381 (1993)CrossRefMathSciNetGoogle Scholar
  11. 11.
    Edelkamp, S.: Rank-relaxed weak queues: Faster than pairing and Fibonacci heaps? Technical Report 54, TZI, Universität Bremen (2009)Google Scholar
  12. 12.
    Edelkamp, S., Wegener, I.: On the performance of Weak-Heapsort. In: Reichel, H., Tison, S. (eds.) STACS 2000. LNCS, vol. 1770, pp. 254–266. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  13. 13.
    Elmasry, A.: Violation heaps: A better substitute for Fibonacci heaps, E-print 0812.2851v1, arXiv.org (2008)Google Scholar
  14. 14.
    Elmasry, A., Jensen, C., Katajainen, J.: Relaxed weak queues: An alternative to run-relaxed heaps, CPH STL Report 2005-2, Department of Computer Science, University of Copenhagen (2005)Google Scholar
  15. 15.
    Fredman, M.L., Sedgewick, R., Sleator, D.D., Tarjan, R.E.: The pairing heap: A new form of self-adjusting heap. Algorithmica 1(1), 111–129 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. Journal of the ACM 34(3), 596–615 (1987)CrossRefMathSciNetGoogle Scholar
  17. 17.
    Haeupler, B., Sen, S., Tarjan, R.E.: Rank-pairing heaps. In: Fiat, A., Sanders, P. (eds.) ESA 2009. LNCS, vol. 5757, pp. 659–670. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  18. 18.
    Jensen, C.: Private communication (2009)Google Scholar
  19. 19.
    Katajainen, J.: Project proposal: A meldable, iterator-valid priority queue, CPH STL Report 2005-1, Department of Computer Science, University of Copenhagen (2005)Google Scholar
  20. 20.
    Katajainen, J.: Priority-queue frameworks: Programs, CPH STL Report 2009-7, Department of Computer Science, University of Copenhagen (2009)Google Scholar
  21. 21.
    Katajainen, J., Mortensen, B.B.: Experiences with the design and implementation of space-efficient deques. In: Brodal, G.S., Frigioni, D., Marchetti-Spaccamela, A. (eds.) WAE 2001. LNCS, vol. 2141, pp. 39–50. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  22. 22.
    Knuth, D.E.: Fundamental Algorithms, 3rd edn. The Art of Computer Programming, vol. 1. Addison Wesley Longman, Amsterdam (1997)zbMATHGoogle Scholar
  23. 23.
    Knuth, D.E.: Sorting and Searching, 2nd edn. The Art of Computer Programming, vol. 3. Addison-Wesley Longman, Amsterdam (1998)Google Scholar
  24. 24.
    Mehlhorn, K., Näher, S.: The LEDA Platform of Combinatorial and Geometric Computing. Cambridge University Press, Cambridge (1999)Google Scholar
  25. 25.
    Mehlhorn, K., Sanders, P.: Algorithms and Data Structures: The Basic Toolbox. Springer, Heidelberg (2008)zbMATHGoogle Scholar
  26. 26.
    Paredes, R.: Graphs for metric space searching, Ph.D. Thesis, Department of Computer Science, University of Chile (2008)Google Scholar
  27. 27.
    Rasmussen, J.: Implementing run-relaxed weak queues, CPH STL Report 2008-1, Department of Computer Science, University of Copenhagen (2008)Google Scholar
  28. 28.
    Stasko, J.T., Vitter, J.S.: Pairing heaps: Experiments and analysis. Communications of the ACM 30(3), 234–249 (1987)CrossRefMathSciNetGoogle Scholar
  29. 29.
    Vuillemin, J.: A data structure for manipulating priority queues. Communications of the ACM 21(4), 309–315 (1978)zbMATHCrossRefMathSciNetGoogle Scholar
  30. 30.
    Wegener, I.: Bottom-up-Heapsort, a new variant of Heapsort beating, on an average, Quicksort (if n is not very small). Theoretical Computer Science 118, 81–98 (1993)zbMATHCrossRefMathSciNetGoogle Scholar
  31. 31.
    Williams, J.W.J.: Algorithm 232: Heapsort. Communications of the ACM 7(6), 347–348 (1964)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Asger Bruun
    • 1
  • Stefan Edelkamp
    • 2
  • Jyrki Katajainen
    • 1
  • Jens Rasmussen
    • 1
  1. 1.Department of Computer ScienceUniversity of CopenhagenCopenhagen EastDenmark
  2. 2.TZIUniversität BremenBremenGermany

Personalised recommendations