What's the Difference?
In English we use the word "combination" loosely, without thinking if the order of things is important. In other words:
"My fruit salad is a combination of apples, grapes and bananas" We don't care what order the fruits are in, they could also be "bananas, grapes and apples" or "grapes, apples and bananas", its the same fruit salad.
"The combination to the safe was 472". Now we do care about the order. "724" would not work, nor would "247". It has to be exactly 4-7-2.
So, in Mathematics we use more precise language:
If the order doesn't matter, it is a Combination.
If the order does matter it is a Permutation.
Permutations
There are basically two types of permutation:
'n' is number of items to choose from, 'r' is the sample size(number of items to choose from 'n')
Repetition is Allowed: n ^ r
No Repetition: n!/(n - r)!
Combinations
Repetition : (n+r-1)!/r!(n-1)!
No Repetition : n!/r!(n-r)!
from this
Excellent use case for Combinations is birthday problem, to figure out matching birthday's from list of people. In this case of 23 people, we could use Combinations without repetitions

No comments:
Post a Comment