Would it be possible to design an algorithm for pseudo-randomly sorting accounts into groups, by using the maximum number of accounts on Ethereum, the max value of a 256-bit number, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,
then treat the hash of an account as a large random number.
Something similar to the algorithm
userGroup[msg.sender] = uint(userHash[msg.sender]) / (uint(maxHash) / numGroups()) + 1;
g is group index, n is account hash, k is 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, p is number of groups.
g = n / (k / p) + 1
How large does the quantity of n have to be for a similar algorithm to work ? What is the lower-bound for quantity of n when it becomes unusable ?
What would be an example of a similar algorithm ?