A tight bound on the worst-case number of comparisons for Floyd's heap construction algorithm
Ioannis Paparrizos

TL;DR
This paper establishes a precise upper bound on the maximum comparisons needed by Floyd's heap construction algorithm, linking it to the binary representation of the input size.
Contribution
It provides a tight bound on the worst-case comparisons for Floyd's heap construction, expressed in terms of binary representation properties.
Findings
Maximum comparisons are at most 2n - 2μ(n) - σ(n).
The bound is tight and depends on the binary form of n.
The analysis improves understanding of the algorithm's efficiency.
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Biochemical and Structural Characterization · semigroups and automata theory
