Combinations with repetition? $n+r-1 \choose r-1$=$n+r-1 \choose r$

binomial-coefficientscombinationscombinatorics

There is one section in my book called "Combination with repetitions".
The proof there is done with bijection. I wasn't able to understand the proof. I went to youtube.

In one video the thing they found out was $n+r-1 \choose r-1$ (https://youtu.be/tFHjUMSPmq0)

In another video the thing they found out was $n+r-1 \choose r$
(https://youtu.be/ZcSSI6VY1kM)

Basically here we are trying to find out the number of selection of $r$ objects from $n$ distinct objects such that each object from $n$ is available in sufficient quantity.
For example: say we have 3 distinct objects
$$A \;B\; C$$
that is $n$ is $3$ and we gotta select $2$ objects out of it that is $r$ is $2$.

All of the possible selections are $$AA,BB,CC,AB,AC,BC$$
Each time we select a quantity say $A$, it "sort of" regenerates again giving us the option to select $A$ again.
The thing is we can say it this way
$$x + y + z= 2$$
$x$ denotes how many $A$ I select.

$y$ denotes how many $B$ I select.

$z$ denotes how many $C$ I select.

So the question now basically how many non-negative solutions does $$x+y+z=2$$ have.
Which is $$2+3-1 \choose 3-1$$

The general thing

Let there be n distinct type of objects such that each type is available in sufficient quantity. We have select to select r things from here.

This means we have to find the number non negative solutions of the equation:
$$ x_{1}+x_{2}+\dots +x_{n}= r$$
That is:
$$ r+n-1\choose n-1 $$
Which is same as
$$r+n-1\choose r$$
So both are the same thing. But still I wasn't able to show $n+r-1 \choose r-1$=$n+r-1 \choose r.$

Is this equation even true?? No right? Then why different answers in different videos?

Best Answer

In the first video you have $r$ non-negative integers (how many servings of ice cream were sold in each of $r$ flavors) and the integers must add up to $n$ (total number of servings of ice cream):

$$ x_1 + x_2 + \cdots + x_r = n. $$

The number of possibilities then is $$ \binom{n + r - 1}{r - 1} = \frac{(n+r-1)!}{n!(r-1)!} = \binom{n + r - 1}{n}. $$

In the second video you have $n$ non-negative integers and the integers must add up to $r$:

$$ x_1 + x_2 + \cdots + x_n = r. $$

The number of possibilities then is $$ \binom{n + r - 1}{n - 1} = \frac{(n+r-1)!}{r!(n-1)!} = \binom{n + r - 1}{r}. $$

The object lesson is that you must not assume that the letter $n$ means the same thing every time you encounter it. You can have two different people doing the exact same problem (as they did in these two videos) but to one of them, $n$ means one thing and to the other, $n$ means something very different. They also disagree on what $r$ means.

In general, $$ \binom{n + r - 1}{r - 1} \neq \binom{n + r - 1}{r}, $$ but that is to be expected since they are answers to two different problems. One formula tells you the number of ways to make a list of $r$ integers add up to $n$, and the other tells the number of ways to make a list of $n$ integers add up to $r$.

Your book probably used letters to say how many integers there were and what the sum must be. You need to pay attention to what the meaning of each letter is if you want to compare the book's formula to either of the videos.

Related Question