Permutations & Combinations
Permutation is a selection of r items from a set of n items
and the order of items matters and the repetition of any item may
be allowed, where r <= n.
Combination is an unordered selection of r items from a set of n
items and the order of items does not matter, where r <= n.
Example: In a fruit salad made up of 3 fruits, apples, pears and bananas,
when cut up and mixed, the fruit salad will look and taste the same regardless of
the order in which the 3 fruits are selected, cut and mixed. In this case when the
order does NOT matter it is a combination.
But in the case of a permutation lock as an example, where 3 numbers are
chosen from three sets of 10s, the order does matter. If we consider the
3 numbers to be 3, 4, 5 each is chosen from a 0-9 set. Then the 345 combination
is different from 453 and 543. In this case, the order matters. When the order matters,
it is a permutation. Permutation can have a repetition. For example
the permutation lock can be 555. Therefore a permutation is an ordered selection
of r items from a set of n items where repetition may be allowed or not.
In the table to the right, the exclamation mark ! indicates a factorial of
a number, and it is written to the right of the number. E.g. n! means the
product of all integers from 1 to n inclusive and is called 'n factorial'.
rule, 0! = 1.
Example: 5! = 5 x 4 x 3 x 2 x 1 = 120.