# How many ways to chose balls from 3 groups of different colors? (Details in the description)

We have 3 different GREEN balls, 4 different RED balls and 2 different YELLOW balls. Find the number of ways in which the balls can be chose so that atleast 1 GREEN ball and 1 YELLOW ball are chosen.

P.S: Note that we can select any number of balls. It can be 1 ball to all 9 balls.

There are $2^9$ subsets of the set of $9$ balls. We will count the bad subsets, the subsets that contain no green or no yellow.

There are $2^6$ subsets with no green, and $2^7$ with no yellow. The sum $2^6+2^7$ double-counts the subsets with no green and no yellow. There are $2^4$ of these.

Thus the number of bad subsets is $2^6+2^7-2^4$. The number of subsets with at least one green and at least one yellow is therefore $2^9-2^6-2^7+2^4$.

Remark: We have used the Principle of Inclusion/Exclusion.

• Thanks for the note on the principle used May 21 '14 at 15:55
• You are welcome. May 21 '14 at 16:38

Ways to choose at least 1 GREEN $\times$ Ways to choose at least 0 RED $\times$ ways to choose at least 1 YELLOW.

$$\left(\binom31+\binom32+\binom33\right)\times\left(1+\binom41+\binom42+\binom43+\binom44\right)\times\left(\binom21+\binom22\right)$$

• which is $2^4(2^2 - 1)(2^3-1) =$ the other answer. May 19 '14 at 22:08
• Thank you for providing an alternate way to solve it. May 21 '14 at 15:55