Combinatorics problem, right solution?

I think Inclusion Exclusion is an easier approach.

If we ignore the restriction, there are $\binom {17}5$ ways to choose the group.

We then exclude the choices which miss one specified profession. That's an exclusion of $$\binom {11}5+\binom {10}5+\binom {13}5$$.

We then add back the cases in which all the people come from one profession. Thus we add back $$\binom 65+\binom 75$$

Thus the answer is $$\binom {17}5-\left(\binom {11}5+\binom {10}5+\binom {13}5\right)+\left(\binom 65+\binom 75\right)=\boxed {4214}$$


I think it is easiest to use the principle of inclusion exclusion. Start with all $\binom{17}5$ committees, ignoring the condition that each profession must appear. Then, for each profession, subtract the bad committees where that profession does not appear. So, subtract the $\binom{13}5$ committees with no doctor, the $\binom{11}5$ committees with no lawyer, and the $\binom{10}5$ committees with no engineer. But then committees which are missing two particular professions have now been doubly subtracted, so these must be added back in to correct for this. For example, the $\binom{7}5$ committees with no doctor or lawyer.

The result is $$ \binom{17}5-\binom{13}5-\binom{11}5-\binom{10}5+ \binom{7}5 +\binom{6}5 $$