4 ms·
I don't think your math is right there. You can check that by plugging in the values of a much simpler lottery. Imagine a lottery where instead of 2^256 there
by aakilfernandes 11y ago
I don't think your math is right there. You can check that by plugging in the values of a much simpler lottery.
Imagine a lottery where instead of 2^256 there are only 100 possible outcomes and there are 3 players.
The odds are 34/100, 33/100, and 33/100 respectively. The bias is around 1/33.
But if I plug that scenario into your equation, I get:
2/(4+100%3) - (1/3) which is 2/5-1/3 which is 1/15.
- doomrobo 11y agoMy apologies. Yes that's correct. My mistake was reducing the set of choices to n + (|H| mod n). Your worst-case estimate of a total bias of n/|H| seems to be correct. I guess the question now becomes whether that bias is acceptable for the purpose of the lottery (I would say probably yes). Thanks for sticking with this thread :)