I have 8 teams (1-8) playing a school sports day consisting of 3 sports (A,B,C) in 12 periods (each sport played during each period). Each team needs to play each sport 3 times without playing the same team twice in the same sport. Any ideas on a solution to this. I can also do 6 or 7 teams if required to come up with a solution that works.
You can do
12 | 23 | 34 | 45 | 56 | 67 | 78 | 81 | 24 | 57 | 83 | 16
34 | 45 | 56 | 67 | 78 | 81 | 24 | 57 | 83 | 16 | 12 | 23
56 | 16 | 18 | 23 | 34 | 24 | 15 | 36 | 57 | 82 | 74 | 87
Rather than randomly putting numbers together, I just started pairing them up from left to right and then after I got to 8 on the first row I started over, but skipping some numbers to not make duplicate pairs. On the second row I started where the first column left off and did the same thing. On the last row I started off the same, but after I reached the third column, I had to compare the column and row I was in. I started trying to use all of the lowest numbers first that weren't used up yet, but ended up having to switch out some of them with higher numbers to make sure the ones at the end fit correctly.