Abstract
We give a variant of the pairing heaps that achieves the following amortized costs: O(1) per find-min and insert, O(log log n) per decrease-key and meld, O(log n) per delete-min; where n is the number of elements in the resulting heap on which the operation is performed. These bounds are the best known for any self-adjusting heap and match two lower bounds, one established by Fredman and the other by Iacono and Özkan, for a family of self-adjusting heaps that generalizes the pairing heaps but do not include our variant. We further show how to reduce the amortized cost for meld to be paid by the other operations, on the expense of increasing that of delete-min to O(log n + log log N), where N is the total number of elements in the collection of heaps of the data structure (not just the heap under consideration by the operation).
- Amr Elmasry. 2001. Adaptive Properties of Pairing Heaps. Technical Report TR 2001-29. DIMACS.Google Scholar
- Amr Elmasry. 2004. Parameterized self-adjusting heaps. J. Algorithms 52, 2 (2004), 103--119. DOI:http://dx.doi.org/10.1016/j.jalgor.2004.03.002 Google ScholarDigital Library
- Amr Elmasry. 2009. Pairing heaps with O(log log n) decrease cost. In Proceedings of the 20th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’09). 471--476. http://dl.acm.org/citation.cfm?id=1496770.1496822Google ScholarCross Ref
- Amr Elmasry. 2010. Pairing heaps with costless meld. In Proceedings of the 18th Annual European Symposium on Algorithms, Part II (ESA’10). 183--193. DOI:http://dx.doi.org/10.1007/978-3-642-15781-3_16 Google ScholarCross Ref
- Amr Elmasry and Michael L. Fredman. 1997. Unpublished experiments. (1997).Google Scholar
- Michael L. Fredman. 1999a. On the efficiency of pairing heaps and related data structures. J. ACM 46, 4 (1999), 473--501. DOI:http://dx.doi.org/10.1145/320211.320214 Google ScholarDigital Library
- Michael L. Fredman. 1999b. A priority queue transform. In Proceedings of the 3rd International Workshop on Algorithm Engineering, WAE’99, London, UK, July 19-21, 1999. 244--258. DOI:http://dx.doi.org/10.1007/3-540-48318-7_20 Google ScholarCross Ref
- Michael L. Fredman, Robert Sedgewick, Daniel Dominic Sleator, and Robert Endre Tarjan. 1986. The pairing heap: A new form of self-adjusting heap. Algorithmica 1, 1 (1986), 111--129. DOI:http://dx.doi.org/10.1007/BF01840439 Google ScholarDigital Library
- Michael L. Fredman and Robert Endre Tarjan. 1987. Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34, 3 (1987), 596--615. DOI:http://dx.doi.org/10.1145/28869.28874 Google ScholarDigital Library
- John Iacono. 2000. Improved upper bounds for pairing heaps. In Proceedings of the 7th Scandinavian Workshop on Algorithm Theory (SWAT’00). 32--45. DOI:http://dx.doi.org/10.1007/3-540-44985-X_5 Google ScholarCross Ref
- John Iacono and Özgür Özkan. 2014a. A tight lower bound for decrease-key in the pure heap model. CoRR abs/1407.6665 (2014). http://arxiv.org/abs/1407.6665Google Scholar
- John Iacono and Özgür Özkan. 2014b. Why some heaps support constant-amortized-time decrease-key operations, and others do not. In Proceedings of the 41s International Colloquium on Automata, Languages, and Programming, Part I (ICALP’14). 637--649. DOI:http://dx.doi.org/10.1007/978-3-662-43948-7_53 Google ScholarCross Ref
- D. Jones. 1986. An empirical comparison of priority-queues and event-set implementations. Commun. ACM 29, 4 (1986), 300--311. Google ScholarDigital Library
- Daniel H. Larkin, Siddhartha Sen, and Robert Endre Tarjan. 2014. A back-to-basics empirical study of priority queues. In Proceedings of the 16th Workshop on Algorithm Engineering and Experiments (ALENEX’14). 61--72. DOI:http://dx.doi.org/10.1137/1.9781611973198.7 Google ScholarCross Ref
- Bernard M. E. Moret and Henry D. Shapiro. 1992. An empirical assessment of algorithms for constructing a minimum spanning tree. In Proceedings of a DIMACS Workshop on Computational Support for Discrete Mathematics. 99--118.Google Scholar
- Seth Pettie. 2005. Towards a final analysis of pairing heaps. In Proceedings of the 46th Annual IEEE Symposium on Foundations of Computer Science (FOCS’05). 174--183. DOI:http://dx.doi.org/10.1109/SFCS.2005.75 Google ScholarDigital Library
- Daniel Dominic Sleator and Robert Endre Tarjan. 1985. Self-adjusting binary search trees. J. ACM 32, 3 (1985), 652--686. DOI:http://dx.doi.org/10.1145/3828.3835 Google ScholarDigital Library
- Daniel Dominic Sleator and Robert Endre Tarjan. 1986. Self-adjusting heaps. SIAM J. Comput. 15, 1 (1986), 52--69. DOI:http://dx.doi.org/10.1137/0215004 Google ScholarDigital Library
- John T. Stasko and Jeffrey Scott Vitter. 1987. Pairing heaps: Experiments and analysis. Commun. ACM 30, 3 (1987), 234--249. DOI:http://dx.doi.org/10.1145/214748.214759 Google ScholarDigital Library
- Robert Endre Tarjan. 1985. Amortized computational complexity. SIAM J. Algebraic Discrete Methods 6 (1985), 306--318. Google ScholarDigital Library
Index Terms
- Toward Optimal Self-Adjusting Heaps
Recommendations
Melding priority queues
We show that any priority queue data structure that supports insert, delete, and find-min operations in pq(n) amortized time, where n is an upper bound on the number of elements in the priority queue, can be converted into a priority queue data ...
Hollow Heaps
We introduce the hollow heap, a very simple data structure with the same amortized efficiency as the classical Fibonacci heap. All heap operations except delete and delete-min take O(1) time, worst case as well as amortized; delete and delete-min take O(...
Pairing heaps, scrambled pairing and square-root trees
Fredman et al. have shown that the amortized cost for deleting the item with the minimum value from a pairing heap is O(√n), no matter how the pairing is done [M. Fredman, R. Sedgewick, D. Sleator, and R. Tarjan, The Pairing heap: a new form of self-...
Comments