Fruit salad can be made with any $3$ of these $5$ fruits: apples, bananas, grapes, strawberries, and pineapples. If strawberries and pineapples do not taste good together and grapes and bananas do not look appetizing together, how many possible good tasting and appetizing salads are there?
I want to count the number of ways to choose $3$ fruits out of $5$, but with some restrictions. If I ignore the restrictions, the formula gives me $\binom{5}{3} = \frac{5!}{3!2!} = \frac{5 \times 4 \times 3 \times 2 \times 1}{3 \times 2 \times 1 \times 2 \times 1} = \frac{5 \times 4}{2 \times 1} = 10$ ways to choose $3$ fruits out of $5$. However, some of these ways are not good tasting or appetizing, so I need to subtract them from the total. How many ways are there to choose $3$ fruits that include strawberries and pineapples? I can fix strawberries and pineapples as two of the fruits, and then choose any of the remaining $3$ fruits as the third one. So there are $\binom{3}{1} = 3$ ways to do this. Similarly, how many ways are there to choose $3$ fruits that include grapes and bananas? I can fix grapes and bananas as two of the fruits, and then choose any of the remaining $3$ fruits as the third one. So there are also $\binom{3}{1} = 3$ ways to do this. Therefore, the number of ways to choose $3$ fruits that violate the restrictions is $3 + 3 = 6$. To get the number of ways that do not violate the restrictions, I need to subtract this from the total. So the final answer is $10 - 6 = 4$. 