# Filling each box with one colored ball, with an infinite stock of balls

You have infinitely many balls and each of them is colored with one of the $C$ colors. You decided to fill each of the $N$ boxes $(B_1, B_2, B_3, \ldots, B_N)$ with exactly one ball. In how many ways can you do that? Two ways are considered different if there is at least one box in one way that has different colored ball than in the other way.

I think the answer is $C^N$. Am I correct?

What would happen if the condition exactly one is removed?

• In effect you are counting the $N$-tuples of colors, so yes, you are correct. Jan 18, 2016 at 2:03

Each box can be filled in $C$ ways as tgere are C different colour balls so $N$ boxes can be filled in $C.C.C....(N times)=C^{N}$ do i t for $2,3$ balls it will be more clear
• @ManishGaurav: If there is no limit to the number of balls per box, there are infinitely many solutions (provided $C>0$). Jan 19, 2016 at 12:28
$C^N$ is correct.
If you meant by 'removing the condition' only 'removing the word exact', so you can effectively put 0 or 1 balls in each box, just consider 0 balls as a new 'color'. That gives you $(C+1)^N$ possibilities