Skip to main content
Log in

Cascade Heap: Towards Time-Optimal Extractions

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

Heaps are well-studied fundamental data structures, having myriads of applications, both theoretical and practical. We consider the problem of designing a heap with an “optimal” extract-min operation. Assuming an arbitrary linear ordering of keys, a heap with n elements typically takes \(O(\log n)\) time to extract the minimum. Extracting all elements faster is impossible as this would violate the \({\Omega }(n \log n)\) bound for comparison-based sorting. It is known, however, that is takes only \(O(n + k \log k)\) time to sort just k smallest elements out of n given, which prompts that there might be a faster heap, whose extract-min performance depends on the number of elements extracted so far. In this paper we show that this is indeed the case. We present a version of heap that performs insert in \(O(1)\) time and takes only \(O(\log ^{*} n + \log k)\) time to carry out the k-th extraction (where \(\log ^{*}\) denotes the iterated logarithm). All the above bounds are worst-case.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1

Similar content being viewed by others

References

  1. Blum, M., Floyd, R.W., Pratt, V., Rivest, R.L., Tarjan, R.E.: Time bounds for selection. J. Comput. Syst Sci. 7(4), 448–461 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  2. Babenko, M.A., Kolesnichenko, I.I., Smirnov, I: Cascade heap: Towards time-optimal extractions. In: Computer Science - Theory and Applications - 12th International Computer Science Symposium in Russia, CSR 2017, Kazan, Russia, June 8-12, 2017, Proceedings, pp. 62–70 (2017)

  3. Brodal, G.S.: Worst-case efficient priority queues. In: Proceedings of the Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’96, pp. 52–58. Society for Industrial and Applied Mathematics, Philadelphia (1996)

  4. Cormen, T.H., Leiserson, C.E., Rivest, R. L., Stein, C.: Introduction to Algorithms, 3rd edn. The MIT Press (2009)

  5. Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)

    Article  MathSciNet  Google Scholar 

  6. Navarro, G., Paredes, R.: On sorting, heaps, and minimum spanning trees. Algorithmica 57(4), 585–620 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  7. Thorup, M.: On ram priority queues. SIAM J. Comput. 30(1), 86–109 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  8. van Emde Boas, P.: Preserving order in a forest in less than logarithmic time. In: Proceedings of the 16th Annual Symposium on Foundations of Computer Science, SFCS ’75, pp. 75–84. IEEE Computer Society, Washington, DC (1975)

  9. Williams, J.W.J.: Heapsort. Commun. ACM 7, 347–348 (1964)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ignat Kolesnichenko.

Additional information

This article is part of the Topical Collection on Computer Science Symposium in Russia

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Babenko, M., Kolesnichenko, I. & Smirnov, I. Cascade Heap: Towards Time-Optimal Extractions. Theory Comput Syst 63, 637–646 (2019). https://doi.org/10.1007/s00224-018-9866-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-018-9866-1

Keywords

Navigation