8 Jan
2004
8 Jan
'04
1:26 p.m.
Divide the problem into two stages. First, secretly assign numbers to people by drawing sealed numbers from a hat. Second, generate a random derangement; this need not be done secretly. Here is one way to generate derangements with equal probability. Place numbers 2 to n in a hat. Draw a number; it becomes p(1). Put 1 into the hat and withdraw 2 if it is not p(1). Draw a number; it becomes p(2). Replace 2 if it is not p(1), and withdraw 3 if it is not p(1) or p(2). Draw a number; it becomes p(3). And so on. Gene __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus