This is Algorithm 235, Random Permutation, from the Collected Algorithms of the ACM, Vol. II, 2 Jan 1964.
It is Richard Durstenfeld's Algol implementation of a random permutation generator. The running time is O(n) for a permutation of size n and uses no extra memory. It is the first (and only?) optimal random permutation generator.
Contrary to folklore, this was a new algorithm and not merely a computer version of the Fisher-Yates method, 1938.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
366 views
Durstenfeld - Random Permutation Algorithm
This is Algorithm 235, Random Permutation, from the Collected Algorithms of the ACM, Vol. II, 2 Jan 1964.
It is Richard Durstenfeld's Algol implementation of a random permutation generator. The running time is O(n) for a permutation of size n and uses no extra memory. It is the first (and only?) optimal random permutation generator.
Contrary to folklore, this was a new algorithm and not merely a computer version of the Fisher-Yates method, 1938.