Dual-Pivot Quicksort: Optimality, Analysis and Zeros of Associated Lattice Paths

We present an average case analysis of a variant of dual-pivot quicksort. We show that the used algorithmic partitioning strategy is optimal, i.e., it minimizes the expected number of key comparisons. For the analysis, we calculate the expected number of comparisons exactly as well as asymptotically, in particular, we provide exact expressions for the linear, logarithmic, and constant terms. An essential step is the analysis of zeros of lattice paths in a certain probability model. Along the way a combinatorial identity is proven.

[1]  Pascal Hennequin Analyse en moyenne d'algorithmes, tri rapide et arbres de recherche , 1991 .

[2]  Markus E. Nebel,et al.  Analysis of Pivot Sampling in Dual-Pivot Quicksort: A Holistic Analysis of Yaroslavskiy’s Partitioning Scheme , 2014, Algorithmica.

[3]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[4]  S. G. Mohanty,et al.  Lattice Path Counting and Applications. , 1980 .

[5]  Martin Dietzfelbinger,et al.  How Good Is Multi-Pivot Quicksort? , 2015, ACM Trans. Algorithms.

[6]  Sebastian Wild,et al.  Dual-Pivot Quicksort and Beyond: Analysis of Multiway Partitioning and Its Practical Potential , 2016 .

[7]  P. Brändén Unimodality, log-concavity, real-rootedness and beyond , 2015 .

[8]  Philippe Flajolet,et al.  Analytic Combinatorics , 2009 .

[9]  Sebastian Wild,et al.  Java 7's Dual-Pivot Quicksort , 2014 .

[10]  Helmut Prodinger,et al.  Counting Zeros in Random Walks on the Integers and Analysis of Optimal Dual-Pivot Quicksort , 2016, ArXiv.

[11]  Donald E. Knuth,et al.  The art of computer programming: sorting and searching (volume 3) , 1973 .

[12]  C. Krattenthaler Lattice Path Enumeration , 2015, 1503.05930.

[13]  N. J. A. Sloane,et al.  The On-Line Encyclopedia of Integer Sequences , 2003, Electron. J. Comb..

[14]  P. Flajolet,et al.  Analytic Combinatorics: RANDOM STRUCTURES , 2009 .

[15]  Ronald L. Graham,et al.  Concrete mathematics - a foundation for computer science , 1991 .

[16]  Sebastian Wild,et al.  Average Case and Distributional Analysis of Dual-Pivot Quicksort , 2013, ACM Trans. Algorithms.

[17]  Carsten Schneider,et al.  Séminaire Lotharingien de Combinatoire 56 (2007), Article B56b SYMBOLIC SUMMATION ASSISTS COMBINATORICS , 2022 .

[18]  Martin Dietzfelbinger,et al.  Optimal Partitioning for Dual-Pivot Quicksort , 2013, ACM Trans. Algorithms.