1

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

  • What exactly do you want to find? – Zubin Mukerjee Aug 21 '18 at 21:22
  • They are playing doubles tennis right? 16 people across 4 courts must be doubles? – Simon Terrington Aug 21 '18 at 21:26
  • I expanded the questions to provide more details. – Ed Henderson Aug 21 '18 at 21:32
  • Yes, this is double tennis. 4 courts, 1 woman + 1 man per side. They each have a tennis rating -- US Tennis Association Ration, or NTRP -- as well, which ranges from 3.0 to 4.5. These are generally in 0.5 increments, but I "roughly" calculate a micro-NTRP to 0.1 increment – Ed Henderson Aug 21 '18 at 21:33
  • 1
    You have a variant of the "social golfer problem." http://mathworld.wolfram.com/SocialGolferProblem.html Here are some solutions for different numbers of participants. http://www.mathpuzzle.com/MAA/54-Golf%20Tournaments/mathgames_08_14_07.html – Doug M Aug 21 '18 at 21:47
  • That is a good reference, and it is similar to what I am trying to achieve, but I am not trying to make a perfect solution, just an optimized one.

    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
  • 1
    You talk of using $\left(\frac 88\right)$. What do you mean by that? Do you mean the number of combinations of $8$ things out of $8$? That is just $1$. By the way, the way to get the symbol for combinations in MathJax is {8 \choose 8}, which gives ${8 \choose 8}$ – Ross Millikan Aug 22 '18 at 02:14

1 Answers1

1

To compute the number of combinations you have, the first man can go anywhere. You then have $7$ choices for the man to oppose him. The third man can go anywhere left and you have $5$ left to oppose him. The third pairing gives another factor $3$, so there are $7\cdot 5 \cdot 3=105$ ways to distribute the men. Then the locations for the women are all distinct, so there are $8!=40320$ ways to distribute the women, for $105 \cdot 40320=4\ 233\ 600$ total. This assumes that the courts are identical. That is few enough that you can run through them all looking for the optimum.

Three loops will get you the list of possibilities for the men. If you search for generate permutations you find Heap's algorithm is well regarded. You can use that for the permutation of the women. I believe one of the Python packages has a function that generates all the permutations for you so you don't have to roll your own.

Ross Millikan
  • 374,822