Inclusion and exclusion in combinatorics You have 15 identical balls and must divide them into 4 drawers stacked on top of each other with the following limitations:


*

*You have at least 2 balls in each drawer

*There will be no more than 5 balls in the top drawer and there will be no more than 5 balls in the bottom drawer
I'm not sure which strategy is correct;
1. Place 2 balls in each drawer, left with 7 balls. we have 10C3 ways to divide those into 4 drawers. from this we don't subtract because if there are more than 5 balls in the top or bottom drawer we cannot have more than 5 in the other.
Or,
2. subtract from 10C3 2*(6C3); where 6C3 stands for dividing the remaining 3 balls (after placing 4 more in either drawer) into 4 drawers.
Thanks,

Generating Function Approach
Inclusion-Exclusion is what the question asks for, and there are some good answers using inclusion-exclusion, but here is another approach using generating functions that gives the same answer as inclusion-exclusion.

By taking the products of the generating functions for the number of ways to have $n$ balls in each drawer,
$$
\begin{align}
{\small\text{first and fourth drawers:}}\quad&x^2\frac{1-x^4}{1-x}=x^2+x^3+x^4+x^5\\
{\small\text{second and third drawers:}}\quad&x^2\frac1{1-x}=x^2+x^3+x^4+\dots
\end{align}
$$
we get the generating function of the number of ways to have $n$ balls total in all drawers
$$
\overbrace{x^2\frac{1-x^4}{1-x}}^{\text{first drawer}}\quad
\overbrace{x^2\frac{1\vphantom{x^4}}{1-x}}^{\text{second drawer}}\quad
\overbrace{x^2\frac{1\vphantom{x^4}}{1-x}}^{\text{third drawer}}\quad
\overbrace{x^2\frac{1-x^4}{1-x}}^{\text{fourth drawer}}\quad
=\quad\overbrace{x^8\frac{(1-x^4)^2}{(1-x)^4}}^{\text{all drawers}}
$$
The series for all drawers is
$$
\begin{align}
x^8\left(1-x^4\right)^2\overbrace{\sum_{k=0}^\infty\binom{-4}{k}(-x)^k}^{(1-x)^{-4}}
&=\left(x^8-2x^{12}+x^{16}\right)\sum_{k=0}^\infty\binom{k+3}{k}x^k\\
&=\sum_{k=0}^\infty\left[\binom{k-5}{k-8}-2\binom{k-9}{k-12}+\binom{k-13}{k-16}\right]x^k
\end{align}
$$
The coefficient for $x^{15}$ is
$$
\binom{10}{7}-2\binom{6}{3}+\overbrace{\binom{2}{-1}}^0
$$
