# how to create a schedule for 9 teams playing x number of games no team can play same team twice no team can play same game twice

I am setting up a minute to win it challenge for a party. I have 9 teams of 5 players each. Each round will be head to head challenge with one team idle per round. All games are played simultaneously. there will be stations set up with a different game at each station. Teams will rotate through each station/game. Rules: no team will play the other team twice, no team will play the same game twice How many games do I need to do this? How do I determine the schedule per round?

I am not a mathematics person so simpler answers or equations would be appreciated. Some of the answers I have read are over my head or are displaying complete graphs which I cannot interpret.

• Do you need every pair of teams to play each other at one point? Also, is the fact that each team has five players relevant at all? – Mike Earnest Apr 2 at 18:00
• yes ideally each team would play each of the other 8 teams once. 5 players per team is likely not relevant for figuring out this problem. There are 45 people playing in total so I just evenly divided them into 9 teams of 5. – Bellacat Apr 2 at 18:33

Here is a $$9$$ game schedule. At least $$8$$ games are required, because each team will have to play eight rounds, but I have been unable to find an $$8$$ game schedule. I generated the algorithm using this program, which you can run here.

        │ Game 1 │ Game 2 │ Game 3 │ Game 4 │ Game 5 │ Game 6 │ Game 7 │ Game 8 │ Game 9
────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────
Round 0 │        │        │        │ (4, 7) │        │ (3, 8) │ (2, 9) │ (5, 6) │
Round 1 │ (6, 7) │ (5, 8) │        │        │ (4, 9) │        │        │        │ (1, 3)
Round 2 │ (2, 4) │        │ (1, 5) │ (6, 9) │ (7, 8) │        │        │        │
Round 3 │        │        │        │ (3, 5) │        │ (2, 6) │        │ (1, 7) │ (8, 9)
Round 4 │        │        │        │        │        │ (1, 9) │ (3, 7) │ (2, 8) │ (4, 6)
Round 5 │        │ (3, 9) │ (4, 8) │ (1, 2) │        │ (5, 7) │        │        │
Round 6 │ (5, 9) │ (1, 4) │        │        │ (2, 3) │        │ (6, 8) │        │
Round 7 │        │        │ (7, 9) │        │ (1, 6) │        │        │ (3, 4) │ (2, 5)
Round 8 │ (1, 8) │ (2, 7) │ (3, 6) │        │        │        │ (4, 5) │        │


### The Details

Scheduling which teams play who is easy: arrange the nine teams in a circle, and group the $$36$$ pairs of teams based on the slope of the line connecting them. In each round, four pairs with a common slope will play each other. Everyone plays everyone over the course of nine rounds, corresponding to the $$9$$ possible slopes.

The hard part is assigning games to pairs of teams so that no team plays a game twice, and no two games are needed by different pairs of teams in the same round. Scheduling this with the fewest number of games is equivalent to coloring a certain graph with the fewest number of colors, which my code tries to do by brute force. I settled on $$9$$ colors after the code program ran for too long with $$8$$ colors.

• this will work thank you – Bellacat Apr 2 at 22:31
• @Bellacat You're welcome. If an answer is helpful, it is recommended and polite to click the green check mark next to it (you can change this if a better answer comes along later). – Mike Earnest Apr 2 at 22:34
• It's $1$am so this might be buggy reasoning... If you could do this with $8$ games, then each team would have played each game exactly once, but there are $9$ teams which is an odd number, and it takes two to tango, so that improves it's impossible, right? – antkam Apr 4 at 5:23
• @antkam Yes, good proof! Thank you, that had been bugging me! – Mike Earnest Apr 4 at 15:00
• i had so much trust in you that i thought my $1$am reasoning must be buggy somehow. :D anyway the question of even no. of teams is now bugging me. $n=4$ is impossible by exhaustive search, but what about others? i feel the rounds and the games are (almost? exactly?) the same constraints, so it almost seems finding two solutions which are "orthogonal" in a sense. it reminds me vaguely of several other problems but the exact connection is escaping me... – antkam Apr 4 at 16:05