Clarification of counting problem

Number of ways to write 10 as a sum of 4 non negative numbers.

I get why this is 13 choose 3. But then the question also asks what happens when every number has to be atleast one, the answer is 9 choose 3. Do you just subtract the 4 zeros that are not going to be used or what?

Thanks for the help.

Placing objects into cells

Hello smellatron Quote:

Originally Posted by

**smellatron** Number of ways to write 10 as a sum of 4 non negative numbers.

I get why this is 13 choose 3. But then the question also asks what happens when every number has to be atleast one, the answer is 9 choose 3. Do you just subtract the 4 zeros that are not going to be used or what?

Thanks for the help.

Sorry to be fussy, but I'm not sure about this. I think you and Plato are answering a slightly different question, which is: How many solutions are there to the equation $\displaystyle a_1+a_2+a_3+a_4 = 10$, where the $\displaystyle a_i \in \mathbb{N}_0$ (including zero)? And, secondly, where the $\displaystyle a_i \in \mathbb{N}$ (excluding zero).

If this is what you meant, then that's fine. But the difficulty with the problem as you stated it is, of course, is that there is only one solution that uses, for example, the numbers 10,0,0,0. However, the question as I have stated it above (and which, I believe, you have both answered) has four distinct solutions; (10,0,0,0),(0,10,0,0), (0,0,10,0),(0,0,0,10).

Indeed, in Plato's solution, he mentions '*different *cells', whereas in the question as you stated it the 'cells' are, I think, all identical, as well as the objects that are to be placed in them.

As far as your saying that you understand where $\displaystyle \binom{13}{3}$ comes from, I can't say that I think it's at all obvious, and would be interested to hear why you think it is. I think it's probably easier to understand the *second *case where the numbers have to be non-zero.

My reasoning for this is as follows:

If each number has to be non-zero, imagine 10 1's in a line. There are therefore 9 gaps separating each number 1 from its neighbour. Then we have to choose 3 of these gaps into which to place a barrier, thus dividing the 1's into 4 groups. This can be done in $\displaystyle \binom{9}{3}$ ways.

To answer the first question (where zeros *are *allowed), the only method that I know is to imagine 14 1's with, therefore, 13 gaps from which 3 must again be chosen. This can be done in $\displaystyle \binom{13}{3}$ ways. In each group thus formed, there is a non-zero number of 1's. We then simply discard one 1 from each of the four groups, leaving 10 1's as required.

Is there an easier way of looking at this that I am overlooking?

Grandad