Permutation and Combination
1 min readApr 11, 2022
Permutation
It is the different arrangements of a given number of elements.
nPr = n! / (n — r)!
- Here
nPr
is, No of permutations whenr
elements are arranged out of a total ofn
elements. - Eg. Let
n
= {A, B, C, D} andr
= 2. Then the permutations are AB, AC, AD, BA, BC, BD, CA, CB, CD, DA, DB and DC.
Combination
It is the different selections of a given number of elements.
n C r = n! / [ (r !) x (n — r)! ]
and, the simplified formula is
n C r = n C (n — r)
- Here
nCr
is, No of combinations whenr
elements are selected out of a total ofn
elements. - Eg. Let n = {A, B, C, D} and r = 2. Then the permutations are AB, AC, AD, BC, BD, and CD.
Note
- For permutation, AB and BA are two different things.
- For selection, AB and BA are the same.
Sample problems
Refer to the sample problems in Geeks for Geeks for better understanding.