Formula for number of combinations?

Davlam

New member
Joined
Aug 5, 2015
Messages
1
I am making a game that includes an alchemy system. You can combine 3 ingredients to create something. You can combine 3 of the same ingredient or mix them up. The order of the ingredients doesn't matter Ex. a+b+c will produce the same thing as c+a+b. If I have 3 ingredients I should have 10 combinations:

AAA
BBB
CCC
ABB
ACC
BAA
BCC
CAA
CBB
ABC

What would the formula be to figure out how many combinations there would be for, say, 10 ingredients?
 
I am making a game that includes an alchemy system. You can combine 3 ingredients to create something. You can combine 3 of the same ingredient or mix them up. The order of the ingredients doesn't matter Ex. a+b+c will produce the same thing as c+a+b. If I have 3 ingredients I should have 10 combinations:
AAA, BBB, CCC, ABB, ACC, BAA, BCC, CAA, CBB, ABC
What would the formula be to figure out how many combinations there would be for, say, 10 ingredients?
This is known as multi-selection, \(\displaystyle \dbinom{K+N-1}{K}\), \(\displaystyle K\) is the number selected and \(\displaystyle N\) is the number of types that can be selected.

In this case \(\displaystyle K=N\).
 
Top