Most of us are already introduced to permutation and combination in high school math classes. I understand clearly what they separately define. But I get confused easily between their equations because they never made sense to me. This post is my attempt to make sense of the following equations.
Pn,r=n!(nr)!Cn,r=n!(nr)! r!P_{n,r} = \frac{n!}{(n-r)!} \\ C_{n,r} = \frac{n!}{(n-r)!\ r!}

Permutation

I will attempt to figure out the number of ways to select 2 characters out of 3. The characters are {ABC}, n=3,r=2n=3, r=2. How many ways can I select 2 out of 3 characters? The answer is given by the permutation equation. Let me break it down to options. During the first selection, I have 3 options {ABC}, which will leave me 2 options for the second and for the final selection only 1 option will be left. As I get 3 options for the first, and for each of those first options, I get 2 sub-options, I have a total of 3×2=63 \times 2 = 6 options. However, it is not close to the Pn,rP_{n,r} equation, but we will reach there. Now let me select 3 out of 3. We can assume the pattern will hold, 3×2×1=63 \times 2 \times 1 = 6 options again. Similarly, 3 options to select 1 out of 3. Notice that, we are only multiplying rr numbers (even though we don’t know what those numbers are) for selecting rr out of nn. This is where the equation makes sense. n!n! gives us all the ways to select nn out of nn.

x!x! is read as ‘x factorials’. A factorial of a number is defined as x!=x×(x1)×(x2)×...×1x! = x \times (x-1) \times (x-2) \times ... \times 1. Here is an example, 5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120

Let’s make the example set {ABCDE}. For selecting 5 out of 5, I will have 5!=5×4×3×2×15! = 5 \times 4 \times 3 \times 2 \times 1 options. To select 3 out of those 5, 5×4×35 \times 4 \times 3 options are available, which do not have 2×12 \times 1 in it, meaning 5!5! is getting divided by 2×1=2!=(53)!2 \times 1 = 2! = (5-3)! . There is a simple explanation for this division. Look at the numerator, we are selecting 5 characters when we only wanted 3. And, I have seen in earlier examples with {ABC} that for each first options there are 2 more sub-options. In the numerator, while selecting each 3rd character, instead of stopping, it also has 2!2! more sub-options and selecting them. Consider an iteration for example, while selecting 3 out of 5 in {ABCDE}, one of the iteration of 5!5! will select B, select D, select C and then continue on to select E and A. And another iteration will select B, select D, select C and then select A and E. Those sub-options {AE,EA} are extra and I don’t want them in my counting. As those two characters were selected in 2!2! ways, to remove them, put the same in denominator.

Combnination

Permutation gave us ways to select rr out of nn characters. P3,3P_{3,3} of {ABC} is {ABC, ACB, CAB, BAC, BCA, CBA}. Note that, these are samne characters only in different order. So, order matters in permutation, unlike combination. C{3,3}C_\{3,3\} of {ABC} is 1, only {ABC}. How does combination achieve this? From, the equation we see that it first calculates Pn,rP_{n,r} and then divides by r!r! . In previous section, we learned that to remove some subset of permutation, we divide. The only thing to understand here is which permutations are we removing? For C3,3C_{3,3} , we see that result 1 comes from 3!3! 0!=66\frac{3!}{3!\ 0!} = \frac{6}{6} . It is evident by the same numerator and denominator that what is essentially happening here is, {ABC,ACB,CAB,BAC,BCA,CBA}{ABC,ACB,CAB,BAC,BCA,CBA}\frac{\{ABC, ACB, CAB, BAC, BCA, CBA\}}{\{ABC, ACB, CAB, BAC, BCA, CBA\}} . It seems the denominator is duplicates of the parent characters {ABC} (remember, order does not matter here, ABC, BCA is same thing in combination). And how many ways can 2 characters be duplicate, for example, {AB}? That will be 2!2! ways, {AB,BA}. That is why for C3,2C_{3,2} , P3,2P_{3,2} is divided by 2!2! . We first get all the ways to select 2 characters out of 3 (which is P3,2P_{3,2} ), and then divide by how many ways 2 characters can be duplicated.

Updated:

Comments