views:

400

answers:

3

I've got a weird problem to solve - this is to be used in designing a quiz, but it's easiest to explain using teams.

There's 16 teams. There's 24 matches. 4 teams play in every match. Each team has to appear once against 12/16 teams and twice against the remaining 3/16, and has to appear exactly 6 times. Any ideas on how to do this? If there's a software that can do this, that'd be great as well.

UPDATE: I'm not sure if the above is even possible. Here is the minimum we're trying to accomplish:

  • Number of games is not set.
  • Each Game has 4 teams.
  • Each team gets an equal number of games.

-Is this possible?

A: 

Pull out your combinatorics book. I remember these questions as in that scope.

Haven't taken it yet :[
stringo0
A: 

"Combinatorial Designs and Tournaments" was a textbook I had for a course about Combinatorial Designs that had this type of problem. One of my majors back in university was Combinatorics & Optimization, so I do remember a little about this kind of thing.

JB King
+1  A: 

Note that each team plays 3 others per match, so it takes at least 5 matches to play all 15 other teams. We hope, then, that there is a solution for 20 matches where each team plays 5 matches and plays each team exactly once.

With 16 teams it's possible to construct a solution by hand in the following way...

  1. Divide the 20 matches into 5 rounds
  2. Number the teams 1 to 16
  3. For each match in turn, for each of the 4 places in that match, allocate the first team which
    • is still available to play in that round
    • has not yet played any of the teams already allocated to that match

You can narrow the search for available teams somewhat by noting that each match must contain exactly one team from each match of the previous round, so for place n you need only consider the teams which played match n in the previous round.

If we want 24 matches then any random choice of matches will suffice in the sixth round to fit the original requirements. However, to also ensure that no exact matches are repeated we can switch pairs of teams between the matches in some previous round. That is, if {1,2,3,4} and {5,6,7,8} were matches in some round then in round 6 we'll have {1,2,7,8} and {3,4,5,6}. Since 1 and 2 played each other exactly once in rounds 1-5, in the match {1,2,3,4}, we certainly haven't played match {1,2,7,8} yet.

The choice of data structures to implement that efficiently is left as an exercise for the reader.

stevemegson
We tried this solution, but kept getting stuck on the last of the 5 rounds with no teams left to pick from - however it did get us the closest.
stringo0