Skip to main content

Two new algorithms for constructing min-max heaps

  • Conference paper
  • First Online:
SWAT 88 (SWAT 1988)

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

Included in the following conference series:

Abstract

In this paper we study the computational complexity of constructing implicit, doubleended priority queues organized as min-max heaps, presenting two new algorithms for solving the problem. To construct a min-max heap on n elements, the first one uses 187/96n=1.95 ... n comparisons in the worst case (neglecting lower order terms) and O(n) extra space, while the second one offers a slight improvement in time and space, using (187/96−α)n comparisons, for α ≈ 0.014, i.e., 1.93 ... n comparisons and only O(1) extra space.

The algorithms are particularly interesting as they each have a distinct flavour, even though their time-complexities are virtually identical. The algorithms improve the previously best known upper bound of 2.15 ... n comparisons.

This work was done for the most part while the author was on leave at Institutionen för Teknisk Databehandling, Uppsala Universitet, Sweden.

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.

References

  1. M.D. Atkinson, J.-R. Sack, N. Santoro, and Th. Strothotte. Min-max heaps and generalized priority queues. Communications of the ACM, 29(10):996–1000, October 1986.

    Google Scholar 

  2. S. Carlsson. Average-case analysis of operations on heaps. BIT, 27(1):2–17, 1987.

    Google Scholar 

  3. S. Carlsson. The deap — a double-ended heap to implement double-ended priority queues. Information Processing Letters, 26(1):33–36, September 1987.

    Google Scholar 

  4. S. Carlsson. Heaps. PhD thesis, Department of Computer Science, Lund University, November 1986.

    Google Scholar 

  5. S. Carlsson, J. Chen, and Th. Strothotte. A Note on the Construction of the Data Structure “Deap”. Technical Report, Department of Computer Science, Lund University, February 1988.

    Google Scholar 

  6. E. Doberkat. On deleting the root of a heap. Acta Informatica, 17:245–265, 1982.

    Google Scholar 

  7. R. W. Floyd. Algorithm 245 — treesort3. Communications of the ACM, 7(12):701, 1964.

    Google Scholar 

  8. A. M. Frieze. On the random construction of heaps. Information Processing Letters, 27(2):103–109, February 1988.

    Google Scholar 

  9. G. H. Gonnet. Handbook of Algorithms and Data Structures. Addison-Wesley, Reading, MA., 1984.

    Google Scholar 

  10. G. H. Gonnet and J. I. Munro. Heaps on heaps. SIAM Journal on Computing, 15(4):964–971, November 1986.

    Google Scholar 

  11. A. Hasham and J.-R. Sack. Bounds for min-max heaps. BIT, 27(12):315–323, 1987.

    Google Scholar 

  12. C. J. H. McDiarmid and B. A. Reed. Building Heaps Fast. Technical Report, Oxford University, 1987.

    Google Scholar 

  13. J.-R. Sack and Th. Strothotte. An algorithm for merging heaps. Acta Informatica, 22:171–185, 1985.

    Google Scholar 

  14. Th. Strothotte and J.-R. Sack. Heaps in heaps. Congressus Numerantium, 49:223–235, 1985.

    Google Scholar 

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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Rolf Karlsson Andrzej Lingas

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Draws, L., Eriksson, P., Forslund, E., Höglund, L., Vallner, S., Strothotte, T. (1988). Two new algorithms for constructing min-max heaps. In: Karlsson, R., Lingas, A. (eds) SWAT 88. SWAT 1988. Lecture Notes in Computer Science, vol 318. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19487-8_5

Download citation

  • DOI: https://doi.org/10.1007/3-540-19487-8_5

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-19487-3

  • Online ISBN: 978-3-540-39288-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics