in reply to Re^8: How to generate different random numbers?
in thread How to generate distinct random numbers?

This works in theory. I think that it would become pretty unwieldy in practice though. Given a permutation of a set (let's say {5 1 3 2 4}), which permutation is that of {1 2 3 4 5}? The fourteenth or the forty-second? Wouldn't you have to pre-compute and store all of the permutations for this to work?

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

  • Comment on Re^9: How to generate different random numbers?

Replies are listed 'Best First'.
Re^10: How to generate different random numbers?
by Pragma (Scribe) on Sep 08, 2004 at 22:14 UTC
    Yes, in practice, it would be absurd. I never claimed that this would be a good way to generate random numbers. I was merely responding to the misguided belief that a random shuffle was somehow any less random than a random selection from a finite set. It is not, and the theoretical ability to generate random numbers from a shuffle is what proves the point. QED, etc etc.