I have a young group of kids ($30$) playing soccer and they need to be put into $6$ teams of $5$ players for each round of matches. All $6$ teams play at the same time on adjoining fields.
If I wanted each kid to play on a team with every other kid in the group (so they know each others names), how many team rounds would I need?
Note: I'm not after the number of rounds to get through all of the combinations of unique teams.
We are trying to find a parallel block design with $k=5$ and $q=6$ which covers every pair of the $qk$ points in which the number $r$ of classes is minimal.
I implemented the simulated annealing technique described here: https://onlinelibrary.wiley.com/doi/epdf/10.1002/jcd.10024
In this method we select an initial parallel design and search through the space of parallel designs with $q$ blocks of size $k$ in each class, and where there are $r$ classes ( they don't need to cover all the pairs) (so each class is a partition of $\{1,\dots,qk\}$ into $q$ sets of size $k$).
We start out with a given design, and in each step modify it to get a new one. The idea is that we want our designs to get "better and better". But we don't want only let them get better because we could get caught at a local maximum.
The authors propose that we let the number of "uncovered pairs" be the function that tells us how good a design is. We would like to find a design in which there are $0$ uncovered pairs, as such a design solves our original problem.
We use the method they propose. We transpose two two random elements of the same class and different blocks of our design, and let it be the next element of the search with probability $1$ if the cost does not increase and probability $e^{(oldcost - newcost)/c_i}$ where $i$ is the current depth of the search and $c_i$ is $0.99^{10^{-4}i}$ if the cost does increase.
I didn't know which starting designs I should use so I just used designs in which the starting classes are all random (that is, formed by a random permutation of $\{1,\dots,k*q\}$ in which the blocks of the class are consecutive elements).
I let the search go on for $160,000$ iterations and selected a starting set of $200$ designs. It seems to find a design with $13$ classes every time I run it. Although I haven't been able to find one with $12$, although I really haven't tried that hard.
Here is an example of a design with $13$ classes:
It seems we can obtain better results by trying to get the best design with $r-1$ classes and then checking if it can be patched with an $r$'th class.
to do this we can print the unsatisfied pairs, check the sizes of the connected components of the graph formed by those pairs, and trying to split these components into groups of size $5$.
For example, with $r=9$ we run the code with the parameter $8$, and check which unsatisfied pairs exist in the "result", and find the components.
It is not hard to see we can create a final class such that each component is contained inside one of the blocks.
For $r=8$ I always get components of size larger than $5$ though, although I don't really know what I'm doing, but at least we found one for $r=9$ :)