Improved Average Complexity for Comparison-Based Sorting
This paper studies the average complexity on the number of comparisons for sorting algorithms. Its information-theoretic lower bound is \(n \lg n - 1.4427n + O(\log n)\). For many efficient algorithms, the first \(n\lg n\) term is easy to achieve and our focus is on the (negative) constant factor of the linear term. The current best value is \(-1.3999\) for the MergeInsertion sort. Our new value is \(-1.4106\), narrowing the gap by some \(25\%\). An important building block of our algorithm is “two-element insertion,” which inserts two numbers A and B, \(A<B\), into a sorted sequence T. This insertion algorithm is still sufficiently simple for rigorous mathematical analysis and works well for a certain range of the length of T for which the simple binary insertion does not, thus allowing us to take a complementary approach with the binary insertion.
Unable to display preview. Download preview PDF.
- 2.Edelkamp, S., Weiß, A.: QuickXsort: Efficient Sorting with n logn - 1.399n + o(n) Comparisons on Average. In: CSR 2014, pp. 139–152Google Scholar
- 5.Iwama, K., Teruyama, J.: Improved Average Complexity for Comparison-Based Sorting (2017). arXiv:1705.00849
- 13.Steinhaus, H.: Mathematical Snapshots, New Nork, pp. 37–40 (1950)Google Scholar
- 15.Wells, M.: Applications of a language for computing in combinatorics. In: Proc. 1965 IFIP Congress, pp. 497–498. North-Holland, Amsterdam (1966)Google Scholar