OK, I'm not sure if I can explain this:
- I have 12 players
- I want that each player play 3 times
- Each game is of 3 vs 3 players
- In each game each player plays with 2 different team members (no duplicate team members in the 3 matches)
I want that during the tournament each player avoid having more than one duplicate opponent (or none if possible)
Can you help me?
Restrictions
Some thoughts first:
(VII) You need exactly $\underbrace{12}_{(I)} \cdot \frac{\overbrace{3}^{(II)}}{\underbrace{6}_{(III)}} = \frac{36}{6} = 6$ matches
(I), (III) and (VI) $\Rightarrow$ There are $\binom{12}{3} \cdot \binom{9}{3} = 220 \cdot 84 = 18480$ possbile matches
Code
If you relax (V) to twice I found a solution with the following script:
Ideas in the code
Well ... pretty straight forward. You basically try every combination. It's implemented as a depth-first-search.
I make use of itertools.combinations, set and defaultdict. I love Python ♥
Solution
At least there are at maximum two duplicate opponents. My script currently tries to find a solution with at most one duplicate opponent. It checks all combinations in alphabetical order. Currently it checked:
I guess as soon as the 3. match gets 'B' in the first position we can be sure that there is no possibility to avoid more than one duplicate opponent.
edit:
The script just checked:
after some hours of execution. So I guess (no proof :-( ) there is no way to get a solution with only one duplicate opponent.