A tight bound on the worst-case number of comparisons for Floyd's heap construction algorithm
Data Structures and Algorithms
2015-03-17 v3 Computational Complexity
Abstract
In this paper a tight bound on the worst-case number of comparisons for Floyd's well known heap construction algorithm, is derived. It is shown that at most 2n-2{\mu}(n)-{\sigma}(n) comparisons are executed in the worst case, where {\mu}(n) is the number of ones and {\sigma}(n) is the number of zeros after the last one in the binary representation of the number of keys n.
Keywords
Cite
@article{arxiv.1012.0956,
title = {A tight bound on the worst-case number of comparisons for Floyd's heap construction algorithm},
author = {Ioannis Paparrizos},
journal= {arXiv preprint arXiv:1012.0956},
year = {2015}
}
Comments
This (full) paper was accepted for publication in the 37th International Conference on Current Trends in Theory and Practice of Computer Science (SOFSEM2011), 22-28 January 2011, Novy Smokovec, Slovakia (9 pages)