UnipickerDraw Whitepaper
Algorithms · LESSON 4

Reject unfair numbers

Weighted interval drawMass-entrant draw

How do you fairly pick from 5 friends with a die (1–6)? A 6 does not divide by 5, so it is an unfair number. When that happens, drop it and roll again.

Concept

Picking 5 with a 1–6 die?

Set the winning number from the die value's remainder mod 5. (This example does not add 1 to the remainder — the remainder itself is the winning number, and assumes a remainder of 0 makes No. 5 the winning number.)

Dice÷ 5Remainder→ winner
1Quotient 01No. 1
2Quotient 02No. 2
3Quotient 03No. 3
4Quotient 04No. 4
5Quotient 10No. 5
6Quotient 11No. 1 (again!)
A die goes up to 6 but there are 5 people. So a 6 points to No. 1 again → only No. 1 gets a double chance, which is unfair. So reject the 6 and roll again. (Remainder 0 is the last, No. 5.)
Experiment

Real draw simulation — roll it yourself

"Fair" rejects a 6 and rerolls. "Unfair" keeps the 6 as is. Roll many times and compare the bar heights.

1Choose what to do when a 6 comes up
2Roll the dice many times and check the results
Fair mode rejects the unfair number (6) and rerolls, so the bars stay even. Unfair mode gives the 6 to No. 1 too, so only No. 1 grows taller.
menu_bookReferences · Rejection sampling (discarding unfair numbers)
  1. von Neumann, J. (1951). Various Techniques Used in Connection with Random Digits. National Bureau of Standards, Applied Mathematics Series, 12, 36–38.
  2. Lemire, D. (2019). Fast Random Integer Generation in an Interval. ACM Transactions on Modeling and Computer Simulation, 29(1), Article 3.