# group 12 boys and 8 girls with restrictions

There're 12 boys and 8 girls in a class. The teacher wants to randomly split them into 3 groups: 5 kids in group A, 11 kids in group B and 4 kids in group C.

1) What is the probability that John and Peter will not be in the same group?

2) What is the probability that in each group there will be at least one boy?

It looks like both questions can be solved by using an event's complement. First let $|T|$ be the total possible ways to split kids into groups. $|T| = \binom{20}{5}\binom{15}{11}\binom{4}{4}$.

1) Let the event be named $E_1$, then its complement is $E_1^c$ which is an event such that John and Peter will be in the same group. If they're both in group A then there're 18 kids left to split and 3 kids to choose in A. In such scenario there're options to split the kids which is $\binom{18}{3}\binom{15}{11}\binom{4}{4}$. If John and Peter are in group B then there're $\binom{18}{9}\binom{9}{5}\binom{4}{4}$ ways to choose and if John and Peter are together in group C then there're $\binom{18}{2}\binom{16}{11}\binom{4}{4}$ ways to choose. Hence $|E_1^c| = \binom{18}{3}\binom{15}{11}\binom{4}{4} + \binom{18}{9}\binom{9}{5}\binom{4}{4} + \binom{18}{2}\binom{16}{11}\binom{4}{4}$ and $P(E_1) = 1 - \frac{P(E_1^c)}{P(T)}$.

2) Let the event that in each group there's at least one boy be $E_2$. Then the event such that there's not at least one boy in each group is its compliment $E_2^c$. Suppose that in A all kids are girls. There're $\binom{8}{5}\binom{15}{11}\binom{4}{4}$ ways to split the kids into groups with such restriction. Suppose that in C all kids are girls, then there're $\binom{8}{4}\binom{16}{11}\binom{4}{4}$ ways to split them. Lastly, there group B is composed of 11 kids so there will always be boys and girls in that group. Hence $|E_2^c| = \binom{8}{4}\binom{16}{11}\binom{4}{4} + \binom{8}{5}\binom{15}{11}\binom{4}{4}$ and $P(E_2) = 1 - \frac{P(E_2^c)}{P(T)}$.

The last one is really tricky so not sure I got it.

• Hint for part $2$: Let $E_X$ be the event "group $X$ is all girls". Then you just need to compute $P(E_A)$ and $P(E_C)$ noting that, happily, $E_A,E_C$ are mutually exclusive. – lulu Dec 15 '16 at 13:25
• Not sure I am following your computations in part $2$. Let's compute, say, $|E_A|$, the number of ways to arrange the kids so that $A$ is all girl. That's clearly $\binom 85\times \binom {15}{11}\times1$. Not sure I understand how you got what you got. – lulu Dec 15 '16 at 13:36
• Correct. They are being nice to you here in that $B$ has to have some boys and you can't have both $A,C$ all girl. – lulu Dec 15 '16 at 13:41
• Other than the notation issue, now corrected, you're doing fine. problem $1$ looks correct, and the method is a good one. – lulu Dec 15 '16 at 13:50
• @barakmanos I'll take a look now. – lulu Dec 15 '16 at 15:08

The total number of ways to split them into groups is:

$$\frac{(12+8)!}{5!\times11!\times4!}=21162960$$

Question #$1$:

The number of combinations with John and Peter in the 1st group is:

$$\frac{(12+8-2)!}{(5-2)!\times11!\times4!}=1113840$$

The number of combinations with John and Peter in the 2nd group is:

$$\frac{(12+8-2)!}{5!\times(11-2)!\times4!}=6126120$$

The number of combinations with John and Peter in the 3rd group is:

$$\frac{(12+8-2)!}{5!\times11!\times(4-2)!}=668304$$

So the probability that John and Peter will not be in the same group is:

$$\frac{21162960-(1113840+6126120+668304)}{21162960}\approx62.63\%$$

Question #$2$:

The number of combinations with the 1st group consisting of girls only is:

$$\binom{8}{5}\times\frac{(12+(8-5))!}{11!\times4!}=76440$$

The number of combinations with the 3rd group consisting of girls only is:

$$\binom{8}{4}\times\frac{(12+(8-4))!}{5!\times11!}=305760$$

So the probability that there will not be a group consisting of girls only is:

$$\frac{21162960-(76440+305760)}{21162960}\approx98.19\%$$

• (+1) This is a clear and clean alternative to the (equivalent) method discussed by the OP. Approaching the count as a multiset count (instead of a product of subcombinations as in the OP's method) is clearly more efficient. In this case, doing the multiplication out in full is not inconvenient, but if the numbers were substantially larger this approach would, I think, be preferred. – lulu Dec 15 '16 at 15:12
• @lulu: Thank you for the (positive) review :) – barak manos Dec 15 '16 at 15:13