* I know and understand that there are $\binom{n+r-1}{r-1}$ or $\binom{n+r-1}{n}$ ways to distribute n identical candies to r children. But sometimes, I can't determine which one is r and which one is n.
For instance:
I can do these problems:
Suppose 15 identical marbles are to be selected and put into 5 numbered boxes with any number per box. How many ways this can be done?
Suppose 8 players are to be drafted by 4 teams, each team might win any number of these players. How many ways can these 8 players be drafted?
But I'm confused and don't know how to determine n and r in this case:
- There are 31 flavors of ice cream. You want to buy 5 quarts. If you can pick any number of each 31 flavors, how many options do you have?
Is there a general rule to easily point out which one exactly is r and n?