Abstract

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.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.