woowheedr

2022-07-08

Find the number of solutions in integers to ${n}_{1}+{n}_{2}+{n}_{3}+{n}_{4}=12$ satisfying .

grubijanebb

Expert

Step 1
Let A denote nonnegative solutions to ${n}_{1}+{n}_{2}+{n}_{3}+{n}_{4}=12$ and ${A}_{i}$ denote those solutions where the upper bound on ${n}_{i}$ is violated, then inclusion/exclusion gives $|\overline{{A}_{1}\cup {A}_{2}\cup {A}_{3}\cup {A}_{4}}|=|A|-\left(|{A}_{1}|+|{A}_{2}|+|{A}_{3}|+|{A}_{4}|\right)+\left(|{A}_{1}\cap {A}_{2}|+\cdots \right)-\cdots \phantom{\rule{0ex}{0ex}}=\left(\genfrac{}{}{0}{}{12+4-1}{12}\right)-\left(\left(\genfrac{}{}{0}{}{7+4-1}{7}\right)+\left(\genfrac{}{}{0}{}{6+4-1}{6}\right)+\left(\genfrac{}{}{0}{}{3+4-1}{3}\right)+\left(\genfrac{}{}{0}{}{2+4-1}{2}\right)\right)+\left(\genfrac{}{}{0}{}{1+4-1}{1}\right)$ where e.g. $|{A}_{1}|=\left(\genfrac{}{}{0}{}{7+4-1}{7}\right)$
Step 2
Because the solutions there can be recast as solutions to $\left({m}_{1}+5\right)+{n}_{2}+{n}_{3}+{n}_{4}=12$ with ${m}_{1},{n}_{i}\ge 0$ or ${m}_{1}+{n}_{2}+{n}_{3}+{n}_{4}=7$, and omitted terms are because they are empty (i.e. they reduce to a sum of nonnegative integers to a negative integer).

Do you have a similar question?