a) Pick who the referee is in $11$ ways. Then among the ten people leftover, one will be the youngest. Pick who the other four members of that player's team is in $\binom{9}{4}$ ways. We get a total of $11\binom{9}{4}=1386$ ways.
b) Pick who the referee is in $11$ ways. Simultaneously pick the two captains in $\binom{10}{2}$ ways. Pick who the other four members of the youngest captain's team is in $\binom{8}{4}$ ways. We get a total of $11\binom{10}{2}\binom{8}{4}=34650$ ways.
Alternate approach:
a) Arrange five a's, five b's, and a c in a line in $\frac{11!}{5!5!1!}$ ways. Have the players go to either team $A$, team $B$, or referee position according to the arrangement of the a's, b's, and c's compared to their names. Now, "forget" which team was actually team $A$ and which team was team $B$ by dividing by two. This gives us $\frac{11!}{5!5!1!}\cdot\frac{1}{2}=1386$ ways.
b) Arrange four a's, four b's, one A, one B, and one C in a line in $\frac{11!}{4!4!1!1!1!}$ ways. The a's will correspond to which players are normal members of team $A$, the A will correspond to the player who is captain for team $A$ etc... Finally, "forget" which team was actually team $A$ and which was team $B$ by dividing by two. This gives us $\frac{11!}{4!4!1!1!1!}\cdot\frac{1}{2}=34650$ ways.
Similarly, one could instead just take the answer to part (a) and then pick who from the youngest person's team is captain and pick who the captain is for the other team, making it so there is $5\cdot5\cdot1386=34650$ ways.
The number is 24855678464505984000.
Suppose we have $k$ different groups, of sizes $N_1, N_2 ... N_k$. Define $F(N_1, N_2, ... N_k)$ to be the number of possible tournaments. So the answer to your particular problem is $F(3, 3, 3, 3, 6, 6, 6, 6)$.
How to compute $F$? We can come up with a recurrence relation, and hopefully a computer should be compute it. Here's the recurrence relation:
$$
F(N_1...N_k) = \frac{2}{\sum_l N_l}\sum_i\sum_{j < i} N_j \times N_i \times F(N_1, N_2\dots N_j-1 \dots N_i-1 \dots N_k)
$$
The idea is that we choose a pair (from different groups), then figure out the subproblem with that pair removed. The factor $2 / \sum_l N_l$ comes from the fact that we can choose any of the pairs to be the first one, which would lead to over-counting without dividing by the number of pairs.
For the base cases, we have $F(0, 0, \dots 0) = 1$, and $F=0$ if any of its arguments are 0.
I used the following code, which takes about a minute to run.
from functools import lru_cache
@lru_cache(maxsize = 1000000)
def F(M, ntup, k):
if M < 0: return 0
for n in ntup:
if n < 0: return 0
if M == 0:
return 1
ans = 0
for i in range(1, k):
for j in range(0, i):
ans += ntup[i] * ntup[j] * F(M-2, ntup[:j] + (ntup[j]-1,) + ntup[j+1:i] + (ntup[i]-1,) + (ntup[i+1:] if i+1 < k else ()), k)
return (2 * ans) // M
print(F(36, (3, 3, 3, 3, 6, 6, 6, 6), 8))
This prints 24855678464505984000. That means the probability of finding a successful tournament (meaning no pairs from the same group) by randomly sampling from all possible pairings is about 0.11, as expected.
Best Answer
The answers above rely mostly on the fact that the weights are integers. However, the result also holds for real weights as well, and is a common (spectacular regardless, in my opinion) application of linear algebra.
Let $W$ be the column vector of weights. Consider the matrix $A$ ($23 \times 23$ with entries in $\{0,1,-1\}$) such that its $i$th row represents the weight distribution of the teams ($1$ for a team, $-1$ for the other and $A_{i,i}=0$ is the only null entry) when person $i$ is a referee.
Then $AW=0$, so $A$ has rank at most $22$ (unless $W=0$).
Besides, in $\mathbb{F}_2$, $A$ reduces to $A’$ which has only $1$ outside the diagonal and $0$ in the diagonal.
We can check that the cofactor $(1,1)$ of $A’$ is nonzero in $\mathbb{F}_2$, so $A$ has a nonzero cofactor, so its rank is exactly $22$.
Now, $W$ and $(1,1,\ldots,1)$ are in the kernel of $A$. Thus they are proportional, which is the required claim.