Question Statement: How many integer solutions are there for the equation $c_1 + c_2 + c_3 + c_4 = 25$, where $c_i \ge 0$ for all $1 \le i \le 4$.
I would like to solve this problem using combinatorics and I've read generating functions can be used as a method to find the solution. However, I have no idea how to do this.
My first attempt at solving this problem is below,
Observe the missing constraint $c_i \le 21$. The solution can be obtained by reasoning using Principle of Exclusion and Inclusion.
Applying the theorem to the above problem yeilds,
$N(\bar{c_1}\bar{c_2}\bar{c_3}\bar{c_4}) = N - \sum N(c_i) + \sum N(c_i c_j) - \sum N(c_i c_j c_k) + \sum N(c_1 c_2 c_3 c_4)$
For all $i,j,k = 1,...,4$.
Since, $N=H(4,25)=C(28,25)$, $N(c_i)=H(4,4)=C(7,4)$ and $N(c_i c_j) = N(c_i c_j c_k) = N(c_1 c_2 c_3 c_4) = 0$. Hence, the result is 3248.
Generating functions is the hard way for this question, but here goes.
The answer is the coefficient of $x^{25}$ in $(1+x+x^2+\cdots)^4$. We find $$(1+x+x^2+\cdots)^4=(1-x)^{-4}={3\choose0}+{4\choose1}x+{5\choose2}x^2+\cdots$$ so the answer is ${28\choose25}={28\choose3}=3276$.