uniform pseudo random number generation

Alan Barrett apb at cequrux.com
Wed Feb 20 11:29:19 PST 2008


On Tue, 19 Feb 2008, Sarad AV wrote:
> i would like to use a Pseudo Random Number Generator,
> that generates 32 different permutations of numbers
> between [0-360]. In each permutation all numbers
> 0<=x<360 should appear exactly once.

This equivelent to shuffling a deck of 361 cards.  Wikipedia has a good
article: http://en.wikipedia.org/wiki/Fisher-Yates_shuffle

--apb (Alan Barrett)





More information about the cypherpunks-legacy mailing list