UPDATE: My original question was overly complex. I'm re-phrasing it, removing the repeated part of the question, and focusing just on the combinations.
I organize a group of players. The group is mixed, and there are 4 courts. There are 8 men and 8 women.
Here is my approach, and where I get a bit confused.
Start with the men or women, "genderA" On court 1, we need to opponents, no repetition, order matters.
$\binom{8}{2} = 28$
One court 2, we pick the next pairing
$\binom{6}{2} = 15$
Then Court 3
$\binom{4}{2} = 6$
And the last 2 players go to court 4. Only one remaining combination
From the above, I calculate there are 28*15*6 possible orderings of genderA, or 2560 solutions.
When choosing genderB, order DOES matter. Starting on court 1, we pick partners, and here we have P(8,2) = 56
Court 2 we have P(6,2) = 30 Court 3 is P(4,2) = 12 Court 4 is P(2,2) = 2
Or 56*30*12*2 = 40,320 combinations.
Now, I need to combine the combinations of genderA and genderB. If I re-calculate this, maybe that works better? (some confusion here)
What if I calculate the combinations for court 1 for both genders?
$\binom{8}{2} * ^{8}P_{2} = 28*56 = 1568$
Court 2: $\binom{6}{2} * ^{6}P_{2} = 15*30 = 450$
Court 3: $\binom{4}{2} * ^{4}P_{2} = 12*6 = 72 $
Court 3: $\binom{2}{2} * ^{2}P_{2} = 2*1 = 2 $
My final answer would then be (???) 1568*450*72*2 = 101,606,400
That seems quite high, but also seems correct. If this is correct then the 4th court adds MANY more combinations than having 3 courts only. 100M versus 64K!
I would appreciate someone checking my math here, as I can't help feeling I've made some fundamental error in all of this.
Cheers,
Ed
I have setup a pyomo script to try and solve this, but I'm pretty new at that, so have not been able to build a solvable model yet.
For this question, I am looking for a way to calculate the total number of possible configurations, then I'll brute-force iterate over them to find a set of reasonably good matchups.
– Ed Henderson Aug 21 '18 at 23:16