If I can take out as many as all balls, or as least as no ball, how many different selections are possible?

38 Views Asked by At

Assume a basket contains $n$ different types of balls, namely $1,2,3,\cdots,n$, and the number of balls for type $i$ is $m_i$ for $1\leq i\leq n$. If I can take out as many as all balls, or as least as no ball, how many different selections are possible?

I find that in the less general case in which there are $k$ different balls (i.e. any two balls are of different types), the number of possibilities is $2^k$, which is quite simple to calculate. However, I'm not able to figure out the formula for the general case above.

Please help me solve the question above!

1

There are 1 best solutions below

2
On BEST ANSWER

You have $m_i+1$ options for each type, so you have

$$ \prod_{i=1}^n\left(m_i+1\right) $$

possible choices overall. In the special case $m_i=1$ for all $i$, you recover your result $2^n$.