Kids eating candy

69 Views Asked by At

Determine how many ways I can distribute 80 candies to 3 kids, such that:

  • The first kid receives an arbitrary number of candies (possibly 0).
  • The second kid receives an even positive number of candies.
  • The third kid receives 0, 2, or 5 candies.
  • Every candy is distributed.

So far, I have gotten the generating function which is: (1+x+x^2+x^3...)(x^2+x^4+x^6...)(1+x^2+x^5).

1

There are 1 best solutions below

4
On BEST ANSWER

Suppose the third kid receives $0$ candies. There are $40$ choices for the number of candies the second kid gets, and the number the third kid gets is then determined, so there are $40$ ways if the third kid get $0$ candies.

Do a similar thing if he gets $2$ or $5$ candies.