Skip to main content

The distribution of keys in a binary heap

  • Conference paper
  • First Online:
Algorithms and Data Structures (WADS 1989)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 382))

Included in the following conference series:

Abstract

We show that the k th smallest element in a large heap is at expected depth ≤log k. Simulation results indicate that this bound is tight, and that the variance of the depth is no more than 0.8, independent of k.

This leads to a simple algorithm for actually finding the k th smallest element that appears to run in O(k) expected time, which would improve the previous best-known bound of O(klog k). We prove an Ω(klog k) lower bound for worst case running time of any algorithm to solve this problem.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

6. References

  1. Atallah M.J, and Kosaraju S.R, "An Adversary Lower Bound For Sorting", Information Processing Letters", 13, 2 (1981), 55–57.

    Article  Google Scholar 

  2. Floyd, R. and Rivest, R., "Expected Time Bounds for Selection", Communications of the ACM, 18, (1975), 165–172.

    Article  Google Scholar 

  3. Fredman, M.L. and Tarjan, R.E., "Fibonacci heaps and their uses in improved network optimization algorithms, Journal of the ACM, 34, 3 (1987), 596–615.

    Article  Google Scholar 

  4. Knuth, D.E., The Art of Computer Programming, Vol. 3: Sorting and Searching (Addison-Wesley, Reading, MA, 1973).

    Google Scholar 

  5. Navlakha, J.K., "Finding the k-th largest element in a large heap in O (k log log n) time", Proceedings of the 1982 Conference of Information Science and Systems, Princeton, (1982) 66–69.

    Google Scholar 

  6. Vuillemin, J., "A data structure for manipulating priority queues", Communications of the ACM, 21, (1978), 309–314.

    Article  Google Scholar 

  7. Williams, J. W. J., Algorithm 232, Communications of the ACM, 7, 6 (1964), 347–348.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

F. Dehne J. -R. Sack N. Santoro

Rights and permissions

Reprints and permissions

Copyright information

© 1989 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Weiss, M.A., Navlakha, J.K. (1989). The distribution of keys in a binary heap. In: Dehne, F., Sack, J.R., Santoro, N. (eds) Algorithms and Data Structures. WADS 1989. Lecture Notes in Computer Science, vol 382. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51542-9_42

Download citation

  • DOI: https://doi.org/10.1007/3-540-51542-9_42

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-51542-5

  • Online ISBN: 978-3-540-48237-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics