3 ms·
Can you provide more detail on how this would actually work or somewhere I can read more about this? Like, if there are two people participating and one’s rand
by ajjenkins 4y ago
Can you provide more detail on how this would actually work or somewhere I can read more about this?
Like, if there are two people participating and one’s random number is 01 and the other’s is 11 (binary), and you XOR them you get 10. But that doesn’t match any of the participants’ numbers, so who would win? Or does the number of possible outputs need to exactly match the number of participants? If so, does that mean the number of participants needs to be an exact power of 2?
- dllthomas 4y agoParticipants generating numbers are only helping ensure the result is random. You collectively pick a number, and then use that to select a person from a predetermined(!) list (presumably picking a very large number mod the size of the list to get an index in the list).
- benmmurphy 4y agoYou can also just add all the random numbers chosen between 0 and n-1 and take the result modulo n. So just normal modular arithmetic no xor.