The what
I'm attempting to produce an optimum set of brackets (optimum defined by constraints) for a tournament.
The problem
I don't know how to approach the problem. This paper is pretty high level but discusses the possibility of solving set partitioning problems with constraint programming. It also states that the majority of set partitioning problems are solved via integer programming. I am mainly looking for an example to emulate. The question is similar to this SO question. The majority of the constraint examples I've seen defined a specific partition total. Is it possible to model a system where the partitions would be determined dynamically by the constraints and the participant set? I would link examples but I am limited to only 2 due to my reputation.
A more concrete example
Known values
- The number of participants is N.
- Each participant has a weight W associated with them.
Constraints
- A bracket (set) is made up of 2,3,4,6,7, or 8 participants.
- Each participant is only in a single bracket.
- The must not be more than a 15% difference between the lowest weighted participant and the highest weighted participant in a bracket.
- Favor creating brackets of size 8 and 4 over all other bracket sizes.
So for example say there are 8 participants.
{ {1, W=100}, {2, W=103}, {3, W=105}, {4, W=106}, {5, W=110}, {6, W=114}, {7, W=120}, {8, W=125} }
One possible solution would be: {1, 2, 3}, {4, 5}, {6, 7, 8}
A more optimum solution would be: {1, 2, 3, 4}, {5, 6, 7, 8} since this favors 4, 8 sized sets over the previous solution.
Is it possible to partition a set into a dynamic number of child sets?
Thanks again for your time!