Problem
COM-B2-M09-P003 Bounded Triples
#3
★★☆☆☆ Level 2 of 5
Find the number of triples \((a,b,c)\) such that \(a+b+c=9\) and \(0\le a,b,c\le 4\).
Count the coefficient in \((1+x+x^2+x^3+x^4)^3\) and subtract cases where one variable is at least \(5\).
Without the upper bound, there are \(\binom{11}{2}=55\) solutions. If \(a\ge 5\), then \(a'=a-5\) gives \(a'+b+c=4\), so there are \(\binom{6}{2}=15\) solutions. There are three possible variables, and two variables cannot both be at least \(5\), because the sum would be at least \(10\). The answer is \(55-3\cdot 15=10\).
A good first problem on finite factors and inclusion-exclusion.