Number of distinct solutions to $r_1+...+r_n=r$, $r>n$ where $r_i\neq{0}$ and the order of a solution $(r_1,...,r_n)$ does not matter

53 Views Asked by At

The question is as stated in the title: Assume $r>n$. How many distinct solutions to $r_1+...+r_n=r$ where $r_i\neq{0}$ and the order of a solution $(r_1,...,r_n)$ does not matter (e.g. (1,3,4) same as (3,4,1)). Now I know, and can prove, that the number of distinct distributions where $r_i$ can equal zero and the order of a solutions does matter, is $${n+r-1} \choose r$$ - by considering r indistinguishable balls placed in n cells, and the distinct distributions are in 1-1 correspondence with the solution to $r_1+...+r_n=r$, via their occupancy numbers. My question is how do I further reduce this number by now considering occupancy numbers where 0 is not allowed (i.e. no cell has zero balls) and where the occupancy numbers (1,3,4) and (3,4,1) are considered the same. Thank you.

2

There are 2 best solutions below

0
On

We want to distribute $r$ indistinguishable balls into $n$ indistinguishable cells with no cell empty. This is the number of partitions of $r$ into $n$ parts (which has no really nice formula).

2
On

I can at least answer the first part of your question. I'll take it as a given that you only mean for solutions to be integers greater than 0. Since you already have the formula for the case where $r_i \in \mathbf{Z}_{++}$ you can just do a change of variables to get the case where $r_i \in \mathbf{Z}_{+}$.

Specifically, we want to solve the number of solutions to $$x_1 + x_2 + \cdots + x_n = r$$ where $x_i \ge 1$. Now consider the substitution $x_i = y_i +1$ which tranforms our problem to finding the number of solutions to $$(y_1 + 1) + (y_2 + 1) + \cdots + (y_n + 1) = r$$ where $y_i \ge 0$. Now this is the problem you already know the answer to. It is just the total number of positive integer solutions to $$y_1 + y_2 + \cdots + y_n = r - n$$ which is just your formula above $$\binom{n+(r-n)-1}{r - n} = \binom{r-1}{r-n} = \binom{r-1}{n-1}$$

Imposing distinctness might not be nearly as trivial