Find the total number of selections of r things from n different things when each thing can be repeated unlimited number of times? Find the total number  of selections of r things from n different things when each thing can be repeated unlimited number of times ?
I know that the formula is $$ n+r-1\choose r  $$
But how do we get this formula ? 
How the problem stated above is equivalent to choosing $r$ things from $n+r-1$ things?
 A: The method of 'stars and bars' comes in handy here.  
For instance if you are selecting $r=9$ things from $n=4$ different types.  Then any sequence of $3$ bars and $9$ stars represents a selection, where the bars are separators between the types, and stars are items selected.  For instance
$**|****|***| $
represents selecting two things of type 1, four of type 2, three of type 3, and none of type 4.
Thus there are ${12}\choose{9}$ possible ways to make the selection.
A: Modifying the above solution a little bit to give a better perspective to solution.
For instance if you are selecting $r=9$ things from $n=4$ different types. Then any sequence of 3 bars and 9 stars represents a selection, where the bars are separators between the types, and stars are items selected. For instance
∗∗|∗∗∗∗|∗∗∗|
represents selecting two things of type 1, four of type 2, three of type 3, and none of type 4.
Thus we have to decide where to place bars and then the partitions created will automatically be the combinations.
we have 12 empty positions have we have 3 bars thus solution is $^{12}C_3$ which is same as $^{12}C_9$ 
