I have been working on the following problem:
How many integer solutions are there to the equation:
$$x_1+x_2+x_3+x_4=11$$
where each $x_i$ satisfies the constraint $0 ≤ x_i ≤ 3$ for each $i$.
I found the answer to be number of solutions = $4$, since the only way to get a result $= 11$ would be by adding $3+3+3+2$, meaning there must be three $3$s and one $2$ added together in any order.
However, I am curious to know of a better way of approaching such a problem.
I know that the stars and bars method can be used to count the number of non-negative integer solutions without constraints, but I'm unsure how to apply inclusion-exclusion to account for the upper limit of $3$ on each $x_i$. Could someone walk me through the steps to apply inclusion-exclusion to this problem and calculate the number of valid solutions?