How many ways can I choose a subset such that it contains at least one yellow and one blue marble?

82 Views Asked by At

There's 10 marbles in total: 3 red, 2 blue, 4 yellow and 1 white marble.

How many ways can I choose a subset such that it contains at least one yellow and one blue marble?

The solution is 64, but I can't find a way to solve it 'mathematically' other than using my intuition. Could somebody help me?

2

There are 2 best solutions below

0
On

Use generating functions. Subtracting 1 blue and 1 yellow, the generating function here is $(1+x)^2(1+x+x^2+x^3)^2$ or $x^8 + 4 x^7 + 8 x^6 + 12 x^5 + 14 x^4 + 12 x^3 + 8 x^2 + 4 x + 1$. Adding the coefficients gives the answer, i.e. 64.

0
On

Since you have to have $1$ blue and $1$ yellow marble, the problem comes down to finding the number of different subsets of: $3$ red, $1$ blue, $3$ yellow, and $1$ white marble

Now, you can choose $0,1,2$, or $3$ red marbles, so $4$ possibilities there. Same for the yellow ones of course. Then, you can either add a blue or not, so $2$ options there, and same for the white.

So, that's $4 \cdot 4 \cdot 2 \cdot 2= 64$ possible subsets.