Von Fugal wrote:

Hey, excluding already generated numbers is *not* random, and it flies
in the face of the multiple prizes for Fugals tradition!

Von Fugal


Well, technically you can still call it random but the problem definition has changed. It's called random selection without replacement. But there's no need to get complicated - just skip duplicates by generating the next random number by hand. You can tell when a duplicate comes up by the groans of all but one person, who has a big grin.

Think of it as drawing cards from a deck. You can do that randomly but you'll never draw the ace of clubs more than once unless you put it back into the deck after drawing it the first time.

--
Hans Fugal ; http://hans.fugal.net

There's nothing remarkable about it. All one has to do is hit the
right keys at the right time and the instrument plays itself.
    -- Johann Sebastian Bach

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to