Hacker News new | ask | show | jobs
by quickthrower2 2551 days ago
If I had to generate a random number I would do this:

As I ask each person I cycle a secret number through 0-9 in my head. (I increment mod 10 after I ask each person)

When I ask I get their answer, I secretly add my secret number modulo 10 (and consider 0 === 10) and record this in secret.

Then record a tally for each number, the one with the most wins.

This assumes the asked people will not know or guess my internal number. So I seed based on the first person's number (OK they know!) but everyone else wont.

Edit: someone came up with a simpler solution: https://news.ycombinator.com/item?id=20315835