# Number of ways to choose mathematicians and computer scientists for a team

There are 4 mathematicians and 7 computer scientists. We need to create a team of experts that has 5 members. At least 2 members should be mathematicians. What is the number of ways we can choose? The solution is 301. Can someone explain why?

My attempt:

4 mathematicians (Ms for short) and 7 computer scientists (CSs for short) can be members. There are $11!/5!(11−5)!=462$ combinations for assigning membership. We need to subtract those combinations with 0 or 1 M. For 0 Ms it's easy: there is only one combination with 0 Ms i.e. the one with 5 CSs. As for those with 1 M: since there are four Ms there are at least 4 different combinations. In other 4 places (one place is taken by M) we need to distribute 7 CSs. $7!/(7−4)!=7!/3!=840$ permutations there are for that. $840$ permutations of CSs for each distinct M is $3360$. There are 4 places for CSs, so to bring $3360$ from permutations to combinations we need to divide by $4!$. $3360/24=140$. Then I concluded that there are $462−1−140=321$ combinations that contain at least 2 Ms. As you can see, I am very close ($321−301$ is only $20$). So... can you detect where am I wrong?

• Choose $5$ members (combinations). Make sure you do not have exactly $0$ or $1$ mathematicians (subtractions of other combinations) – Henry May 15 '18 at 17:05
• I get $251$ as the solution. There are $462$ combinations in total, one of them contains only computer scientists, and $210$ ($7!/4!$) contains 1 mathematician. $462-1-210=252$. – Hanlon May 15 '18 at 17:14
• $7+5=12$ so there are ${12 \choose 5}$ not ${11 \choose 5}$ combinations in total. More than one of them only involves computer scientists ... – Henry May 15 '18 at 17:25
• I meant 4 not 5 mathematicians. Sorry. And how can there be more than one combination that involves only computer scientists? – Hanlon May 15 '18 at 17:27
• Actually, it should be $426$. We place 7 computer scientists in 4 boxes, we have $7!/(7-4)!$ permutations, which is $840$, and then we divide by $4!$ because there are 4 boxes and we get $35$ combinations. $462-1-35=426$ – Hanlon May 15 '18 at 18:27

There are $4 + 7 = 11$ people available to serve on the team. Five of them can be selected in $\binom{11}{5}$ ways. From these, we must subtract those cases in which there are fewer than two mathematicians. Since there are four mathematicians and seven computer scientists, the number of ways of selecting exactly $k$ mathematicians and $5 - k$ computer scientists is $$\binom{4}{k}\binom{7}{5 - k}$$ The number of ways of selecting no mathematicians is thus $$\binom{4}{0}\binom{7}{5}$$ and the number of ways of selecting exactly one mathematician is $$\binom{4}{1}\binom{7}{4}$$ Hence, the number of teams with five members that contain at least two mathematicians is $$\binom{11}{5} - \binom{4}{0}\binom{7}{5} - \binom{4}{1}\binom{7}{4} = 462 - 21 - 140 = 301$$ As you can see, you made a mistake when you concluded that only one team could have no mathematicians. You failed to account for the fact that we had to select which five of the seven computer scientists would serve on the team.

• Oh... yeah, you are correct. – Hanlon May 15 '18 at 20:23

We have $4$ mathematicians in stock from which have to choose $2$, or $3$, or $4$. So, the remaining $3$, or $2$, or $1$ members are computer scientist which are $7$ in stock.So, the no of group is ${4\choose 2}{7\choose 3}+{4\choose 3}{7\choose 2}+{4\choose 4}{7\choose 1}=301$

We have cases of having 2,3,4,5 mathematicians and remaining scientists
Number of cases$=^5C_2^7C_3+^5C_3^7C_2+^5C_4^7C_1+^5C_5^7C_0=301$

• I haven't checked value you verify it – Abhishek May 15 '18 at 17:08
• Please check ur calculation...there are $4$ mathematicians in stock – Supriyo Halder May 15 '18 at 18:15
• You can obtain $\binom{n}{k}$ by typing \binom{n}{k} when you are in math mode. Doing so would make your answer easier to read. – N. F. Taussig May 15 '18 at 18:15
• @N.F.Taussig Ok i will see to it – Abhishek May 15 '18 at 18:17
• Also, @SupriyoHalder is correct. There are only four mathematicians in the (restated) problem. While the expression $\binom{5}{2}\binom{7}{3} + \binom{5}{3}\binom{7}{2} + \binom{5}{4}\binom{7}{1} + \binom{5}{5}\binom{7}{0}$ would be correct if there were five mathematicians, it is not equal to $301$, as you can easily check. – N. F. Taussig May 15 '18 at 18:27