Find the number of ways to distribute 19 identical computers to four schools, if School A must get at least three, School B must get at least two and at most five, School C get at most four, and School D gets the rest.
a) Solve using inclusion-exclusion
b) Solve using generating functions
I've been tackling this question for a couple of days and I am pretty confused where to even start.
So I bet the answer is in the form $x_1 + x_2 + x_3 + x_4 = 19$, where $x_1 \ge 3; 2 \le x_2 \le 5; x_3 \le 4$ and $x_4$ is whatever is left over.
And then I get confused. I've looked all over the internet, through textbooks and I'm not getting anywhere. Any help would be appreciated, thank you.
Addendum to the generating function part of the answer of @callculus. Assuming WA is not available, it's not too hard to calculate the coefficient by hand. In order to do so it's convenient to use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ of a series. This way we can write e.g. \begin{align*} [x^j](1+x)^n=\binom{n}{j} \end{align*}
Comment:
In (1) we shift the index of $k$ to start from $0$ and apply the finite geometric series formula.
In (2) we apply the finite geometric series formula again.
In (3) we use the linearity of the coefficient of operator and apply the rule $$[x^{n-m}]A(x)=[x^n]x^mA(x)$$ We also use the binomial series expansion of $\frac{1}{(1-x)^4}$.
In (4) we observe that we can replace the binom $(1-x^{15})$ with $1$, since multiplication with $x^{15}$ does nothing contribute to the coefficient of $x^{14}$.
In (5) we use the binomial identity \begin{align*} \binom{-p}{q}=\binom{p+q-1}{p-1}(-1)^q \end{align*}
In (6) we apply the rule $[x^{n-m}]A(x)=[x^n]x^mA(x)$ again.
In (7) we select the coefficients accordingly.