Count the solutions in nonnegative integers

In summary: This conversation discusses the problem of finding the number of solutions in nonnegative integers to a sum equal to a given number, n. This problem can be solved using a theorem in the chapter, but the participants are not allowed to use it. One approach suggested is using induction, while another suggests transforming the problem into a partial difference equation. Another result is derived for repeated sums.
  • #1
Jamin2112
986
12

Homework Statement



Count the solutions in nonnegative integers x1,...,xk to x1 + ... + xk=n

Homework Equations



There's a Theorem in the chapter (shows that the answer is "n+k-1 choose k-1" but we're not allowed to use it.

The Attempt at a Solution



Well, obviously you can just have x1 and make equal to n, or you can make x1,...,xk=n all equal to one, or do a bunch of stuff in between.

No stunning revelations for me, though. Ideas for how to construct a formula?
 
Physics news on Phys.org
  • #2
[STRIKE]Firstly, I'm assuming it's supposed to be positive integers only? Because if it's all "nonnegative integers" as you said, then we would have infinitely many solutions. 0 is a nonnegative integer. That would allow you to have as many x_i = 0 as you wanted.[/STRIKE]

You can prove it by induction. Prove your formula [tex] {{n + k - 1} \choose {k - 1}} [/tex] works for n = 0.

Assume your formula holds true for all cases with [tex] n \leq r [/tex]. Consider the case where [tex] n = r + 1. [/tex] If x_1 = 1, then the remaining x's must add to r, for which we already have the formula. Similarly, if x_1 = 2, 3, ... , r + 1, then the remaining x's must add to r - 1, r - 2, ... , 1, 0, to all of which we have the formula for by our induction hypothesis. So it comes down to proving

[tex] \sum_{i = 0}^{r + 1} {{i + k - 1} \choose {k - 1}} = {{(r + 1) + (k - 1)} \choose {(k - 1) + 1}} = {{r + k} \choose {k}}. [/tex]
 
Last edited:
  • #3
Oh and to prove that, the following theorem (also proved easily by induction) might be useful:

[tex]
{n \choose k} + {n \choose {k + 1}} = {{n + 1} \choose {k + 1}}.
[/tex]
 
  • #4
@Raskolnikov,

I was getting ready to post some hints, which were going to be very similar to what you wrote. However, I interpreted the problem to allow some of the [itex]x_i[/itex] = 0, but k is fixed. (In other words, to allow the solutions to be nonnegative.) If so, then the possibility of having an unlimited number of zeros is eliminated. If you are allowing k to vary, then how would you handle, for example, the case n = 3? Would you not have to consider the three equations

[tex]x_1 [/tex] = 3
[tex]x_1 + x_2[/tex] = 3 and
[tex]x_1 + x_2 + x_3[/tex] = 3?

If we assume that k is fixed, then your argument works fine (except for a typo in your first binomial coefficient: you meant k - 1 instead of k + 1).

Do you agree?

Petek
 
  • #5
@Petek,

Thanks for pointing out my typo. That's the problem with copy-pasting haha. It's fixed now.

And yes, I agree. My method wouldn't quite work if we allowed k to vary. In retrospect, I should have realized that something was off in my process seeing as how the sum we need to prove goes from i = 0 to i = r + 1, i.e., we have r + 2 terms for the case where n = r + 1...so x = 0 needs to be included.

Thanks for fixing the error in my thinking. Do you have any thoughts on what we would do if we were to allow k to vary?
 
  • #6
Raskolnikov said:
@Petek,

Thanks for pointing out my typo. That's the problem with copy-pasting haha. It's fixed now.

And yes, I agree. My method wouldn't quite work if we allowed k to vary. In retrospect, I should have realized that something was off in my process seeing as how the sum we need to prove goes from i = 0 to i = r + 1, i.e., we have r + 2 terms for the case where n = r + 1...so x = 0 needs to be included.

Thanks for fixing the error in my thinking. Do you have any thoughts on what we would do if we were to allow k to vary?

I suggest that we allow the OP to comment on the advice that's been provided. Afterward we can discuss other possibilities.

Petek
 
  • #7
@Jamin2112,

I found another way to solve your problem, possibly easier than the above solution. Here's a hint:

Show that the solution to your problem is the same as the number of ways to place n indistinguishable balls into k distinguishable urns. Then show that this number is the same as the answer to your problem. Here, "indistinguishable" means that the balls all look alike and "distinguishable" means that the urns may be thought as being labeled. So, for example, placing two balls into urn #1 and one ball into urn #2 is different than placing one ball into urn #1 and two balls into urn #2.

This approach makes it more clear that the original problem involves combinatorics.
 
  • #8
In this article in http://www.voofie.com/concept/Mathematics/" :

http://www.voofie.com/content/133/repeated-sum-and-partial-difference-equation/"

I first gave a standard method in solving the problem (probably the same approach as your theorem). Then I solve it using a totally difference approach by transforming it into a partial difference equation. Finally, I derived 1 more result for repeated sum, namely:

[tex]\sum _{n_1=0}^n \sum _{n_2=0}^{n_1} \sum _{n_3=0}^{n_2} \text{...}\sum _{n_{k}=0}^{n_{k-1}}a_{n_{k}} = \sum _{j=0}^n \binom{n+k-j-1}{n-j}a_j[/tex]
 
Last edited by a moderator:

Related to Count the solutions in nonnegative integers

1. What is the definition of "Count the solutions in nonnegative integers"?

"Count the solutions in nonnegative integers" refers to the process of determining the number of possible solutions to a mathematical problem where the variables can only take on nonnegative integer values (0, 1, 2, ...).

2. How do you count the solutions in nonnegative integers?

The process of counting solutions in nonnegative integers involves analyzing the given problem and determining all possible values for the variables that satisfy the given conditions. Then, the number of combinations of these values is counted to determine the total number of solutions.

3. Can there be an infinite number of solutions in nonnegative integers?

No, there cannot be an infinite number of solutions in nonnegative integers. Since nonnegative integers are finite, there can only be a finite number of possible solutions to any given problem.

4. What are some common applications of counting solutions in nonnegative integers?

Counting solutions in nonnegative integers is commonly used in various fields such as combinatorics, probability, and number theory. It can also be applied in solving real-world problems involving counting arrangements, combinations, and permutations.

5. Are there any specific techniques or formulas for counting solutions in nonnegative integers?

Yes, there are various techniques and formulas that can be used to count solutions in nonnegative integers depending on the specific problem. Some common techniques include the use of permutations, combinations, and generating functions.

Similar threads

  • Calculus and Beyond Homework Help
Replies
17
Views
1K
  • Calculus and Beyond Homework Help
Replies
22
Views
2K
  • Calculus and Beyond Homework Help
Replies
18
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
892
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
5K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
989
Back
Top