Sorting in Linear Time?

We show that a unit-cost RAM with a word length ofwbits can sortnintegers in the range 0?2w?1 inO(nloglogn) time for arbitraryw?logn, a significant improvement over the bound ofO(nlogn) achieved by the fusion trees of Fredman and Willard. Provided thatw?(logn)2+?for some fixed?>0, the sorting can even be accomplished in linear expected time with a randomized algorithm. Both of our algorithms parallelize without loss on a unit-cost PRAM with a word length ofwbits. The first one yields an algorithm that usesO(logn) time andO(nloglogn) operations on a deterministic CRCW PRAM. The second one yields an algorithm that usesO(logn) expected time andO(n) expected operations on a randomized EREW PRAM, provided thatw?(logn)2+?for some fixed?>0. Our deterministic and randomized sequential and parallel algorithms generalize to the lexicographic sorting of multiple-precision integers represented in several words.

[1]  Gary L. Miller,et al.  Deterministic Parallel List Ranking , 1988, AWOC.

[2]  Nicholas Pippenger Communication Networks , 1932, Nature.

[3]  Donald E. Knuth,et al.  The Art of Computer Programming, Vol. 3: Sorting and Searching , 1974 .

[4]  David G. Kirkpatrick,et al.  Upper Bounds for Sorting Integers on Random Access Machines , 1984, Theor. Comput. Sci..

[5]  Jan van Leeuwen,et al.  Handbook of Theoretical Computer Science, Vol. A: Algorithms and Complexity , 1994 .

[6]  Zvi Galil,et al.  Explicit Constructions of Linear-Sized Superconcentrators , 1981, J. Comput. Syst. Sci..

[7]  Alexandru Nicolau,et al.  Adaptive Bitonic Sorting: An Optimal Parallel Algorithm for Shared-Memory Machines , 1989, SIAM J. Comput..

[8]  Donald J. Patterson,et al.  Computer organization and design: the hardware-software interface (appendix a , 1993 .

[9]  Richard Cole,et al.  Parallel merge sort , 1988, 27th Annual Symposium on Foundations of Computer Science (sfcs 1986).

[10]  Richard Cole,et al.  Deterministic Coin Tossing with Applications to Optimal Parallel List Ranking , 2018, Inf. Control..

[11]  Robert E. Tarjan,et al.  Three Partition Refinement Algorithms , 1987, SIAM J. Comput..

[12]  Torben Hagerup,et al.  A Guided Tour of Chernoff Bounds , 1990, Inf. Process. Lett..

[13]  Larry Carter,et al.  Universal Classes of Hash Functions , 1979, J. Comput. Syst. Sci..

[14]  Martti Penttonen,et al.  A Reliable Randomized Algorithm for the Closest-Pair Problem , 1997, J. Algorithms.

[15]  Torben Hagerup,et al.  Optimal Merging and Sorting on the Erew Pram , 1989, Inf. Process. Lett..

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

[17]  Yijie Han,et al.  : Parallel Algorithms for Bucket Sorting and the Data Dependent Prefix Problem , 1986, ICPP.

[18]  Krzysztof Diks,et al.  Improved Deterministic Parallel Integer Sorting , 1991, Inf. Comput..

[19]  Arne Andersson,et al.  A new efficient radix sort , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[20]  Richard Cole,et al.  Approximate Parallel Scheduling. Part I: The Basic Technique with Applications to Optimal Parallel List Ranking in Logarithmic Time , 1988, SIAM J. Comput..

[21]  Clyde P. Kruskal,et al.  Searching, Merging, and Sorting in Parallel Computation , 1983, IEEE Transactions on Computers.

[22]  Robert E. Tarjan,et al.  An Efficient Parallel Biconnectivity Algorithm , 2011, SIAM J. Comput..

[23]  Mikkel Thorup,et al.  Faster deterministic sorting and priority queues in linear space , 1998, SODA '98.

[24]  F. Leighton,et al.  Introduction to Parallel Algorithms and Architectures: Arrays, Trees, Hypercubes , 1991 .

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

[26]  Hong Shen,et al.  Improved Nonconservative Sequential and Parallel Integer Sorting , 1990, Inf. Process. Lett..

[27]  Arne Andersson Faster deterministic sorting and searching in linear space , 1996, Proceedings of 37th Conference on Foundations of Computer Science.

[28]  Ronald L. Rivest,et al.  Expected time bounds for selection , 1975, Commun. ACM.

[29]  Rajeev Raman,et al.  Priority Queues: Small, Monotone and Trans-dichotomous , 1996, ESA.

[30]  Robert E. Tarjan,et al.  Scaling and related techniques for geometry problems , 1984, STOC '84.

[31]  Torben Hagerup Optimal parallel string algorithms: sorting, merging and computing the minimum , 1994, STOC '94.

[32]  Torben Hagerup,et al.  Fast and reliable parallel hashing , 1991, SPAA '91.