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

Example of Use of Number of Arrangements of $n$ Objects of $m$ Types
Let $S$ be a collection of $\paren {p + q + r}$ objects.

Let $S$ need to be partitioned into $3$ subsets of size $p$, $q$ and $r$ such that $p \ne q$, $q \ne r$ and $r \ne p$.

The total number $N$ of ways this can be done is:
 * $N = \dfrac {\paren {p + q + r}!} {p! \, q! \, r!}$

Proof
The number of ways of choosing $p$ from $\paren {p + q + r}$ is $\dbinom {p + q + r} p$.

The number of ways of choosing $q$ from the remaining $\paren {q + r}$ is $\dbinom {q + r} q$.

We are left with the remaining $r$.

Hence $N$ can be given by:

Hence the result.