Elementary Yet Precise Worst-Case Analysis of Floyd's Heap-Construction Program

Elementary Yet Precise Worst-Case Analysis of Floyd's Heap-Construction Program The worst-case behavior of the heap-construction phase of Heapsort escaped mathematically precise characterization by a closed-form formula for almost five decades. This paper offers a proof that the exact number of comparisons of keys performed in the worst case during construction of a heap of size N is: 2N − 2s 2 (N) − e 2 (N), where s 2 (N) is the sum of all digits of the binary representation of N and e 2 (N) is the exponent of 2 in the prime factorization of N. It allows for derivation of this best-known upper bound on the number of comparisons of Heapsort: (2N − 1)$\lceil$lgN$\rceil$ − 2 $\lceil$lgN$\rceil$+1 − 2s 2 (N) − e 2 (N) + 5. http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Fundamenta Informaticae IOS Press

Elementary Yet Precise Worst-Case Analysis of Floyd's Heap-Construction Program

Loading next page...
 
/lp/ios-press/elementary-yet-precise-worst-case-analysis-of-floyd-s-heap-50NW30HMxU
Publisher
IOS Press
Copyright
Copyright © 2012 by IOS Press, Inc
ISSN
0169-2968
eISSN
1875-8681
D.O.I.
10.3233/FI-2012-751
Publisher site
See Article on Publisher Site

Abstract

The worst-case behavior of the heap-construction phase of Heapsort escaped mathematically precise characterization by a closed-form formula for almost five decades. This paper offers a proof that the exact number of comparisons of keys performed in the worst case during construction of a heap of size N is: 2N − 2s 2 (N) − e 2 (N), where s 2 (N) is the sum of all digits of the binary representation of N and e 2 (N) is the exponent of 2 in the prime factorization of N. It allows for derivation of this best-known upper bound on the number of comparisons of Heapsort: (2N − 1)$\lceil$lgN$\rceil$ − 2 $\lceil$lgN$\rceil$+1 − 2s 2 (N) − e 2 (N) + 5.

Journal

Fundamenta InformaticaeIOS Press

Published: Jan 1, 2012

There are no references for this article.

You’re reading a free preview. Subscribe to read the entire article.


DeepDyve is your
personal research library

It’s your single place to instantly
discover and read the research
that matters to you.

Enjoy affordable access to
over 18 million articles from more than
15,000 peer-reviewed journals.

All for just $49/month

Explore the DeepDyve Library

Search

Query the DeepDyve database, plus search all of PubMed and Google Scholar seamlessly

Organize

Save any article or search result from DeepDyve, PubMed, and Google Scholar... all in one place.

Access

Get unlimited, online access to over 18 million full-text articles from more than 15,000 scientific journals.

Your journals are on DeepDyve

Read from thousands of the leading scholarly journals from SpringerNature, Elsevier, Wiley-Blackwell, Oxford University Press and more.

All the latest content is available, no embargo periods.

See the journals in your area

DeepDyve

Freelancer

DeepDyve

Pro

Price

FREE

$49/month
$360/year

Save searches from
Google Scholar,
PubMed

Create lists to
organize your research

Export lists, citations

Read DeepDyve articles

Abstract access only

Unlimited access to over
18 million full-text articles

Print

20 pages / month

PDF Discount

20% off