So I'm having a lot of trouble understanding the logic in my Combinatorics class. I've got this question for an assignment:
How many solutions are there to $x_1 + x_2 + x_3 + x_4 = 19$, $x_i \geq 0$ for $1\leq i\leq4$?
I don't think the Principle of Inclusion / Exclusion needs to be applied here. As far as I know, the answer is $\binom{4+19-1}{19} = \binom{22}{19}$. However, I don't understand why this choose with repetition formula is used.
I'm further confused with the second part of the question: How many solutions are there to $x_1 + x_2 + x_3 + x_4 = 19$, $0 \leq x_i < 8$ for $1 \leq i \leq 4$?
An example in the textbook shows that the Principle of Inclusion and Exclusion must be used at this point. My understanding is that we consider four cases, $c_1, c_2, c_3, c_4$, which respectively represent the cases where $x_1, x_2, x_3, x_4$ each are greater than 7. Then, the answer to the problem is the total number of solutions to $x_1 + x_2 + x_3 + x_4$ minus $S_1$ (the number of cases where one of the $x$ values is greater than 7) plus $S_2$ (the number of cases where two of the $x$ values are greater than 7) minus $S_3$ (the number..three of the $x$ values are greater than 7).
If someone could please confirm my understanding of the application of PIE, and provide some inside as to WHY were using the choose repetition formula to solve these problems (I only know the choose formula as picking 4 people from 12 to form a committee, etc)
Cheers!!