Abstract
In this paper a tight bound on the worst-case number of comparisons for Floyd’s well-known heap construction algorithm is derived.1 It is shown that at most \(2n - 2\mu (n) - \sigma (n)\) comparisons are executed in the worst case, where μ(n) is the number of ones and σ(n) is the number of zeros after the last one in the binary representation of the number of keys n.
1This paper was also presented at Student Research Forum of SOFSEM’11 [Paparrizos, A tight bound on the worst-case number of comparisons for Floyd’s heap construction algorithm (2011)].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley Series in Computer Science and Information Processing, Addison-Wesley Publishing Company (1974)
Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms, 2nd edn. MIT, Cambridge (2001)
Floyd, R.: Algorithm 245: treesort 3. Comm. ACM 7, 701 (1964)
Goodrich, M.T., Tamassia, R.: Algorithm Design, Foundations, Analysis, and Internet Examples. Wiley, New York (2002)
Knuth, D.: The art of computer programming, vol. 3, 2nd edn. Searching and Sorting. Addison Wesley, Redwood city (1998)
Kruskal, C.P., Weixelbaum, D.: The worst case analysis of heapsort. Technical Report no 018a, Department of Computer Science, New York University (1979)
Paparrizos, I.: A tight bound on the worst-case number of comparisons for Floyd’s heap construction algorithm. In: Proceedings of the 37th International Conference on Current Trends in Theory and Practice of Computer Science (2011)
Schaffer, R.: Analysis of heapsort. Ph.D. Thesis, Department of computer science, Princeton University (1992)
Williams, J.W.J.: Algorithm 232: heapsort. Comm. ACM 6, 347–348 (1964)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer Science+Business Media New York
About this paper
Cite this paper
Paparrizos, I. (2013). A Tight Bound on the Worst-Case Number of Comparisons for Floyd’s Heap Construction Algorithm. In: Migdalas, A., Sifaleras, A., Georgiadis, C., Papathanasiou, J., Stiakakis, E. (eds) Optimization Theory, Decision Making, and Operations Research Applications. Springer Proceedings in Mathematics & Statistics, vol 31. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-5134-1_10
Download citation
DOI: https://doi.org/10.1007/978-1-4614-5134-1_10
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4614-5133-4
Online ISBN: 978-1-4614-5134-1
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)