- #1
crabik
- 3
- 0
Homework Statement
I need to create a draw algorithm similar to the UEFA Champions League / Europa League draw.
Example:
I have 32 teams, up to 5 teams can be from the same country.
I need to create:
A) pairs (round robin style), no 2 teams from the same country can meet
B) groups of 4 (8 groups each with 4 teams), each team within a group must be from a different country
Homework Equations
The Attempt at a Solution
1) Calculate all the possible combinations after each step -> too many combinations.
2) Use a simple algorithm to make the draw then discard a solution that doesn't meet the criteria and redo the draw -> it's a dirtty solution.