Nine different chocolate bars are to be distributed to 3 different kids.
a) In how many ways can this be done if there are no restrictions?
b) In how many ways can this be done if the child A receives exactly four chocolate bars?
c) In how many ways can this be done if each kid gets at least one chocolate bar?
I'm pretty confident with the first two parts (a and b)
Here is my work:
a) Since there are no restrictions we can assign the kids to the chocolate bars in $3^9$ ways.
b) Since the first child must get four candies we can assign the candies to him in ${9\choose 4}$ ways. Then we can assign the rest of the candies using the same logic from part a in $2^5$ ways. So there are $2^5$${9\choose 4}$ ways.
c) I'm confused here because I did this problem in two distinct methods and did not obtain the same answer in the slightest...
$\textbf{Method 1:}$ Assign 3 candies to three kids: This can be done in 9×8×7 ways but we also have to consider that there are 3! arrangements of the kids. Then we need to assign the remaining candies to the kids, which can be done in $3^6$ ways. So in this first method I obtained $3^6$×3!×(9×8×7) ways = 2,204,496 ways.
$\textbf{Method 2:}$ I then tried using the inclusion exclusion principle. First I saw that there were $3^9$ ways to assign the kids to the candies in total. And then I took the cases in which one of the three kids received no candies. For each of the three kids this would be $2^9$ and thus would be $3×2^9$ for the kids collectively. However, we would have to add back the case in which none of the three kids received a candy, which would be 3. Thus the answer would be $3^9 - 3×2^9 + 3$ ways.
I'm really not sure which of part c or if either are correct at all...but could someone also check my answers for part a and part b?
Your method $1$ with restrictions far exceeds $3^9$ with no restrictions.
Your method $2$ is close. You didn't consider the case where $2$ children receive no candy and also, there isn't a case where all $3$ receive no candy (that wouldn't be a valid distribution of the candy).
Like you said, there are $3$ ways for one child to receive no candy and for each of those there are $2^9$ ways for the other $2$ children to receive the candy.
There are $3$ ways for $2$ children to have zero candy and for each of those there is only one way for the other child to have all $9$ candies.
c) $3^9 - 3\cdot 2^9 - 3 = 18144$