How many combinations of natural numbers add up to another?

In summary: The number of combinations is given by the so called 'multinomial coefficient' and is...$$ N= \frac{m!}{x_{1}!\ x_{2}!\ ...\ x_{n}!}\ (1)$$
  • #1
mathmaniac1
158
0
Given n numbers x1,x2...xn belong to N.
x1+x2+x3...xn=m
How many different combinations of x1,x2,x3...xn are there?Is there any formula useful here?
Note:x1,x2,x3... need not be distinct and also can be 0.

Thanks
 
Physics news on Phys.org
  • #2
If we have a set of cardinality $n$:

\(\displaystyle A=\{x_1,x_2,x_2,\cdots,x_n\}\)

Then it can be shown that the number $N$ of subsets is:

\(\displaystyle N=2^n\)

However, this implies that the elements are distinct.
 
  • #3
MarkFL said:
If we have a set of cardinality $n$:

\(\displaystyle A=\{x_1,x_2,x_2,\cdots,x_n\}\)

Then it can be shown that the number $N$ of subsets is:

\(\displaystyle N=2^n\)

However, this implies that the elements are distinct.

I don't understand.What is N?And m is seen nowhere in your formula.And you also say the elements are distinct.So please tell me what did you mean to convey through the above post.

Thanks
 
  • #4
mathmaniac said:
...So please tell me what did you mean to convey through the above post.

Thanks

To be honest, I really wasn't sure what you are asking, so I took a stab at offering something that might help you. You state:

\(\displaystyle \sum_{k=1}^n x_k=m\)

Are you asking how many different ways the addends may be ordered? If this is the case, then it would simply be $n!$.

Can you give an example of what you are wishing to find?
 
  • #5
mathmaniac said:
Given n numbers x1,x2...xn belong to N.
x1+x2+x3...xn=m
How many different combinations of x1,x2,x3...xn are there?Is there any formula useful here?
Note:x1,x2,x3... need not be distinct and also can be 0.

Thanks

The number of combinations is given by the so called 'multinomial coefficient' and is... $$ N= \frac{m!}{x_{1}!\ x_{2}!\ ...\ x_{n}!}\ (1)$$

Kind regards $\chi$ $\sigma$
 
  • #6
All of the above posts are helpful and correct, but we really need to have more details to tell you which formula to use. It depends on if you must use all of the elements and if order matters.
 
  • #7
Example:

m=3,n=2
So the possible combinations are 03,12.

Clear?
n means the number of x1,x2...

And yes,order matters.
 
  • #8
One of the most remarkable application of multinomial coefficients is the 'polynomial formula'...

$$ (x_{1} + x_{2} + ... + x_{p})^{n} = \sum \frac{n!}{n_{1}!\ n_{2}!\ ...\ n_{p}!}\ x_{1}^{n_{1}}\ x_{1}^{n_{1}}\ ...\ x_{p}^{n_{p}}\ (1)$$

... where the sum is extended to any non negative integers for which is $n_{1} + n_{2} + ... + n_{p}=n$...

Kind regards

$\chi$ $\sigma$
 
  • #9
I am kind of asking how many terms with distinct coefficients will there be in the multinomial formula.
 
  • #10
mathmaniac said:
Example:

m=3,n=2
So the possible combinations are 03,12.

Clear?
n means the number of x1,x2...

And yes,order matters.

If order matters then those are not all of the possible combinations. That would mean that 03 is different than 30. It sounds like there are $m+1$ elements and you are putting them into $n$ groups but it's hard to tell from your description.
 
  • #11
The problem as stated is rather ambiguous. Do you mean to find the number of different combinations $(x_1, x_2, \cdots, x_n)$ such that their sum adds up to $m$? If so, you can use generating functions or statistics to attack this problem, I don't have time right now but the answer is a binomial coefficient, I believe $\binom{n - 1 + m}{m}$ from memory but it is a fairly simple problem.

But that is only true if zero is excluded. If it is, you can break down the problem by considering $n'$ integers to add up to $m$, with $0 < n' \leq n$, where each of these is nonzero, and add up the results.

If order matters, multiplying by $n!$ should do it, but I don't know. I am not very good at these kinds of statistics.​
 
  • #12
mathmaniac said:
Given n numbers x1,x2...xn belong to N.
x1+x2+x3...xn=m
How many different combinations of x1,x2,x3...xn are there?Is there any formula useful here?
Note:x1,x2,x3... need not be distinct and also can be 0.

Thanks

It looks to me like you are talking about either partitions, if order does not matter, or compositions, if order does matter. If so, then I would say this thread belongs in Number Theory.

MathWorld has another take on this problem. The number of partitions with a given number $S$ of parts is not a trivial problem, it seems.
 
Last edited:
  • #13
Jameson said:
If order matters then those are not all of the possible combinations. That would mean that 03 is different than 30. It sounds like there are $m+1$ elements and you are putting them into $n$ groups but it's hard to tell from your description.

Sorry by order matters,I mean the other way,that you have to look out that an order is not repeated.

Not m+1 elements necessarily,it could be any n elements.that add up to m.
 
Last edited:
  • #14
