Suppose you want to distribute $15$ candies to $5$ different children.
(a) In how many ways can this be done if no kid receives more than $6$ candies?
(b) In how many ways can this be done if each child ends up with a different number of candies?
We already determined that the number of ways of distributing the candies to the $5$ children such that each child gets at least one piece is $1,001$ ways.
How do we take care of the restriction of each child receiving no more than $6$? Can we take the complement and subtract the number of ways a child receives $7-15$ pieces? Or would this be a long, unnecessary attempt?
My attempt:
Consider the complement where one kid receives at least $7$ candies.
Step $1$: Choose the child to receive $7$ candies and give him/her the $7$ candies: $5$ choices
Step $2$: Distribute the remaining $15-7=8$ candies to the $5$ children.
There are $\binom{8+4}{4}=\binom{12}{4}=495$ ways to do this.
So there are $5\cdot 495=2,475$ ways to distribute the candies such that one child receives at least $7$ candies.
There are $\binom{15+4}{4}=\binom{19}{4}=3,876$ ways to distribute the candies with no restriction.
So there are $3,876-2,475=1,401$ ways to distribute the candies such that no child receives more than $6$ candies.