In a bag I have:
- Five 10c coins
- Two 25c coins
If I pick out three coins from the bag. What are all the possible amounts of money I could have.
The answer is:
- 30c (3x10c coins),
- 45c (1x25c coins, 2x10c coins)
- 60c (2x25c coins, 1x10c coins)
I am looking for a formula that I can generalise to any number of coins in the bag, or coins picked out of it.
I know that I can work out combinations with $$nCr=\frac{n!}{k!(n-k)!}$$ However I am not sure how I can use this with duplicate items. (eg. more than one 10c coin)