[Math] Given 10 white, 9 green and 7 black. In how many ways you can select one or more balls

combinatorics

Question

Assuming the balls to be identical except for difference in colours, the number of ways in which one or more balls can be selected from 10 white, 9 green and 7 black balls is?

Answer in book is $(10+1)(9+1)(7+1)-1 = 880-1=879$

I don't understand the answer

What I have understood and what I have done

The question is asking that out of the balls given in how many ways I can select one ball + in how many ways I can select two balls + . . . + in how many ways I can select 25 balls + in how many ways I can select 26 balls.

One ball can be selected in 3 ways i.e. either you select green, white or black ball.

Two balls can be selected in 3+3=6 ways i.e. either you select two green or two black or two white or one green one black or one green one white or one black one white.

Only this much I can do.

I don't know how to write this in terms of combination. So please help me with this.

Best Answer

First, you can select from none to ten white balls. $(10+1)$ choices.

Then, you can select from none to nine green balls. $(9+1)$ choices.

Finally, you can select from none to seven red balls. $(7+1)$ choices.

Putting this together, that is where the $(10+1)(9+1)(7+1)$ derives.

However as you were asked to count selections of "one or more balls", you can not select none of all three colors at once (ie no balls at all).   So that's what the $-1$ is about.

$$(10+1)(9+1)(7+1)-1$$