Number of Arrangements of n Objects of m Types/Examples/2 Types

Example of Use of Number of Arrangements of $n$ Objects of $m$ Types
Let $S$ be a collection of $n$ objects, consisting of:
 * $p$ objects of one type
 * $q$ objects of another type.

The total number $N$ of different arrangements of $S$ is given by:
 * $N = \dfrac {n!} {p! \, q!}$

Proof
An arbitrary arrangement can be made into $p!$ arrangements if the $p$ objects of type $1$ are replaced by $p$ objects that are all different.

Similarly, an arbitrary arrangement can be made into $q!$ arrangements if the $q$ objects of type $2$ are replaced by $q$ objects that are all different.

The total number of arrangements, if all objects are different, would be $n!$

Hence:
 * $n! = N \times p! \times q!$

Hence the result.