QuickXsort - A Fast Sorting Scheme in Theory and Practice

11/03/2018
by   Stefan Edelkamp, et al.
0

QuickXsort is a highly efficient in-place sequential sorting scheme that mixes Hoare's Quicksort algorithm with X, where X can be chosen from a wider range of other known sorting algorithms, like Heapsort, Insertionsort and Mergesort. Its major advantage is that QuickXsort can be in-place even if X is not. In this work we provide general transfer theorems expressing the number of comparisons of QuickXsort in terms of the number of comparisons of X. More specifically, if pivots are chosen as medians of (not too fast) growing size samples, the average number of comparisons of QuickXsort and X differ only by o(n)-terms. For median-of-k pivot selection for some constant k, the difference is a linear term whose coefficient we compute precisely. For instance, median-of-three QuickMergesort uses at most n n - 0.8358n + O( n) comparisons. Furthermore, we examine the possibility of sorting base cases with some other algorithm using even less comparisons. By doing so the average-case number of comparisons can be reduced down to n n- 1.4106n + o(n) for a remaining gap of only 0.0321n comparisons to the known lower bound (while using only O( n) additional space and O(n n) time overall). Implementations of these sorting strategies show that the algorithms challenge well-established library implementations like Musser's Introsort.

READ FULL TEXT

page 1

page 2

page 3

page 4

04/26/2018

QuickMergesort: Practically Efficient Constant-Factor Optimal Sorting

We consider the fundamental problem of internally sorting a sequence of ...
03/15/2018

Pivot Sampling in QuickXSort: Precise Analysis of QuickMergesort and QuickHeapsort

QuickXSort is a strategy to combine Quicksort with another sorting metho...
05/23/2019

On the Average Case of MergeInsertion

MergeInsertion, also known as the Ford-Johnson algorithm, is a sorting a...
10/31/2020

Generalized Sorting with Predictions

Generalized sorting problem, also known as sorting with forbidden compar...
09/28/2020

Engineering In-place (Shared-memory) Sorting Algorithms

We present sorting algorithms that represent the fastest known technique...
12/01/2020

Huskysort

Much of the copious literature on the subject of sorting has concentrate...
04/24/2017

Fast Sorting Algorithms using AVX-512 on Intel Knights Landing

This paper describes fast sorting techniques using the recent AVX-512 in...