1

Given that $i,j,k$ are non-negative integers, how many possible ways can $i+j+k=n$ without taking the order into account?

In other words, what does the following sum equal? $$\sum_{i+j+k=n} 1$$

And then, for a generalized case of m numbers:

$$a_0+a_1+...+a_m=n$$

But the order for which i,j and k are placed does not matter, for example: $1+1+2$, $1+2+1$ and $2+1+1$ are the same combination.

  • 1
    For fixed $i,j\leq n$, there is precisely one $k$ to give the sum as $n$. For fixed $i\leq n$, how many values of $j$ are there so that the sum doesn't exceed $n$?

    Put another way, note that $$\sum_{i+j+k=n}1 =\sum_{i=0}^n \sum_{j=0}^{n-i} \sum_{k=n-i-j}1 $$

    – nathan.j.mcdougall Jan 20 '19 at 22:24
  • 2
    The coefficient of $x^n$ in $(1-x)^{-3}$ resp. $(1-x)^{-m}$. – Angina Seng Jan 20 '19 at 22:35
  • See also https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics) – Crostul Jan 20 '19 at 22:39

2 Answers2

1

If the order matters, the we are speaking of the weak compositions of $n$ into $m$ parts. and their number is $$\binom{n+m-1}{m-1}$$

If the order does not matter then, since the $x_k$ can also be null, we are speaking of the partitions of $n$ into at most $m$ parts$.
Look at the indicated link for how to compute that.

Note

When you write $$ \sum\limits_{i + j + k = n} 1 $$ the general acception for that is that order matters.

G Cab
  • 35,272
0

The number of solutions is $[a_n]$ where $a_n$ is defined as follow: $\frac{1}{(1-z)^3}=\sum_{n\geq 0}a_nz^n$. In general the number of solution $A_n$ of the diophantine equation $x_1+x_2+...+x_k=n$ is given by the Taylor expansion of $\frac{1}{(1-z)^k}$

DINEDINE
  • 6,081