Find the generating function for the number of solutions (a) Find the generating function for the number of solutions to
$x_1+x_2+x_3+x_4+x_5+x_6=n$ where $x_1,x_2,x_3$ are even $x_4,x_5,x_6$ are odd 
(b) Find the generating function for the number of solutions  to
$x_1+x_2+x_3+x_4+x_5=n$
subject to the condition that $0\leq x_i \leq 12$. answer in the closed form..
As i know that the number solution for the equation $x_1+x_2+x_3+x_4+...+x_k=n$ is C(n+k-1 , k)

Hint: Start by finding the generating functions $O(z)$ and $E(z)$ that represent
$$
[z^k]O(z)=\begin{cases}1 & \text{for $k$ odd}\\0 & \text{for $k$ even}\end{cases}
$$
and
$$
[z^k]E(z)=\begin{cases}0 & \text{ for $k$ odd}\\1 & \text{ for $k$ even}\end{cases}.
$$
How could you write the generating function for the sums of two even numbers?  Of three?  What about odd numbers?  How can you combine these results?
For the second, try to see how you could replace the even and odd conditions above with something more appropriate to the problem.
