Permutations and Combinations
Permutation
- Is associated with arranging things in a different order.
- The order of things matters.
Simple Example
If you have 3 letters A, B, C, and you order them like this: ABC, ACB, BCA.
So now you have 3 permutations. Because order is important, ABC, ACB, and BCA are different things for permutations.
Simple Example 2
If you have the letters: A, B, C, D, and I want you to give me how many different ways you can arrange 2 of the four letters?
- You can make a list for possible arrangements like this: AB, AC, AD, BA, BC, BD, CA, CB, CD, DA, DB, DC.
- Note: You can't duplicate things when you try to arrange letters, like AA, BB, CC, or DD. These are not possible arrangements.
- Now count our list of arrangements, you will find 12.
Math rule
Now you can see that finding a permutation will consume more time, if the question is more complex, like: find different ways to arrange 3 letters of the 26 letters?
So you will waste your time listing them, which may lead to many mistakes.
So now we have a mathematical rule that helps us to express permutations, and an equation to find the answer faster.
To express permutation, we used this: nPr:
- n is the whole number of things, like 4 in our last sample example.
- r is the number of things that I will arrange in a single way, like 2 in our last simple example.
- P is just a short expression for Permutation word.
The Permutation rule is: nPr = n!/(n-r)!:
- n!: is n factorial, factorial is the product of all numbers from n to 1: like if I say: 3! (3 factorial) it's equal: 3 * 2 * 1 = 6.
- r!: is r factorial.
How do we get the rule of Permutation for distinct things
Imagine with me that you have 5 letters, and you need to know how many words of length 3 letters you can create with these 5 letters, without using every letter just once in each word.
So now go with me step by step:
- Firstly, imagine that you have 3 blank ears like this: __ __ __. And you have 5 letters to use.
- Now, how many possible letters can you add in the blank area? The answer is absolutely, you can put any letter from the 5 letters. So now for the 1st blank area, you have 5 possibilities.
- For the 2nd blank area, how many letters can you possibly add there?! The answer is 4.
- If you ask why 4? The basic answer is because when you add any letter of the 5's to the 1st blank area, you will not use this letter again, so now you have just one possible 4 letters, you can choose one of them to add.
- Now you can see that for the 1st blank area, you have a possible 5 letters you can add, and for each one of the 5 letters that can be in the 1st blank area, you have possible 4 letters, can be in the 2nd area. So you now can expect there are 20 possibilities for just how to arrange the 5 letters in the 1st 2 blank areas.
- Now, for the 3rd blank area, what possible letters can you add to it? I expect you to answer this by yourself, it's 3 letters.
- Now, for each one of the 20 possible arrangements for 5 letters in the 1st 2 blank areas, there are 3 possible letters that can be added next to each of the 20 possibilities, it's main there are 20*3 possibilities for how you can arrange 3 letters of 5 letters.
- So all possibilities are equal to 60.
- Now remember what we do, we produce the possibilities of the 1st blank (5 letters) with possibilities of the 2nd blank (4 letters) with the possibilities of the 3rd blank (3 letters) = 5 * 4 * 3 = 60.
- Now, how does this lead us to the permutation rule?!
- Basically, mathmation says the 5 * 4 * 3 is a part of 5! (5 factorial). But we ignored the rest of the 5! specifically (2 * 1).
- So on 5! (5 * 4 * 3 * 2 * 1) How can we delete the 2 * 1? The answer is: by just dividing by 2! (2 * 1).
- So, how can we get the 2 from the base information: 5P3 (arrange 3 letters of 5 letters).
- By subtracting 3 from 5 = 2. And this can work for each question like this that the things that we deal with are unique and there is no duplication.
- So now our rule is nPr = n!/(n-1)!
Simple example:
If you have the letters: A, B, C, D, and I want you to give me how many different ways you can arrange 2 of the four letters?
- This time, will we use our equation: nPr = n!/(n-r)!.
- Our n is the number of things = 4.
- Our r is the number of things in one arrangement = 2.
- 4P2 = 4!/(4-2)! = 4!/2! = 4*3*2*1/2*1 = 4*3 = 12.
Complex example (important)
If you have 5 books, find how many ways you can arrange them. For this question, I have 5 books, and I need to know how many ways I can order them. so my Permutation expression will be like this: 5P5 = 5!/(5-5)! = 5!/0!.
Now you may feel confused because you may think that 0! = 0. This is wrong, 0! = 1. So now we can complete: 5!/0! = 5!/1 = 5! = 5 * 4 * 3 * 2 * 1 = 120.
Permutation for duplicated things:
Assume that you want to know how many times you can arrange the word "amaddisss".
As you learn, you will say it's 9P9, so it's equal to 9!/1, and this is wrong, because of the duplication of a, d, and s.
Your way will calculate amaddisss, amaddisss, amaddisss, amaddisss, amaddisss, amaddisss, amaddiss, amaddiss,... (there are still more) as a multiple arrangement although they are just one way, but you treat the 3 's' letters and 2 'a' letters and 2 'd' letters as: s1, s2, s3, a1, a2, d1, d2. But in fact, they just produce the same word, multiple times.
So there is a unique rule for permutation for duplicated things: n!/(k1!*k2!...):
- The n is the number of things.
- The k1, k2, and so on, are the number of repetitions for each repeated letter.
- In our example 'amaddisss', we have 3 repeated letters, with 3 repetitions for s and 2 repetitions for a and d.
- Now our formula for this question is: 9!/(3! * 2! * 2!)
How do we get the rule of Permutation for duplicated things
Mathematicians started with a simple example like: 'aa'
Now, how many ways can you arrange the latter of the word 'aa'?
With our normal way it will be 2P2 = 2! = 2.
But in reality, it's just 1, so we divide the 2! by 2! to get the right answer.
What about 'aaa'?
Ok thie ways to arrange it are 3P3 = 3! = 6.
Ok, this is wrong, it's just 1. So again, the solution is 3!/3! = 1.
What about this 'aab'? Ok the ways to arrange it is 3P3 = 3! = 6.
Ok, this is wrong because aab is the same as aab if I just swapped the 2 a's.
But from previous work, we know that we divide by the number of repetitions to get the right answer: 3!/2! = 3. Yeah, 3 is the right answer.
What about this 'aabb'?
Now we know that 4! is the wrong answer, and to delete the repetition swapping a's, we will use this 4!/2! = 12.
But this is wrong because we still need to get rid of the repetition of answers that we get from the repetition of b.
We know that we can also get rid of it by taking the last answer 12 and dividing by 2! = 12/2 = 6. And this is the right answer.
Now you don't need to separate the division, you can just multiply them and get the same answer, because we know if I say: (a/b)/c = a/b * 1/c = a/(b*c).
So now our rule is: n!/(k1! * k2! *...)
Compination
- Is concerned about combining things.
- The order of things doesn't matter.
Simple Example
If you have 3 letters A, B, C, and you order them like this: ABC, ACB, BCA.
So there's only 1 combination because order doesn’t matter. ABC, ACB, and BCA all represent the same group of letters in combinations.
Simple Example 2
If you have the letters: A, B, C, D, and I want you to tell me how many different ways we can combine 2 of the 4 letters?
- You can first make a list of possible combinations like this: AB, AC, AD, BC, BD, CD.
- Note: that you can't duplicate things when you try to combine letters, like say: AA, BB, CC, or DD. These are not possible combinations.
- Note Also: In combination order does not matter, so all of: BA, CA, DA, CB, DB, and CD are not possible combinations, because they are just different orders for the same other combinations.
- Now count our list of combinations, you will find 6.
Math rule
Now you can see that finding a combination will consume more time, if the question is more complex, like: find different ways to combine 3 letters of the 26 letters?
So you will waste your time listing them, which may lead to many mistakes.
So now we have a mathematical rule that helps us to express combinations, and an equation to find the answer faster.
To express the combination, we used this: nCr:
- n is the whole number of things, like 4 in our last sample example.
- r is the number of things that I will combine in a single way, like 2 in our last simple example.
- C is just a short expression for a Combination word.
The Combination rule is: nCr = nPr/r! = n!/((n-r)! * r!):
- n!: is n factorial, factorial is the product of all numbers from n to 1: like if I say: 3! (3 factorial) it's equal: 3 * 2 * 1 = 6.
- r!: is r factorial.
How do we get the rule of Combination for distinct things
- The base difference between combination and permutation is that combination is not interested in the order of the things, and for that reason, the combination results are always
<= the permutation results. So, the combination results are part of the permutation. - You can also note that when you get a permutation for unique things, you will always find that the repetition of appearance of the combination of things is equal. like: for a, b, c. when you arrange 2 of them, you get this: ab, ac, ba, bc, ca, cb. You can note that a and b appear with each other twice, and also the same for a, c and c, b.
- And if you want to know how many times can combination of things can be repeated in any permutation, just think about how mach for a number of things you arrange can be repeated. I mean, when I say arrange 3 books, the number of repeated arrangements is basically how many ways they can be arranged, it's
3!(6 ways). - So in any
nPr, each possibility value, if we ignore the order and think about the combination of things, the same unique things combine in different ordersr!times. - So, basically, the combination rule dates this repetition by dividing the result of the permutation by the
r!. - Now our rule:
nPr/r!=(n!/(n-r)!)/r!=(n!/(n-r)!)*1/r!=n!/((n-r)! * r!).
Simple example:
If you have the letters: A, B, C, D, and I want you to tell me how many different ways we can combine 2 of the 4 letters?
- This time, will we use our equation: nCr = nPr/r! = n!/((n-r)!*r!).
- Our n is the number of things = 4.
- Our r is the number of things in one arrangement = 2.
- 4C2 = 4!/((4-2)! * 2!) = 4!/(2!*2!) = 4*3*2*1/2*1*2*1 = 4*3*2*1/4 = 3 * 2 * 1 = 6.




