1. Get 10 random numbers between 0 and 1 using the rand function

2. sort them in decreasing (or increasing) order

3. assign to each number its rank

4. replace in the original list, the random numbers by their ranks

Now you have a random permutation, where every permutation is equally likely.

## Thursday, October 16, 2008

### random permutations

Posted by bharath at Thursday, October 16, 2008

Subscribe to:
Post Comments (Atom)

## No comments:

Post a Comment