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.
Research partially supported by DFG grant ED 74/8-1.
Partially supported by the Danish Natural Science Research Council under contract 09-060411 (project “Generic programming—algorithms and tools”).
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
Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, & Tools, 2nd edn. Pearson Education, Inc., London (2007)
Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley, Reading (2001)
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)
Brown, M.R.: Implementation and analysis of binomial queue algorithms. SIAM Journal on Computing 7(3), 298–319 (1978)
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)
Chan, T.M.: Quake heaps: A simple alternative to Fibonacci heaps (2009) (unpublished manuscript)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)
Department of Computer Science, University of Copenhagen, The CPH STL (2000–2010), Website accessible at http://cphstl.dk/
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)
Dutton, R.D.: Weak-heap sort. BIT 33(3), 372–381 (1993)
Edelkamp, S.: Rank-relaxed weak queues: Faster than pairing and Fibonacci heaps? Technical Report 54, TZI, Universität Bremen (2009)
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)
Elmasry, A.: Violation heaps: A better substitute for Fibonacci heaps, E-print 0812.2851v1, arXiv.org (2008)
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)
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)
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)
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)
Jensen, C.: Private communication (2009)
Katajainen, J.: Project proposal: A meldable, iterator-valid priority queue, CPH STL Report 2005-1, Department of Computer Science, University of Copenhagen (2005)
Katajainen, J.: Priority-queue frameworks: Programs, CPH STL Report 2009-7, Department of Computer Science, University of Copenhagen (2009)
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)
Knuth, D.E.: Fundamental Algorithms, 3rd edn. The Art of Computer Programming, vol. 1. Addison Wesley Longman, Amsterdam (1997)
Knuth, D.E.: Sorting and Searching, 2nd edn. The Art of Computer Programming, vol. 3. Addison-Wesley Longman, Amsterdam (1998)
Mehlhorn, K., Näher, S.: The LEDA Platform of Combinatorial and Geometric Computing. Cambridge University Press, Cambridge (1999)
Mehlhorn, K., Sanders, P.: Algorithms and Data Structures: The Basic Toolbox. Springer, Heidelberg (2008)
Paredes, R.: Graphs for metric space searching, Ph.D. Thesis, Department of Computer Science, University of Chile (2008)
Rasmussen, J.: Implementing run-relaxed weak queues, CPH STL Report 2008-1, Department of Computer Science, University of Copenhagen (2008)
Stasko, J.T., Vitter, J.S.: Pairing heaps: Experiments and analysis. Communications of the ACM 30(3), 234–249 (1987)
Vuillemin, J.: A data structure for manipulating priority queues. Communications of the ACM 21(4), 309–315 (1978)
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)
Williams, J.W.J.: Algorithm 232: Heapsort. Communications of the ACM 7(6), 347–348 (1964)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bruun, A., Edelkamp, S., Katajainen, J., Rasmussen, J. (2010). Policy-Based Benchmarking of Weak Heaps and Their Relatives,. In: Festa, P. (eds) Experimental Algorithms. SEA 2010. Lecture Notes in Computer Science, vol 6049. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13193-6_36
Download citation
DOI: https://doi.org/10.1007/978-3-642-13193-6_36
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-13192-9
Online ISBN: 978-3-642-13193-6
eBook Packages: Computer ScienceComputer Science (R0)