0

The Number Of Integer Solutions Of Equations $$x_1 + x_2 + ... + x_r = n$$

An approach is to find the number of distinct non-negative integer-valued vectors $(x_1,x_2,...,x_r)$ such that $$x_1 + x_2 + ... + x_r = n$$

There are $n+r-1\choose r-1$ distinct non-negative integer-valued vectors $(x_1, x_2,...,x_r)$ satisfying the equation $$ x_1 + x_2 + ... + x_r = n $$

So there are $n+r-1\choose r-1$ solutions.

My question is how to count number of solutions for above equation considering all vectors whose permutation is same.

Now consider for $n = 2$ and $r = 2$ solutions are {(0,2), (2,0), (1,1)} as we can see (0,1) is a permutation of (1,0), so count them only once.

Therefore total number of solutions for $n = 2$ and $r = 2$ is 2 instead of 3.

sonus21
  • 101
  • We are counting the number of partitions of $n$ into at most $r$ parts, which is the number of partitions of $n+r$ into exactly $r$ parts. You can find a lot of information by searching for these terms. There are useful recurrences, a nice generating function, and good asymptotics, but no "closed form." – André Nicolas Jun 29 '16 at 14:58
  • Thank you for pointing out the solution. – sonus21 Jun 29 '16 at 15:02
  • 1
    Your use of "distinct" is ambiguous here: some may read $1+1$ as not allowed as the $1$s have the same value as each other – Henry Jun 29 '16 at 15:05
  • Yeah, I can see that. – sonus21 Jun 29 '16 at 15:06

0 Answers0