A Complete Worst-Case Analysis of Heapsort with Experimental Verification of Its Results, A manuscript (MS)
Marek A. Suchenek

TL;DR
This paper provides a rigorous, exact formula for the worst-case number of comparisons in Heapsort, along with an algorithm to generate worst-case inputs, verified through experimental implementation.
Contribution
It introduces a precise mathematical formula for Heapsort's worst-case comparisons and an efficient algorithm to generate corresponding input arrays, with experimental verification.
Findings
Exact worst-case comparison count formula for Heapsort.
Algorithm for generating worst-case input arrays in Java.
Experimental verification confirms the theoretical results.
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…
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
TopicsCellular Automata and Applications · graph theory and CDMA systems · DNA and Biological Computing
