Clarification of counting problem

• Apr 5th 2009, 01:54 PM
smellatron
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.
• Apr 5th 2009, 02:24 PM
Plato
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?

The first question is $\binom{10+4-1}{10}$, the number of ways putting ten identical objects (in this case 1’s) into four different cells (in this case variables).
$\binom{N+k-1}{N}$ is the number of ways putting N identical objects into k different cells.

But in both of these cases some cells could be empty.
If we want no cell to be empty, we play a mind game.
Go ahead and put a 1 into each variable leaving 6 to distribute into the 4 variables.
This gives $\binom{6+4-1}{6}$.

For the general case:
$\binom{N-1}{N-k}$ is the number of ways putting N identical objects into k different cells with no cell empty.
• Apr 6th 2009, 07:57 AM
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 $a_1+a_2+a_3+a_4 = 10$, where the $a_i \in \mathbb{N}_0$ (including zero)? And, secondly, where the $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 $\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 $\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 $\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?

• Apr 6th 2009, 09:02 AM
smellatron
That description does make alot of sense. The 14 dots was how the teacher showed it to us. Thanks again for the help.
• Apr 6th 2009, 09:09 AM
Plato
Quote:

I think you and Plato are answering a slightly different question, which is: How many solutions are there to the equation $a_1+a_2+a_3+a_4 = 10$, where the $a_i \in \mathbb{N}_0$ (including zero)? And, secondly, where the $a_i \in \mathbb{N}$ (excluding zero).
Your reading involves the partition of an integer. How many ways can 10 be represented in by four or fewer summands (the ‘fewer’ is the zero case): $P(10;4)=23$.
Here are some of those 23: $10=10$, $10=9+1$, $10=1+2+3+4$.
But the number 23 makes no sense of the proposed $\binom{13}{3}$.
The nonzero case is “How many ways can 10 be represented in by exactly four summands?”: $P(10;4)-P(10;3)=9$.
There reason that I doubt that the question refers to partitions of an integer is due to the difficulty in calculating $P(N;k)$.