What are Permutations and combinations?

Often everything that we do can be done in more than one ways, therefore, knowing about all the possible ways could be interesting.

Factorial - It is product of all natural nnumbers up to that number.

General formula - n x (n-1) x (n-2) ..... 1 

4! = 4 x 3 x 2 x1

 

Permutations - Permutation is the no. of ways of arrangements which can be made by take some or all items at a time. In permutations, order of things matter

For example - AB and BA are two two different ways.

nPr = n!/(n-r)!

 

Combinations - No. of ways in which things can be selected. In combinations, order doesn't matter.

nCr = n!/(n-r)! x r!