<s>[INST] Permutation: Distribute 10 distinct items in 3 boxes: one box contain odd number, one box even number object , and all boxes at least one item. 
I wish to distribute $10$ distinct toys to my children $A, B$ and $C$. Each child must get at least one toy, but $A$ must receive an even number of toys, while $C$ must receive an odd number.
How many ways can I go about my distribution?

It's from an exam question. I had stumbled upon it doing my revision, but I still couldn't figure out how to go about solving it.
 [/INST] Let's do it for $n$ toys.
Each term in $(A+B+C)^n$, expanded without making use of the commutativity of $A$, $B$, and $C$, corresponds to a way of assigning the toys.  We want to eliminate terms in which the total degree of $A$ is odd or the total degree of $C$ is even.  This can be done by computing
$$
\frac{1}{4}\left[(A+B+C)^n+(-A+B+C)^n-(A+B-C)^n-(-A+B-C)^n\right].
$$
Now we want to eliminate terms in which the total degree of any of $A$, $B$, or $C$ is $0$.  Since the total degree of $C$ is now guaranteed odd, we only have to worry about $A$ and $B$.  We can eliminate terms that are do not contain any factor of $A$ or any factor of $B$ by subtracting from the expression above the expression with $A$ set to $0$, then subtracting the expression with $B$ set to $0$, and finally by adding the expression with both $A$ and $B$ set to $0$ (to compensate for double-subtraction).  We get
$$
\begin{aligned}
&\frac{1}{4}\left[(A+B+C)^n+(-A+B+C)^n-(A+B-C)^n-(-A+B-C)^n\right]\\
&\quad-\frac{1}{2}\left[(B+C)^n-(B-C)^n\right]-\frac{1}{4}\left[(A+C)^n+(-A+C)^n-(A-C)^n-(-A-C)^n\right]\\
&\quad+\frac{1}{2}\left[C^n-(-C)^n\right].
\end{aligned}
$$
The number of terms in the resulting expression is found by setting $A=B=C=1$.  This gives
$$
\frac{1}{4}\left[3^n-(-1)^n\right]-\frac{1}{2}\left[2^n-0^n\right]-\frac{1}{4}\left[2^n+0^n-0^n-(-2)^n\right]+\frac{1}{2}\left[1^n-(-1)^n\right].
$$
This formula works for any $n$, including $n=0$ with the convention $0^0=1$.  If you assume $n>0$, you can make the formula slightly more concise; likewise, if you restrict to odd $n$ or to even $n>0$ you can obtain somewhat shorter formulas:
$$
\begin{cases}
0 & n=0,\\
\frac{1}{4}\left[3^n+1\right]-2^n+1 & \text{$n$ odd,}\\
\frac{1}{4}\left[3^n-1\right]-2^{n-1} & \text{$n>0$, even.}
\end{cases}
$$
</s>