Determine how many integer solutions there are to a+b+c+d=19 if
0<=a<=5,
0<=b<=6,
3<=c<=7,
3<=d<=8
This is an extremely tedious problem to do with inclusion/exclusion!
It is easy to do with generating functions.
I will start you off with inclusion/exclusion.
The number of ways for condition a to happen is $\displaystyle \binom{22}{3}-\binom{16}{3} $.
The number of ways for conditions c to happen is $\displaystyle \binom{19}{3}-\binom{14}{3} $.
The number of ways for conditions a & c to happen together is $\displaystyle \binom{19}{3}-\binom{8}{3} $.
Now to finish you have to figure for each of the other conditions in all possible combinations.
With generating functions we expand $\displaystyle \left( {\sum\limits_{k = 0}^5 {x^k } } \right)\left( {\sum\limits_{k = 0}^6 {x^k } } \right)\left( {\sum\limits_{k = 3}^7 {x^k } } \right)\left( {\sum\limits_{k = 3}^8 {x^k } } \right)$.
The coefficient of $\displaystyle x^{19}$ will be the answer.