Combinatorics: Number of Integer Solutions for $x_1 + x_2 + x_3 + x_4 + x_5 + x_6 < 56$?

Number of integer solutions for $$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 < 56$$ where:

a) $$x_i \geq 0$$, for $$1 \leq i \leq 6$$

b) $$x_i \geq -2$$, for $$1 \leq i \leq 6$$

For part (a) the answer I got is $$C(60,6) = 50,063,860$$. Is this correct? I'm not sure how to do (b).

• For (b), define $y_i=x_i+2$, then substitute. Note that $y_i \geq 0$. – Anurag A Oct 4 '18 at 4:45

Alternatively, for Part (a), let $$x_7:=55-x_1-x_2-x_3-x_4-x_5-x_6\,.$$ Therefore, we are to solve for $$(x_1,x_2,\ldots,x_7)\in\mathbb{Z}_{\geq 0}^7$$ from the equation $$x_1+x_2+\ldots+x_7=55\,.$$ There are, by the star-and-bar method, $$\binom{55+7-1}{7-1}=55525372$$ solutions, as confirmed by Anurag A.
For Part (b), with the substitution $$y_i:=x_i+2$$ and $$y_7:=67-y_1-y_2-y_3-y_4-y_5-y_6\,,$$ we are to solve for $$\left(y_1,y_2,\ldots,y_7\right)\in\mathbb{Z}_{\geq 0}^7$$ from the equation $$y_1+y_2+\ldots+y_7=67\,.$$ As before, there are $$\binom{67+7-1}{7-1}=170230452$$ solutions.
For (a). solutions to the inequality $$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 < 56$$ are the union of the solution set of ALL of the following equations. $$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = k \quad \text{ where } k \in \{0,1,2, \ldots ,55\}.$$ For a given $$k$$, the number of solutions are given by $$\binom{k+6-1}{6-1}=\binom{k+5}{5}.$$ So the total number of solutions for the inequality will be $$\sum_{k=0}^{55}\binom{k+5}{5}=\color{blue}{55525372}.$$
For (b), define $$y_i=x_i+2$$, then substitute. Note that $$y_i \geq 0$$. Now use the method of (a).