Ackbach said:
It looks to me like you are talking about either partitions, if order does not matter, or compositions, if order does matter. If so, then I would say this thread belongs in Number Theory.

MathWorld has another take on this problem. The number of partitions with a given number $S$ of parts is not a trivial problem, it seems.

4=4=3+1=2+2=2+1+1=1+1+1+1

Here m=4,but there is no n.For eg:if n=2
Then the combinations I need are
(3,1),(4,0),(2,2)
 
  • #15
mathmaniac said:
4=4=3+1=2+2=2+1+1=1+1+1+1

Here m=4,but there is no n.For eg:if n=2
Then the combinations I need are
(3,1),(4,0),(2,2)

Right. As mentioned above, finding the number of partitions of a number with a given number of numbers is not a trivial task, apparently. There's not a nice neat formula for it.

In the MathWorld link, right around Equation 58, there's a section dealing with the computation of the numbers you're after.
 
  • #16
I have saved the page but it's a pretty big one and will take time to read.And I also don't think I will be able to understand it.

So there is no formula?:(I was looking for someway to assure whether I have written all combinations in the multinomial formula.

Thanks anyway.
 
  • #17
may the formula you asked is m+r-1Cr-1 for
x1+x2+...xr=m and the proof i am in a little mess about it right now i will surely come to it again my maths teacher used to prove this many a times
 
  • #18
Yaah,recently I am finding more connections of this problem to the r-multiset equation...
I will be waiting for your answer.
 
  • #19
okay the proof goes with prior knowledge in binomial theorem,
x1+x2+x3...xr=n(xi can be zero as given)
the question is an algebraic analogy dividing n identical objects among r different groups , that means,
coefficient of x^n in the expansion (x^0+x^1+...x^n)^r (if you didn't understand this section report me (Wait))
multiplying with 1-x on numerator and denominator
we get
(1-x^(n+1))^r/(1-x)^r=(1-x^n+1)^r*(1-x)^-r,
hence coefficient x^n can only be found in (1-x)^-r
which is equal coefficient of x^n in sigma(n=0 to infinite) n+r-1Cr-1*x^n...:D
hence number of ways is n+r-1Cr-1
sorry that i didn't use latex(i have to learn) hope you understand the procedure
 
  • #20
mathworker said:
multiplying with 1-x on numerator and denominator
we get
(1-x^(n+1))^r/(1-x)^r=(1-x^n+1)^r*(1-x)^-r,
hence coefficient x^n can only be found in (1-x)^-r
which is equal coefficient of x^n in sigma(n=0 to infinite) n+r-1Cr-1*x^n...:D
hence number of ways is n+r-1Cr-1
sorry that i didn't use latex(i have to learn) hope you understand the procedure

what you do with 1-x is not clear,mathworker.

Maybe I have to get myself a paper and pen.

Thanks anyway
 
  • #21
mathmaniac said:
what you do with 1-x is not clear,mathworker.

Maybe I have to get myself a paper and pen.

Thanks anyway
1-x^n=(1-x)(1+x+x^2+...x^n-1):D
 
  • #22
mathworker said:
n+r-1Cr-1
There is an easier proof with the numbers considered as writing r 1s and n 0s.For example for n=4 and r=3
we can write one of the combinations,say 130
as 1011100.The last zero is compulsory.

But if i order matters,the problem is bigger,each of the combination is permuted different times,which makes it harder to find a good formula.
 

Related to How many combinations of natural numbers add up to another?

1. How many combinations of natural numbers add up to a given target number?

The number of combinations of natural numbers that add up to a given target number depends on the target number itself. For example, the target number 10 can be formed by 9 + 1, 8 + 2, 7 + 3, 6 + 4, 5 + 5, 4 + 6, 3 + 7, 2 + 8, and 1 + 9. Therefore, there are 9 possible combinations. However, as the target number increases, the number of combinations also increases exponentially.

2. Is there a formula for calculating the number of combinations of natural numbers that add up to a given target number?

Yes, there is a formula for calculating the number of combinations of natural numbers that add up to a given target number. It is known as the "stars and bars" formula and is given by (n + r - 1) choose (r - 1), where n is the target number and r is the number of natural numbers being used in the combination.

3. Are there any restrictions on the natural numbers used in the combinations?

There are no specific restrictions on the natural numbers used in the combinations. However, it is important to note that the natural numbers must be positive and whole numbers. Additionally, some combinations may not be possible if the target number is too large or if the number of natural numbers being used is limited.

4. Can the same natural number be used more than once in a combination?

Yes, the same natural number can be used more than once in a combination. For example, the target number 10 can be formed by 5 + 5, where the natural number 5 is used twice. In fact, in many cases, using the same natural number multiple times is necessary to reach the target number.

5. Is there a limit to the number of natural numbers that can be used in a combination?

There is no specific limit to the number of natural numbers that can be used in a combination. However, as the number of natural numbers increases, the number of possible combinations also increases exponentially. This means that for larger target numbers, it may not be feasible to use a large number of natural numbers in a combination.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
859
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
960
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
853
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
916
Replies
9
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
Back
Top