# A committee of 5 is to be chosen from a group of 9 people

A committee of 5 is to be chosen from a group of 9 people.Number of ways in which it can be formed if two particular persons either serve together or not at all and two other particular persons refuse to serve with each other.

Let $P_1,P_2$ be the persons who either serve together or not at all and $P_3,P_4$ be the persons who refuse to serve with each other.

Possible cases are $(P_1,P_2,P_3)$ and two others,$(P_1,P_2,P_4)$ and two others,$P_3$ and 4 others excluding $P_1,P_2,P_4$ and $P_4$ and 4 others excluding $P_1,P_2,P_3.$

Total cases are$=5C2+5C2+5C4+5C4=30$ but the answer is $41$

Using same nomenclature as you have used, there are 4 cases:

1. P5 to P9 are selected = 1 case
2. P1 and P2 both selected, choose any three from P5-P9 = 1*(5C3) = 10 cases
3. P1 and P2 both selected, one of (P3, P4) is selected, and choose any two from P5-P9 = 1*(2C1)*(5C2) = 20 cases
4. Don't select P1, P2; choose one out of P3, P4 and 4 from P5-P9 = (2C1)*(5C4) = 10 cases

Total = 1+10+20+10 = 41

Another way to do this is to consider the following 2 cases:

1) P1 and P2 serve together: $\;\;\displaystyle \binom{7}{3}-\binom{5}{1}=35-5=30$ choices.

2) Neither P1 nor P2 serves: $\;\;\displaystyle \binom{7}{5}-\binom{5}{3}=21-10=11$ choices.

Therefore there are a total of $\color{red}{41}$ choices.

Again another way. Since both conditions are independent of each other I did it in two steps. The first I calculated the number of combinations for the first condition (Either A and B are on the team or they are not).

$$\;\;\displaystyle \binom{7}{3}+\binom{7}{5}= 56$$

From here I broke down each term for the next condition where 1 choice excludes 1 other choice. This is equal to the combinations of not choosing either + the combination of choosing one of the two.

$$\;\;\displaystyle (\binom{5}{3}+\binom{2}{1}\binom{5}{2}) + (\binom{5}{5}+\binom{2}{1}\binom{5}{4})= 41$$