# Understanding solution to probability problem

I came across following problem

A basketball team consists of 6 frontcourt and 4 backcourt players. If players are divided into roommates at random, what is the probability that there will be exactly two roommate pairs made up of a backcourt and a frontcourt player?

I solved the problem and checked the final solution given. I was wrong. After giving a bit of thought I realized I solved it stupidly. However I was not able to solve it again correctly. So I went through the full description given in the answer. But I was not able to understand it either.

There are $(10)!/2^5$ different divisions of the 10 players into a first roommate pair, a second roommate pair, and so on. Hence, there are $(10)!/(5!2^5)$ divisions into 5 roommate pairs. There are $\binom{6}{2}\binom{4}{2}$ ways of choosing the frontcourt and backcourt players to be in the mixed roommate pairs, and then 2 ways of pairing them up. As there is then 1 way to pair up the remaining two backcourt, and $4!/(2!2^2) = 3$ ways of making two roommate pairs from the remaining four frontcourt players, we see that the desired probability is $$P(\text{2 mixed pairs})=\frac{\binom{6}{2}\binom{4}{2}(2)(3)}{(10)!/(5!2^5)}=.5714$$

I was not able to understand following sentences

• There are $(10)!/2^5$ different divisions of the 10 players into a first roommate pair, a second roommate pair, and so on. Hence, there are $(10)!/(5!2^5)$ divisions into 5 roommate pairs.
• $4!/(2!2^2) = 3$ ways of making two roommate pairs from the remaining four frontcourt players

Both seem to follow same logic, but seems that either I was never came across it or its something simple but I am stupidly not able to get it.

Consider the $10$ players to be along a row. Then there are $10!$ ways to permute them along the row.

The task in front of you is to form pairs of roommates. So you group the first two, then the next two, and so on to form 5 pairs. Now, we have many repetitions in the $10!$ ways counted above, namely -

The order in each pair does not matter, and

The order of pairs formed does not matter. This simply means that forming the pair $(1,2),\ (3,4),\ldots$ is the same as $(3,4),\ (1,2),\ldots$, etc.

So we divide by $2^5$ to account for the first case, and $5!$ to account for the second.

A similar method is then used for the second calculation.

Consider the $10$ players to be along a row. Then there are $10!$ ways to permute them along the row.

The task in front of you is to form pairs of roommates. So you group the first two, then the next two, and so on to form 5 pairs. Now we have many repetitions in the $10!$ ways counted above, namely -

The order in each pair does not matter, and

The order of pairs formed does not matter. This simply means that forming the pair $(1,2),\ (3,4),\ldots$ is the same as $(3,4),\ (1,2),\ldots$, etc.

So we divide by $2^5$ to account for the first case, and $5!$ to account for the second.

A similar method is then used for the second calculation.

More clarification

$5!$ is introduced in the denominator of $\frac{10!}{5!2^5}$ for compensating for different group arrangements. For example following are same groups:

Arrangement 1: (1,2)(3,4)(5,6)(7,8)(9,10)
Arrangement 2: (3,4)(1,2)(7,8)(5,6)(9,10)


There are $5!$ such arrangements which can form same groupings.

Each group can be permuted in 2 ways. For example, we get same groupings by permuting first group:

Arrangement 1: (2,1)(3,4)(5,6)(7,8)(9,10)


We can permute all five groups resulting in $2\times2\times2\times2\times2=2^5$ permutations resulting in same groupings.

i) labeled rooms combinatorial species

The e.g.f is

$$({x^2\over 2!} + {xy \over 1!1!} + {y^2 \over 2!})^5$$ and the coefficient of $${x^6 \over 6!}{y^4 \over 4!}$$ is $$43200t^4+64800t^2+5400$$

The required probability is then $$4 \over 7$$.

ii) If the rooms are unlabeled, the e.g.f is

$${1 \over 5!} ({x^2\over 2!} + {xy \over 1!1!} + {y^2 \over 2!})^5$$ and the coefficient of $${x^6 \over 6!}{y^4 \over 4!}$$ is $$360t^4+540t^2+45$$

$${540 \over 945} = {4 \over 7}$$

If the players are "unlabeled",

iii) for labeled rooms we go Polya $$5t^4+30t^2+10$$ so probability is 2/3

iv) for unlabeled rooms we count partitions $$t^4+t^2+1$$ so probability is 1/3