ACM Transactions on Algorithms (TALG)
Bulk-Insertion Sort: Towards Composite Measures of Presortedness
SEA '09 Proceedings of the 8th International Symposium on Experimental Algorithms
Adaptive algorithms for planar convex hull problems
FAW'10 Proceedings of the 4th international conference on Frontiers in algorithmics
Two constant-factor-optimal realizations of adaptive heapsort
IWOCA'11 Proceedings of the 22nd international conference on Combinatorial Algorithms
Hi-index | 0.00 |
We present two algorithms that are near optimal with respect to the number of inversions present in the input. One of the algorithms is a variation of insertion sort, and the other is a variation of merge sort. The number of comparisons performed by our algorithms, on an input sequence of length n that has I inversions, is at most $$n\,{\rm log}_{2} (\frac{I}{n} + 1) + O(n)$$. Moreover, both algorithms have implementations that run in time $$O(n\,{\rm log}_{2} (\frac{I}{n} + 1)\,+\,n)$$. All previously published algorithms require at least $$cn\,{\rm log}_{2} (\frac{I}{n} + 1)$$ comparisons for some c 1.