Priority Queues, Pairing, and Adaptive Sorting

We introduce Binomialsort, an adaptive sorting algorithm that is optimal with respect to the number of inversions. The number of comparisons performed by Binomialsort, on an input sequence of length n that has I inversions, is at most 2n log I/n + O(n). The bound on the number of comparisons is further reduced to 1.89n log I/n + O(n) by using a new structure, which we call trinomial queues. The fact that the algorithm is simple and relies on fairly simple structures makes it a good candidate in practice.

[1]  Jean Vuillemin,et al.  A data structure for manipulating priority queues , 1978, CACM.

[2]  Robert E. Tarjan,et al.  Design and Analysis of a Data Structure for Representing Sorted Lists , 1978, SIAM J. Comput..

[3]  Kurt Mehlhorn Sorting Presorted Files , 1979, Theoretical Computer Science.

[4]  Donald E. Knuth,et al.  The Art of Computer Programming: Volume 3: Sorting and Searching , 1998 .

[5]  Leonidas J. Guibas,et al.  A new representation for linear lists , 1977, STOC '77.

[6]  Christos Levcopoulos,et al.  Exploiting Few Inversions When Sorting: Sequential and Parallel Algorithms , 1996, Theor. Comput. Sci..

[7]  Richard Cole,et al.  On the dynamic finger conjecture for splay trees , 1990, STOC '90.

[8]  Mark R. Brown,et al.  Implementation and Analysis of Binomial Queue Algorithms , 1978, SIAM J. Comput..

[9]  Richard Cole,et al.  On the Dynamic Finger Conjecture for Splay Trees. Part II: The Proof , 2000, SIAM J. Comput..

[10]  Christos Levcopoulos,et al.  Splitsort - An Adaptive Sorting Algorithm , 1990, Inf. Process. Lett..

[11]  Derick Wood,et al.  A survey of adaptive sorting algorithms , 1992, CSUR.

[12]  Donald E. Knuth,et al.  The art of computer programming, volume 3: (2nd ed.) sorting and searching , 1998 .

[13]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[14]  Christos Levcopoulos,et al.  Adaptive Heapsort , 1993, J. Algorithms.

[15]  Alfred V. Aho,et al.  Data Structures and Algorithms , 1983 .

[16]  Robert E. Tarjan,et al.  Self-adjusting binary search trees , 1985, JACM.

[17]  Alistair Moffat,et al.  Splaysort: fast, versatile, practical , 1996 .

[18]  Alistair Moffat,et al.  A Tree-based Mergesort , 1998, Acta Informatica.

[19]  Donald E. Knuth,et al.  Sorting and Searching , 1973 .

[20]  Heikki Mannila,et al.  Measures of Presortedness and Optimal Sorting Algorithms , 1985, IEEE Transactions on Computers.