A box contains 8 red marbles, 8 green marbles, and 10 black marbles. A sample of 12 marbles is to be picked from the box. How many samples contain exactly 7 red marbles or exactly 6 green marbles?

The answer key sets it up as (8 nCr 7)*(18 nCr 5)+(8 nCr 6)*(18 nCr 6)=588,336. Where does the (18 nCr 5) and (18 nCr 6) come from?

1 answer

18 marbles are not red
... 5 of those are the remainder of the 12 marbles picked

18 marbles are not green
... 6 of those are the remainder of the 12 marbles picked