A Complete Worst-Case Analysis of Heapsort with Experimental Verification of Its Results, A manuscript (MS)
Data Structures and Algorithms
2017-03-07 v1 Computational Complexity
Discrete Mathematics
Abstract
A rigorous proof is presented that the number of comparisons of keys performed in the worst case by on any array of size is equal to: where , given by: is a function of with the minimum value 0 and and the supremum value , is the sum of all digits of the binary representation of , is the exponent of in the prime factorization of , and is a binary function on the set of integers defined by: , if , and , otherwise. An algorithm that generates worst-case input arrays of any size for is offered. The algorithm has been implemented in Java, runs in time, and allows for precise experimental verification of the above formula.
Keywords
Cite
@article{arxiv.1504.01459,
title = {A Complete Worst-Case Analysis of Heapsort with Experimental Verification of Its Results, A manuscript (MS)},
author = {Marek A. Suchenek},
journal= {arXiv preprint arXiv:1504.01459},
year = {2017}
}
Comments
115 pages 41 figures