Determine the number of integer solutions of $x_{1}+x_{2}+x_{3}+x_{4}=32$ where $x_{1},x_{2},x_{3}>0, \space\space 0Determine the number of integer solutions of $$x_{1}+x_{2}+x_{3}+x_{4}=32,$$ where $x_{1},x_{2},x_{3}>0, \space\space 0<x_{4}\leq25$.

My approach is in finding all the solutions with the restriction of $x_{i}>0, 1\leq i \leq4$ and then subtracting the number of solutions given by $x_{4}>25$.
So, for $x_{i}>0, 1\leq i \leq4$ I have got ${31 \choose 28}$ integer solutions. For $x_{4}>25$ would I be considering four cases (i.e. $x_{4}=26, x_{4}=27, x_{4}=28, x_{4}=29$) along with counting the possible integer solution amongst $x_{1},x_{2},x_{3}$? 
Is this the correct approach?
Thanks in advance.
 A: Hint: consider cases where $x_4 > 25$ since you only have to deal with $4$ cases in total.Also take into account that $x_1 > 0 \Rightarrow x_1 = 1+y_1, y_1 \geq 0$, same for $x_2, x_3$.
A: We wish to find the number of solutions in the positive integers of the equation
$$x_1 + x_2 + x_3 + x_4 = 32$$
subject to the restriction that $x_4 \leq 25$.  
We can reduce this to the equivalent problem in the non-negative integers by making the substitutions $y_i = x_i - 1$, $1 \leq i \leq 4$. 
\begin{align*}
x_1 + x_2 + x_3 + x_4 & = 32\\
y_1 + 1 + y_2 + 1 + y_3 + 1 + y_4 + 1 & = 32\\
y_1 + y_2 + y_3 + y_4 & = 28
\end{align*}
The number of solutions of the equation $y_1 + y_2 + y_3 + y_4 = 28$ subject to the restriction that $y_4 \leq 24$ in the non-negative integers is equal to the number of solutions of the equation $x_1 + x_2 + x_3 + x_4 = 32$ subject to the restriction that $x_4 \leq 25$ in the positive integers. 
To determine the number of solutions of the equation 
$$y_1 + y_2 + y_3 + y_4 = 28$$
subject to the restriction that $y_4 \leq 24$, we subtract the number of solutions in the non-negative integers in which $y_4$ exceeds $24$ from the total number of solutions in the non-negative integers.
The number of solutions of the equation 
$$y_1 + y_2 + y_3 + y_4 = 28$$
in the non-negative integers is the number of ways we can insert three addition signs in a list of $28$ one's, which is 
$$\binom{28 + 3}{3} = \binom{31}{3}$$
To determine the number of solutions of the equation
$$y_1 + y_2 + y_3 + y_4 = 28$$
in the non-negative integers in which $y_4$ exceeds $24$, let $z_4 = y_4 - 25$.
\begin{align*}
y_1 + y_2 + y_3 + z_4 + 25 & = 28\\
y_1 + y_2 + y_3 + z_4 & = 3
\end{align*}
The number of solutions of the equation $y_1 + y_2 + y_3 + z_4 = 3$ in the non-negative integers is equivalent to the number of solutions in the non-negative integers of the equation 
$$y_1 + y_2 + y_3 + y_4 = 28$$
in which $y_4$ exceeds $24$.  The number of solutions of the equation 
$$y_1 + y_2 + y_3 + z_4 = 3$$
in the non-negative integers is the number of ways in which three addition signs can be placed in a list of three one's, which is
$$\binom{3 + 3}{3} = \binom{6}{3}$$
Thus, the number of solutions in the positive integers of the original equation subject to the restriction that $x_4 \leq 25$ is 
$$\binom{31}{3} - \binom{6}{3}$$
