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?
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.