In how many ways can ten distinct objects be placed in seven distinct boxes if no box is left empty?
Method 1: The number $10$ can be partitioned into seven parts in three ways.
\begin{align*}
10 & = 4 + 1 + 1 + 1 + 1 + 1 + 1\\
& = 3 + 2 + 1 + 1 + 1 + 1 + 1\\
& = 2 + 2 + 2 + 1 + 1 + 1 + 1
\end{align*}
Four objects placed in one box and one object apiece placed in each of the other boxes: Choose which box receives four objects, choose which four objects it receives, then distribute the remaining six objects to the remaining six boxes so that one object is placed in each of those boxes. This can be done in
$$\binom{7}{1}\binom{10}{4}6!$$
ways.
Three objects placed in one box, two objects placed in another box, and one object apiece placed in each of the other boxes: Choose which box receives three objects, choose which three objects it receives, choose which of the other boxes receives two objects, choose which two of the remaining objects it receives, then distribute the remaining five objects to the remaining five boxes so that one object is placed in each of those boxes. This can be done in
$$\binom{7}{1}\binom{10}{3}\binom{6}{1}\binom{7}{2}5!$$
ways.
Two objects apiece place in three boxes and one object apiece placed in each of the remaining boxes: Choose which three boxes receive two objects each. Suppose the boxes are lined up from left to right. Place two objects in the leftmost box that has been selected to receive two objects, two of the remaining objects in the middle box that has been selected to receive two objects, and two of the remaining objects to be placed in the rightmost box that has been selected to receive two objects. Distribute the remaining four objects to the remaining four boxes so that one object is placed is placed in each of those boxes. This can be done in
$$\binom{7}{3}\binom{10}{2}\binom{8}{2}\binom{6}{2}4!$$
ways.
Total: Since these three cases are mutually exclusive and exhaustive, the number of ways of distributing ten distinct objects to seven distinct boxes so that no box is left empty is
$$\binom{7}{1}\binom{10}{4}6! + \binom{7}{1}\binom{10}{3}\binom{6}{1}\binom{7}{2}5! + \binom{7}{3}\binom{10}{2}\binom{8}{2}\binom{6}{2}4!$$
Method 2: We use the Inclusion-Exclusion Principle.
If there were no restrictions, we would have seven choices for each of the ten objects. Therefore, there are $7^{10}$ ways to distribute ten distinct objects to seven distinct boxes without restriction.
From these, we must subtract those distributions in which at least one box is left empty. There are $\binom{7}{k}$ ways to select $k$ boxes to be left empty and $(7 - k)^{10}$ ways to distribute the objects to the remaining $7 - k$ boxes. Thus, by the Inclusion-Exclusion Principle, the number of ways ten distinct objects can be distributed to seven distinct boxes if no box is left empty is
$$\sum_{k = 0}^{7} (-1)^k\binom{7}{k}(7 - k)^{10} = 7^{10} - \binom{7}{1}6^{10} + \binom{7}{2}5^{10} - \binom{7}{3}4^{10} + \binom{7}{4}3^{10} - \binom{7}{5}2^{10} + \binom{7}{6}1^{10} - \binom{7}{7}0^{10}$$
In how many ways can $m$ distinct objects be placed in $n$ distinct boxes if no box is left empty, where $m \geq n$?
Apply the Inclusion-Exclusion Principle.
$$\sum_{k = 0}^{n} (-1)^k\binom{n}{k}(n - k)^m$$