I am looking for an algorithm which can determine a schedule of games to be played given the following parameters.
- There are 12 teams in the league
- There are 4 venues
- Every Wednesday for 11 weeks, each team plays 2 other teams at one of the specified venues; thus each team will play 22 matches in the season
- Every team must play every other team exactly twice throughout the season
Essentially, you just need to group the teams in blocks of 3 each week such that they only appear in the same group as another team twice in the season.
Here would be an example of the first couple weeks:
Week 1: Venue A: 1,2,3; Venue B: 4,5,6; Venue C: 7,8,9; Venue D: 10, 11, 12
Week 2: Venue A: 1,5,9; Venue B: 2,6,10; Venue C: 3,7,11; Venue D: 4, 8, 12
.
.
.
Week 11: ?
Testing all the combinations is obviously not feasible. Any help would be greatly appreciated.