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,
 A: Your first approach is incorrect since the restriction that you can place no more than five balls in the top drawer and no more than five balls in the bottom drawer means you can place at most three additional balls in the top drawer or at most three additional balls in the bottom drawer once you have placed two balls in each drawer.  
The answer you obtained using the second method is correct, but your description of how you obtained it is not worded correctly.  
A detailed solution is shown below:
The number of ways $15$ identical balls can be placed in four vertically stacked drawers subject to the restrictions that there are at least two balls in each drawer and no more than five balls in the top drawer and no more than five balls in the bottom drawer is the number of solutions in the integers of the equation 
$$x_1 + x_2 + x_3 + x_4 = 15$$
subject to the restrictions $2 \leq x_1 \leq 5$, $x_2 \geq 2$, $x_3 \geq 2$, and $2 \leq x_4 \leq 5$.  
To handle the condition that $x_i \geq 2$ for $1 \leq i \leq 4$, let $y_i = x_i - 2$ for $1 \leq i \leq 4$.  Then
\begin{align*}
x_1 + x_2 + x_3 + x_4 & = 15\\
y_1 + 2 + y_2 + 2 + y_3 + 2 + y_4 & = 15\\
y_1 + y_2 + y_3 + y_4 & = 7
\end{align*}
The number of solutions of the equation $y_1 + y_2 + y_3 + y_4 = 7$ in the non-negative integers subject to the restrictions that $y_1 \leq 3$ and $y_4 \leq 3$ represents the number of ways we can distribute seven balls into the four drawers after two balls have been placed in each drawer provided that we place no more than three additional balls in the top drawer and no more than three additional balls in the bottom drawer.  
To determine the number of solutions of the equation 
$$y_1 + y_2 + y_3 + y_4 = 7$$
in the non-negative integers subject to the restrictions $y_1 \leq 3$ and $y_4 \leq 3$, we must subtract the number of solutions in which $y_1 > 3$ or $y_4 > 3$ from the total number of solution in the non-negative integers.  
The number of solutions of the equation $y_1 + y_2 + y_3 + y_4 = 7$ in the non-negative integers is the number of ways we can place three addition signs in a list of seven ones, which is
$$\binom{7 + 3}{3} = \binom{10}{3}$$ 
To determine the number of solutions in which $y_1 > 3$, let $z_1 = y_1 - 4$.  Then 
\begin{align*}
z_1 + 4 + y_2 + y_3 + y_4 & = 7\\
z_1 + y_2 + y_3 + y_4 & = 3
\end{align*}
which has 
$$\binom{3 + 3}{3} = \binom{6}{3}$$
solutions in the non-negative integers.  By similar reasoning, there are also $\binom{6}{3}$ solutions in which $y_4 > 3$.  Since it is not possible for both $y_1 > 3$ and $y_4 > 3$, the number of ways fifteen identical balls can be placed in four vertically stacked drawers if at least two balls are placed in each drawer and no more than five balls are placed in the top drawer and no more than five balls are placed in the bottom drawer is 
$$\binom{10}{3} - 2 \cdot \binom{6}{3}$$  
A: The first approach is not right: you've included cases where the top drawer has more than 5 balls (and similarly for the bottom drawer).  You seem to be interpreting the "and" in the second condition in a way I would consider unexpected: "X is not true and Y is not true" being parsed as "X and Y are both not true" rather than "neither X nor Y is true".
I can't make sense of the second approach: where do the $4$ balls go (and how many ways can they go there?)?
Anyway, if I was going to answer the question, I'd whip up a table.  If we put $b \in \{2,3,4,5\}$ balls in the bottom drawer and $t \in \{2,3,4,5\}$ balls in the bottom drawer, then how many ways can the remaining balls be arranged?  Write that in the table:
$$
\begin{array}{r|rrrr}
  & t=2 & 3 & 4 & 5 \\
\hline
b=2 & ? & ? & ? & ? \\
3 & ? & ? & ? & ? \\
4 & ? & ? & ? & ? \\
5 & ? & ? & ? & ? \\
\end{array}
$$
Then add up the numbers in the table to get the answer.
A: As noted above, your second answer is correct. 
After putting 2 balls in each drawer, we have 7 balls left to distribute, 
so there are a total of $\dbinom{10}{3}$ ways to do this, as you say.
Now let $A_1$ be the distributions with at least 4 of the remaining 7 balls in drawer 1, 
and let $A_2$ be the distributions with at least 4 of the remaining 7 balls in drawer 4.
Then $|A_1^c\cap A_2^c|=\dbinom{10}{3}-|A_1|-|A_2|+|A_1\cap A_2|=\dbinom{10}{3}-2\dbinom{6}{3}$.
A: 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
$$
