A dice is rolled four times. In how many ways we can get total of 17?
We can solve this by finding coefficient of $x^{17}$ in the ordinary enumerator $(x+x^2+x^3+x^4+x^5+x^6)^4$. But I feel this requires little bit more effort.
We can directly solve similar problem like:
In how many ways we can select four positive non zero integers having total of 17
as $\binom{17-1}{4-1}$ (since we have to select 3 positions out of 16 separating 17 objects for them to be divided in 4 groups). This way we dont have to go for enumerator. How solution to the original problem can be obtained with such combinatorial argument instead of using generating function?
Or may be I can rephrase the problem as what is the direct formula for such question where we have upper limit on number of objects of particular type to be selected (6 in case of dice) to get particular sum. When their is no upper limit the formula turns out to be $\binom{n-1}{r-1}$.
Note: Second problem can be solved by finding coefficient of $x^{17}$ in $(x+x^2+x^3+x^4+...)^4$, the approach which I dont want to follow for the first problem.
Using the "balls and bins" analogy, what we can do is to pre-place $6$ in one or more of the "bins". All such results are sure to violate the constraint, and applying inclusion-exclusion to exclude them, we arrive at the desired answer.
For the particular example, $\binom{16}{3} - \binom41\binom{10}{3} + \binom42\binom43 = 104$
If you want to generalize the formula, if L is the upper limit ($6$ for dice),
$$F(n,r,L) = \sum_{j=0}^J(-1)^j \binom{r}{j}\binom{n-1-Lj}{r-1}, J = \left\lfloor\frac{n-r}{L}\right\rfloor$$