4 developers picking a random restaurant (Problem)
lulucid.com
lulucid.com
This doesn't work very well, because the distribution would be very uneven.
There is a high chance (93.75%) that at least one of the developers get an even number, so if you multiply them you will get an even result. Moreover, if some of the developer get a multiple of 4 or two of them get a multiple of 2, then the result is a multiple of 4, so the restaurants with a number that is a multiple of 4 have a much higher probability (but I'm too lazy to do the calculation now).
There is something similar with the restaurant that have an index that is a multiple of 5 (and I'm still lazy). So the restaurant with the number 20 (or 0) has the highest probability of been selected.
As a though experiment, just imagine that you have 20 restaurants and 100 developers. It' almost sure that one of them will get a multiple of 4 and another a multiple of 5, and the multiplication will be a multiple of 20.
The problem is that in the multiplication modulo 20, the numbers 2 (and 4) and 5 are special. If you add the four random numbers instead of multiplying them, the problem is automatically solved.
Github: How do you prove that the first commit was done with the web UI? And how do you prove that there wasn't a force push replacing that commit?
Ex.
- Next article title posted on NYT
- Donald Trumps next tweet
- Sum of tomorrow's lottery numbers, mod 20