Summary
The average behavior of the familiar algorithm for root deletion is considered, when every heap has the same probability to occur. The analysis centers around the notion of a viable path in the tree representation, i.e. such a path the label which replaces the label of the root may be allowed to travel when the heap is reconstructed. In case the size of the heap is a power of 2 it is shown that both the expected number of comparisons and of interchanges are asymptotically equal to the respective numbers in the worst case.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Reading: Addison-Wesley, MA 1974
Bailey, W.N.: Generalized Hypergeometric Series. Cambridge: University Press 1935
Bender, E.A.: Asymptotic Methods in Enumeration. SIAM Review 16 (1974) 485–515
Doberkat, E.E.: Some Observations on the Average Performance of Heapsort — Preliminary Report. 21st IEEE FOCS, Syracuse, N.Y. 1980, 229–237
Doberkat, E.E.: Inserting a New Element into a Heap. BIT 21 (1981) 255–269
Doberkat, E.E.: Continuous Models that are Equivalent to Randomness for the Analysis of Many Sorting Algorithms. Preprint 1981, submitted for publication
Habermann, A.N.: Introduction to Operating System Design. Chicago: Science Research Associates 1976
Hansen, E.R.: A Table of Series and Products. Prentice-Hall: Englewood Cliffs 1975
Knuth, D.E.: The Art of Computer Programming — Vol. 3, Sorting and Searching. Reading: Addison-Wesley, MA 1973
Rudin, W.: Real and Complex Analysis. New Delhi: Tata McGraw Hill 1974 (second edition)
Whittaker, E.T., Watson, G.N.: A Course of Modern Analysis (Fourth Edition). Cambridge: University Press 1927
Author information
Authors and Affiliations
Additional information
Some of this work was done at the Fernuniversität, Hagen, West Germany
Rights and permissions
About this article
Cite this article
Doberkat, E.E. Deleting the root of a heap. Acta Informatica 17, 245–265 (1982). https://doi.org/10.1007/BF00264353
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00264353