MergeShuffle: A Very Fast, Parallel Random Permutation Algorithm

August 13, 2015 ยท Entered Twilight ยท ๐Ÿ› International Conference on Random and Exhaustive Generation of Combinatorial Structures

๐ŸŒ… TWILIGHT: Old Age
Predates the code-sharing era โ€” a pioneer of its time

"Last commit was 10.0 years ago (โ‰ฅ5 year threshold)"

Evidence collected by the PWNC Scanner

Repo contents: README.md, compile, fisher_yates.c, merge.c, merge.s, merge_omp.c, merge_vec.c, permutation.c, permutation_alea.c, permutation_time.c, random.c, split.c, split_par.c, split_seq.c, split_vec.c

Authors Axel Bacher, Olivier Bodini, Alexandros Hollender, Jรฉrรฉmie Lumbroso arXiv ID 1508.03167 Category cs.DS: Data Structures & Algorithms Cross-listed cs.DM Citations 23 Venue International Conference on Random and Exhaustive Generation of Combinatorial Structures Repository https://github.com/axel-bacher/mergeshuffle โญ 49 Last Checked 1 month ago
Abstract
This article introduces an algorithm, MergeShuffle, which is an extremely efficient algorithm to generate random permutations (or to randomly permute an existing array). It is easy to implement, runs in $n\log_2 n + O(1)$ time, is in-place, uses $n\log_2 n + ฮ˜(n)$ random bits, and can be parallelized accross any number of processes, in a shared-memory PRAM model. Finally, our preliminary simulations using OpenMP suggest it is more efficient than the Rao-Sandelius algorithm, one of the fastest existing random permutation algorithms. We also show how it is possible to further reduce the number of random bits consumed, by introducing a second algorithm BalancedShuffle, a variant of the Rao-Sandelius algorithm which is more conservative in the way it recursively partitions arrays to be shuffled. While this algorithm is of lesser practical interest, we believe it may be of theoretical value. Our full code is available at: https://github.com/axel-bacher/mergeshuffle
Community shame:
Not yet rated
Community Contributions

Found the code? Know the venue? Think something is wrong? Let us know!

๐Ÿ“œ Similar Papers

In the same crypt โ€” Data Structures & Algorithms