Combinations and Permutations
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. |
If the order doesn't matter, it is a Combination. | |
If the order does matter it is a Permutation. |
So, we should really call this a "Permutation Lock"! |
A Permutation is an ordered Combination.
Permutations
There are basically two types of permutation:- Repetition is Allowed: such as the lock above. It could be "333".
- No Repetition: for example the first three people in a running race. You can't be first and second.
1. Permutations with Repetition
These are the easiest to calculate.In other words, there are n possibilities for the first choice, THEN there are n possibilites for the second choice, and so on, multplying each time.
n × n × ... (r times) = nr
Example: in the lock above, there are 10 numbers to choose from (0,1,..9) and you choose 3 of them:
So, the formula is simply:
10 × 10 × ... (3 times) = 103 = 1,000 permutations
nr |
where n is the number of things to choose from, and you choose r of them (Repetition allowed, order matters) |
2. Permutations without Repetition
In this case, you have to reduce the number of available choices each time.For example, what order could 16 pool balls be in?
After choosing, say, number "14" you can't choose it again.
So, your first choice would have 16 possibilites, and your next choice would then have 15 possibilities, then 14, 13, etc. And the total permutations would be:
16 × 15 × 14 × 13 × ... = 20,922,789,888,000
But maybe you don't want to choose them all, just 3 of them, so that would be only:
16 × 15 × 14 = 3,360
In other words, there are 3,360 different ways that 3 pool balls could be selected out of 16 balls.where n is the number of things to choose from, and you choose r of them (No repetition, order matters) |
10! | = | 10! | = | 3,628,800 | = 90 |
(10-2)! | 8! | 40,320 |
(which is just the same as: 10 × 9 = 90)
Combinations
There are also two types of combinations (remember the order does not matter now):
- Repetition is Allowed: such as coins in your pocket (5,5,5,10,10)
- No Repetition: such as lottery numbers (2,14,15,27,30,33)
web
No comments:
Post a Comment