Fundamental principle of counting (multiplication rule): If a first operation can be performed in 'p' ways and a second operation can be performed in 'q' ways, then the two operations together can be performed in 'p × q' ways. For example, if a first operation can be performed in 4 ways and a second operation can be performed in 5 ways, then the two operations together can be performed in 4 × 5 = 20 ways.

The above principle can be extended to the case in which the different operations can be performed in p, q, r, s, ..... ways. In this case, the number of ways of performing all the operations together would be p × q × r × s ..... ways. For example, if four different operations can be performed in 2, 3, 4 and 5 ways, then the four operations together can be performed in 2 × 3 × 4 × 5 = 120 ways.

Fundamental principle of counting (addition rule): If there are two assignments such that they can be performed independently in p and q ways respectively, then either of the two assignments can be performed in (p + q) ways. For example, if there are two assignments such that they can be performed independently in 4 and 5 ways respectively, then either of the two assignments can be performed in 4 + 5 = 9 ways.

Derangement is permutation of a set, such that no element appears in it's original position. Example: Suppose there are n letters which are numbered 1, 2, ..... n. Let there be 'n' envelops also numbered 1, 2, ... n.
An arrangement where letters are put inside envelops such that no letter is in it's corresponding envelop, is called a derangement.
Let 'dn' represent the no. of derangements when 'n' letters and 'n' envelops are involved.
Let us put first letter in ith envelop. This ith envelop can be selected in 'n – 1' ways.
There are two possibilities, depending on whether ith letter is put in 1st envelop in return. The two cases are dealt at the adjacent with the conclusion that the two are mutually exclusive.