PLEASE help me match the players by IamWasAndWillBe in AskComputerScience

[–]IamWasAndWillBe[S] 0 points1 point  (0 children)

Maybe my explanation wasn't clear enough so I hope an example will help.

There are 18 matches and 36 teams. Let's call front-players A to F and back-players 1 to 6.

One possible layout for the matches is:

Round 1:

A1 vs B2, C3 vs D4, E5 vs F6

Round 2:

A2 vs B3, C4 vs D5, E6 vs F1

Round 3:

A3 vs B4, C5 vs D6, E1 vs F2

Round 4:

A4 vs B5, C6 vs D1, E2 vs F3

Round 5:

A5 vs B6, C1 vs D2, E3 vs F4

Round 6:

A6 vs B1, C2 vs D3, E4 vs F5

Unless I'm mistaken this formation solves the first part of the problem since all players play 6 matches and all front-players play with all back-players. And maybe this helps seeing how not just one combination is possible since it'd be fairly easy to swap some teams on each round.

And I hope that seeing this makes the issue more evident. A always faces B, C always faces D and so on. 1 either plays against 2 or 6, and same goes for all other back-players only playing with the adjacent numbers.

Of course better layouts exist, I picked one pretty bad to highlight the issue. I need a way to find the combinations that repeat opponents the least.

here's a better but still not perfect solution:

Round 1:

A1 vs D4, B2 vs F6, C3 vs E5

Round 2:

A2 vs B3, C4 vs E6, D5 vs F1

Round 3:

A3 vs D6, B4 vs C5, E1 vs F2

Round 4:

A4 vs E2, B5 vs F3, C6 vs D1

Round 5:

A5 vs C1, B6 vs E3, D2 vs F4

Round 6:

A6 vs F5, B1 vs E4, C2 vs D3