I want to distribute 100 people in 10 groups. I must take into account the characteristics of each person, such as gender, country, age (10, 20, 30, ...), etc.
This means that they and such characteristics should be distributed as evenly as possible.
I want to make some listings and figures.
enum class Sex { Female, Male }; enum class Country { America, China, Korea }; enum class Age { Ones, Twos, Threes }; class Person { Sex sex; Country country; Age age; }
For each group, the ratio of each characteristic should be the same with the full ratio.
Is there any useful algorithm?
source share