Creating a league schedule for camp I searched around for similar questions, but none seem to fit this. I am making a league schedule for camp and I want that each team will play every other team approximately the same number of times (regular round robin schedule), but additionally I have the extra factor that each team should play each sport around the same number of times (such as Basketball, Baseball, Hockey, Soccer, Football etc.).
For example: Let's say there are 8 teams and 5 sports. If we make each team play three times, then there are 21 rounds and each team would play each sport approximately 4 times
 A: I searched online and it is not a single solution for any number of teams.
If n is even, and is a member of the infinite series 8,14,20,26,32,... [n=6i +2: i>=1] or a member of the series 6,12,18,24,30,36,... [n=6i : i>=1] then there is a simple modification to the cyclic algorithm that can give the necessary court balance. More details can be found at this website - http://www.devenezia.com/round-robin/forum/YaBB.pl?num=1138355997.
According to that website, there also exists schedules for the infinite series n=10,16,22,28,34,... [n=6i +4 : i>=1], but it is much harder and the algorithm can be found in this book https://www.bookdepository.com/Combinatorial-Designs-Tournaments-Ian-Anderson/9780198500292.
For some numbers, such as 4, it is not possible.
A: Maybe there's some elegant combinatorial solution to this problem, but you could also take the constraint optimization approach. Meaning, write up a cost function which for any given schedule returns the magnitude of the imperfections in it, and try to minimize that cost. For the minimization, I'd recommend simulated annealing (https://en.m.wikipedia.org/wiki/Simulated_annealing).
