1) Determine how many ways Brian, Katie, and Charlie can split a 50 dollar dinner bill such that Brian and Katie each pay an odd number of dollars and Charlie pays at least 5 dollars .
2) 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.
I have been trying to use generating functions to get the answer for these problems, but I am stuck. Any help is greatly appreciated!
For 1, we want to solve the equation $$x_1+x_2+x_3 = 50$$ where $x_1,x_2$ are odd positive numbers, and $x_3 \geq 5$.
Now by subtitution of $x_1,x_2$ with $y_1 = x_1 - 1, y_2 = x_2 - 1$ and $x_3$ with $y_3 = x_3 - 5$ we get the equivalent equation: $$y_1 + y_2 + y_3 = 43$$ where $y_1, y_2 \geq 0$ are even and $y_3 \geq 0$.
Now, note that since $y_1,y_2$ are even, $y_3$ has to be odd, so we can replace it with $z_3 + 1$ when $z_3$ is even.
So we finally get the equation: $$y_1 + y_2 +z_3 = 42 $$ with all it's variables even non negative, which is equivalent to the equation: $$ k_1 + k_2 +k_3 =21 $$ where $k_i$ are non-negative integers with no constraints, this is solved easily by $$CC_3^{21} = {21+3-1\choose 21} $$
For 2, split into cases determine the number of candies that the third kid get ($0,2$ or $5$) and use the same technique...