On Adaptive Integer Sorting

This paper considers integer sorting on a RAM. We show that adaptive sorting of a sequence with qn inversions is asymptotically equivalent to multisorting groups of at most q keys, and a total of n keys. Using the recent \(O(n\sqrt{\log\log n})\) expected time sorting of Han and Thorup on each set, we immediately get an adaptive expected sorting time of \(O(n\sqrt{\log\log q})\). Interestingly, for any positive constant e, we show that multisorting and adaptive inversion sorting can be performed in linear time if \(q\leq 2^{(\log n)^{1-\varepsilon}}\). We also show how to asymptotically improve the running time of any traditional sorting algorithm on a class of inputs much broader than those with few inversions.

[1]  Yijie Han Deterministic sorting in O(nlog log n) time and linear space , 2002, STOC '02.

[2]  Kurt Mehlhorn,et al.  Data Structures and Algorithms 1: Sorting and Searching , 2011, EATCS Monographs on Theoretical Computer Science.

[3]  M. Thorup,et al.  Integer Sorting in Expected Time and Linear Space , 2002 .

[4]  Rajeev Raman,et al.  Sorting in Linear Time? , 1998, J. Comput. Syst. Sci..

[5]  Faith Ellen,et al.  Optimal bounds for the predecessor problem , 1999, STOC '99.

[6]  Gerth Stølting Brodal,et al.  Funnel Heap - A Cache Oblivious Priority Queue , 2002, ISAAC.

[7]  Yijie Han,et al.  Integer sorting in O(n/spl radic/(log log n)) expected time and linear space , 2002, The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002. Proceedings..

[8]  Susanne Albers,et al.  Improved parallel integer sorting without concurrent writing , 1992, SODA '92.

[9]  Prof. Dr. Kurt Mehlhorn,et al.  Data Structures and Algorithms 1 , 1984, EATCS.

[10]  Michael L. Fredman,et al.  Surpassing the Information Theoretic Bound with Fusion Trees , 1993, J. Comput. Syst. Sci..

[11]  Michael L. Fredman,et al.  Trans-Dichotomous Algorithms for Minimum Spanning Trees and Shortest Paths , 1994, J. Comput. Syst. Sci..

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

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

[14]  Mikkel Thorup,et al.  Tight(er) worst-case bounds on dynamic searching and priority queues , 2000, STOC '00.