Im looking for an algorithm to advance winners from a groups phase to bracket. For example, a tournament with 6 groups (A,B,C,D,E,F) where advance to playoffs top 2 teams each group when round robin stage ends. Brackets must be optimized such that players from same groups meet as late as possible and such higher seeds meet late as well.
The input are the teams classified (top 2 each group): 1A, 2A, 1B, 2B, 1C, 2C, 1D, 2D, 1E, 2E, 1F, 2F. The output should be these matches (in this order):
1A-BYE
2B-2C
1D-BYE
1E-2F
1B-BYE
2A-2D
1C-BYE
1F-2E
The brackets should be:
In the same way, 4 groups where advance top 3 teams, the brackets should be:
Any algorithm suggestions?
Thanks.

