QuickHeapsort: Modifications and improved analysis
Abstract
We present a new analysis for QuickHeapsort splitting it into the analysis of the partition-phases and the analysis of the heap-phases. This enables us to consider samples of non-constant size for the pivot selection and leads to better theoretical bounds for the algorithm. Furthermore we introduce some modifications of QuickHeapsort, both in-place and using n extra bits. We show that on every input the expected number of comparisons is n lg n - 0.03n + o(n) (in-place) respectively n lg n -0.997 n+ o (n). Both estimates improve the previously known best results. (It is conjectured in Wegener93 that the in-place algorithm Bottom-Up-Heapsort uses at most n lg n + 0.4 n on average and for Weak-Heapsort which uses n extra-bits the average number of comparisons is at most n lg n -0.42n in EdelkampS02.) Moreover, our non-in-place variant can even compete with index based Heapsort variants (e.g. Rank-Heapsort in WangW07) and Relaxed-Weak-Heapsort (n lg n -0.9 n+ o (n) comparisons in the worst case) for which no O(n)-bound on the number of extra bits is known.
- Publication:
-
arXiv e-prints
- Pub Date:
- September 2012
- DOI:
- 10.48550/arXiv.1209.4214
- arXiv:
- arXiv:1209.4214
- Bibcode:
- 2012arXiv1209.4214D
- Keywords:
-
- Computer Science - Data Structures and Algorithms;
- F.2.2
- E-Print:
- doi:10.1007/978-3-642-38536-0_3