Two-tier relaxed heaps
- 39 Downloads
- 8 Citations
Abstract
We introduce a data structure which provides efficient heap operations with respect to the number of element comparisons performed. Let n denote the size of the heap being manipulated. Our data structure guarantees the worst-case cost of O(1) for finding the minimum, inserting an element, extracting an (unspecified) element, and replacing an element with a smaller element; and the worst-case cost of O(lg n) with at most lg n + 3 lg lg n + O(1) element comparisons for deleting an element. We thereby improve the comparison complexity of heap operations known for run-relaxed heaps and other worst-case efficient heaps. Furthermore, our data structure supports melding of two heaps of size m and n at the worst-case cost of O(min {lg m, lg n}).
Keywords
Active Node Priority Queue Lower Store Current Minimum Element ComparisonPreview
Unable to display preview. Download preview PDF.
References
- 1.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, New York (1996)Google Scholar
- 2.Brodal, G.S., Okasaki, C.: Optimal purely functional priority queues. J. Funct. Programming 6(6), 839–857 (1996)MATHCrossRefGoogle Scholar
- 3.Clancy, M.J., Knuth, D.E.: A programming and problem-solving seminar. Technical Report STAN-CS-77-606, Department of Computer Science, Stanford University (1977)Google Scholar
- 4.Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. The MIT Press, Cambridge (2001)MATHGoogle Scholar
- 5.Driscoll, J.R., Gabow, H.N., Shrairman, R., Tarjan, R.E.: Relaxed heaps: an alternative to Fibonacci heaps with applications to parallel computation. Comm. ACM 31(11), 1343–1354 (1988)CrossRefMathSciNetGoogle Scholar
- 6.Elmasry, A., Jensen, C., Katajainen, J.: A framework for speeding up priority-queue operations. CPH STL Report 2004-3, Department of Computing, University of Copenhagen. Available at http://cphstl.dk (2004)
- 7.Elmasry, A., Jensen, C., Katajainen, J.: Two new methods for transforming priority queues into double-ended priority queues. CPH STL Report 2006-9, Department of Computing, University of Copenhagen Available at http://cphstl.dk (2006)
- 8.Elmasry, A., Jensen, C., Katajainen, J.: Two-tier relaxed heaps. In: Proceedings of the 17th International Symposium on Algorithms and Computation. Lecture Notes in Computer Science, vol. 4288, pp. 308–317. Springer, Berlin (2006)Google Scholar
- 9.Elmasry, A., Jensen, C., Katajainen, J.: Multipartite priority queues. ACM Transactions on Algorithms (2008, in press)Google Scholar
- 10.Fredman, M.L.: On the efficiency of pairing heaps and related data structures. J. ACM 46(4), 473–501 (1999)MATHCrossRefMathSciNetGoogle Scholar
- 11.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)MATHCrossRefMathSciNetGoogle Scholar
- 12.Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)CrossRefMathSciNetGoogle Scholar
- 13.Gonnet, G.H., Munro, J.I.: Heaps on heaps. SIAM J. Comput. 15(4), 964–971 (1986)MATHCrossRefMathSciNetGoogle Scholar
- 14.Goodrich, M.T., Tamassia, R.: Algorithm Design: Foundations, Analysis, and Internet Examples. Wiley, New York (2002)MATHGoogle Scholar
- 15.Kaplan, H., Shafrir, N., Tarjan, R.E.: Meldable heaps and Boolean union-find. In: Proceedings of the 34th Annual ACM Symposium on Theory of Computing, pp. 573–582. ACM, New York (2002)Google Scholar
- 16.Kaplan, H., Tarjan, R.E.: New heap data structures. Technical Report TR-597-99, Department of Computer Science, Princeton University (1999)Google Scholar
- 17.Kernighan, B.W., Ritchie, D.M.: The C Programming Language, 2nd edn. Prentice Hall PTR, Englewood Cliffs (1988)Google Scholar
- 18.Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)Google Scholar
- 19.Overmars, M.H., van Leeuwen, J.: Worst-case optimal insertion and deletion methods for decomposable searching problems. Inform. Process. Lett. 12(4), 168–173 (1981)MATHCrossRefGoogle Scholar
- 20.Vuillemin, J.: A data structure for manipulating priority queues. Comm. ACM 21(4), 309–315 (1978)MATHCrossRefMathSciNetGoogle Scholar
- 21.Williams, J.W.J.: Algorithm 232: Heapsort. Comm. ACM 7(6), 347–348 (1964)Google Scholar