Ordered selection of items from a given set is called permutation.
Selection of items from a given set is called combination.
For the given set: [1, 2, 3]:
Combinations of size 2 (3C2):
Permutations of size 2 (3P2):
Combinations of size 2 (3C2):
[1, 2]
[1, 3]
[2, 3]
Permutations of size 2 (3P2):
[1, 2]
[2, 1]
[1, 3]
[3, 1]
[2, 3]
[3, 2]
nPr = n! (n − r)!
| n | : Total number of items to choose from |
| r | : Number of items to choose |
nPr = nr
nCr = n! (n − r)! r!
nCr = (r + n − 1)! (n − 1)! r!