I have a game which can be played by groups of users competing with each other. The number of such groups is very small, under 10. The number of players is thousands.
When a user buys a ticket, a group is assigned to him. Currently, assigning a group to a player is randomly done, but this can lead to cases with a lot of players in a group and very few in others.
The problem I'm stuck with is how to assign group numbers such that the groups have comparable sizes.