# Basic combinatorics question. Select two teams from boys and girls.

There are 5 girls and 3 boys. In how many different ways you can divide them into 2 teams (4 people each) if each team should have at least 1 boy?

Here is my solution. If one boy should be in each team then just assign 2 boys to teams and then the question is: you have 5 girls and 1 boy. In how many different ways you can divide them into 2 teams (3 people each). If you select one team, another one is selected automatically. So in how many ways you can select 3 elements from 6. Which is $C_{6}^{3}=20$.

The only problem is that the solution in the book is 30. So where is an error in my solution and how can I achieve 30?

• That's a good joke on your profile page BTW (I guess I'm just one out of many who have fallen into this trap)... But I'm not so sure that the girl on that picture would appreciate this joke if she knew about it... – barak manos Mar 8 '15 at 11:19
• @barakmanos The profile photo appears to be a commercial image of the professional model Simone Villas Boas. (So says Google.) I'm not sure whether that makes it copyright infringement, fair use, or free advertising. – David K Mar 8 '15 at 12:11
• @DavidK wow, I did not even know who was this (neither do I care). As far as I remember I just entered something like "hot girl" in google and select a random picture from first two scrolls. – Salvador Dali Mar 8 '15 at 12:15
• @barakmanos: I think you might've spoiled the test, though. – Ilmari Karonen Mar 8 '15 at 20:07
• @IlmariKaronen: Possibly, but I've also made it more interesting for those who wouldn't have otherwise checked OP's profile (and that goes without implying anything about anyone's tendencies). – barak manos Mar 8 '15 at 20:12

Solution #$1$:

The number of ways to choose $1$ out of $3$ boys to be on team A, and $2$ out of the remaining $2$ boys to be on team B is $\binom31\cdot\binom22=3$.

The number of ways to choose $3$ out of $5$ girls to be on team A, and $2$ out of the remaining $2$ girls to be on team B is $\binom53\cdot\binom22=10$.

Hence the number of different combinations is $3\cdot10=30$.

Solution #$2$:

The number of ways to choose $2$ out of $3$ boys to be on team A, and $1$ out of the remaining $1$ boys to be on team B is $\binom32\cdot\binom11=3$.

The number of ways to choose $2$ out of $5$ girls to be on team A, and $3$ out of the remaining $3$ girls to be on team B is $\binom52\cdot\binom33=10$.

Hence the number of different combinations is $3\cdot10=30$.

• Thank you. Any idea why my solution is wrong? – Salvador Dali Mar 8 '15 at 11:04
• @SalvadorDali: To be honest, I'm still not sure that my solution is correct. The other user who answered it has given a different answer. Let's wait for some more feedback on this... – barak manos Mar 8 '15 at 11:05
• actually the solution in the book is 30 (which I wrote in the question). – Salvador Dali Mar 8 '15 at 11:07
• @SalvadorDali: Oh, wait, I see in your question that the correct answer is indeed $30$, let me have another look at it... – barak manos Mar 8 '15 at 11:07
• @SalvadorDali: Yes, your solution is wrong right at the beginning, when you "just assign $2$ boys to teams". There are $\binom32$ ways to do it, and at the end, you will have to divide your answer by $2!$, in order to cancel-out identical teams with different order between them (i.e., setup #1 team A = setup #2 team B, and setup #1 team B = setup #2 team A. – barak manos Mar 8 '15 at 11:09

Number of pairs of teams where all boys are together: exactly $5$ (one for each girl).

Number of possible pairs of teams: $\frac{1}{2}\binom{8}{4}=35$.

The difference has to be the answer, i.e. $30$.

The specific step at which you went wrong is when you preassigned the first two boys. This step excluded all arrangements in which those two boys are on the same team. As there are exactly three ways to put two boys on one team and one on the other team (when arrangements with the teams swapped are considered identical), your solution excluded exactly one-third of all possible arrangements, which is why you got only $20$ arrangements instead of $30$.

The requirement that each team has at least one boy means that one team consists of two boys and two girls while the other team consists of one boy and three girls.

Observe that selecting one of the teams completely determines who is on the other team.

The number of ways of selecting two of the three boys and two of the five girls to be on one of the teams is $$\binom{3}{2}\binom{5}{2} = 3 \cdot 10 = 30$$ Once we have chosen this team, there is only one way to select the other team, namely, place everybody who has not already been selected on the other team. Hence, there are $30 \cdot 1 = 30$ ways to select the two teams.