Find the number of non-negative integer solutions of $x+y+z=14$ given that $0 \leq x,y,z \leq 9$
I know that similar questions have been answered before. Anyway, this can be solved using generating sequences or using star and bar argument along with PIE.
My question is a bit different. I feel like this can also be somehow manipulated and solved with the help of a dummy variable. Please help me with that, if that's possible.
See that when you make $x\ge 9$ others are always less than $9$. So count all possiblities than count possiblites when one of the numbers is greater than $9$ and multiply it by $3$ and subtract from total.
So let $N$ be the number of solutions to $x+y+z=14: x,y,z\ge 0$
let $n$ be the number of solutions to $x'+y+z=5:x', y,z\ge 0$
Answer: $N-3n$