Determining the number of non-negative integer solutions of the equation $x_1 + x_2 + x_3 + x_4 + x_5 = 100$ with restrictions a. $$x_{1} + x_{2} + x_{3} + x_{4} + x_{5} \leq 100; x_{1} \geq 4, x_{2} > 2$$
This is how I approached this problem: $$x _{1}^{'} = x_{1} - 4$$ and $$x _{2}^{'} = x_{2} - 3.$$ Then $$x _{1}^{'} + x _{2}^{'} + x_{3} + x_{4} + x_{5} \leq 93 $$
And from here I just solved it the way I solved the other questions and got $$\binom{98}{5}$$ Is this how you do it. Due to the restriction I am really confused.
b. $$x_{1} + x_{2} + x_{3} + x_{4} + x_{5} = 100; x_1 < 20$$
For this one I think you do  $$x _{1}^{'} = x_{1} - 19$$ and $$x _{1}^{'} + x _{2} + x_{3} + x_{4} + x_{5} = 81 $$ and Solve it to get $$\binom{85}{4}$$
Or am I suppose to do it in a different way? Thank you.
 A: Your answer to the first question is correct.  
For the second question, we must exclude those solutions of the equation 
$$x_1 + x_2 + x_3 + x_4 + x_5 = 100 \tag{1}$$ 
in which $x_1 \geq 20$.  The number of solutions of equation 1 in the non-negative integers is the number of ways four addition signs can be inserted into a row of $100$ ones, which is 
$$\binom{100 + 4}{4} = \binom{104}{4}$$
since we must choose which four of the $104$ symbols ($100$ ones and $4$ addition signs) will be addition signs.
Now, we exclude those solutions in which $x_1 \geq 20$.  Assume $x_1 \geq 20$.  Let $x_1' = x_1 - 20$.  Then $x_1'$ is a non-negative integer.  Substituting $x_1' + 20$ for $x_1$ in equation 1 yields
\begin{align*}
x_1' + 20 + x_2 + x_3 + x_4 + x_5 & = 100\\
x_1' + x_2 + x_3 + x_4 + x_5 & = 80 \tag{2}
\end{align*}
Since equation 2 is an equation in the non-negative integers with 
$$\binom{80 + 4}{4} = \binom{84}{4}$$
solutions, there are $\binom{84}{4}$ solutions of equation 1 in which $x_1 \geq 20$.  
Hence, the number of solutions of equation 1 in which $x_1 < 20$ is 
$$\binom{104}{4} - \binom{84}{4}$$
