You have $n$ objects to arrange in $n$ slots. But some of the objects are identical. There are $k$ different types of objects and there are $n_{i}$ objects of the $i^{\text {th }}$ type. Therefore, $\sum_{i=1}^{k} n_{i}=n$.

How many arrangements of these objects are there?
The simplest approach is perhaps to consider all objects as different at first. There are thus $n$! ways to arrange them. However, the same solutions are counted multiple times because some objects are identical. If we consider that only the $n_{i}$ objects of the $i^{\text{th}}$ type are indistinguishable (and all others are distinct), then we count $n_{i}$! times each solution because each permutation of objects of the $i^{\text{th}}$ type is possible. Thus, we count $n_{1}!\cdot n_{2}!\ldots . . . n_{k}$! times the same solution when all objects are considered different. Therefore, there are

$$
\frac{n!}{n_{1}!\cdot n_{2}!\ldots . . . n_{k}!}
$$

different arrangements of these objects.

We will find this number in exercise $[8$