Abstract

We consider the classical problem of generating random permutations with the uniform distribution. That is, we require that for an arbitrary permutation π of n elements, with probability 1/n! the machine halts with the ith output cell containing π(i), for 1≤i≤n. We study this problem on two models of parallel computations: the CREW PRAM and the EREW PRAM.The main result of the paper is an algorithm for generating random permutations that runs in O(log log n) time and uses O(n 1+o(1)) processors on the CREW PRAM. This is the first o(log n)-time CREW PRAM algorithm for this problem.On the EREW PRAM we present a simple algorithm that generates a random permutation in time O(log n) using n processors and O(n) space. This algorithm matches the running time and the number of processors used of the best previously known algorithms for the CREW PRAM, and performs better as far as the memory usage is considered.The common and novel feature of both our algorithms is to design first a suitable random network generating a permutation and then to simulate this network on the PRAM model in a fast way.KeywordsPerfect MatchOutput NodeRandom PermutationInput NodeRecursive CallThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

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.