Random number challenge

Hans Fugal hans at fugal.net
Sat Jun 14 09:04:55 MDT 2008

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

More information about the PLUG mailing list