Number of arrangements with multiple restrictions Given three letters A,B and C. Find number of words of length 11 in which A occurs even number of times and B occurs odd number of times.
( Caution: A can occur 0 number of times and there is no restriction on C )
My Try: I tried making cases but it doesn't work as there will be more than $50$ cases.
Is there any mechanism to solve this?
Even a trinomial expansion won't work as again we have to find possibilities for $n+m+l = 11$ with n even and m odd.
 A: If there were $n$ letters, the number of valid sequences would be $(3^n-(-1)^n)/4$.
To prove this, call a sequence valid if it satisfies your given conditions, and call a sequence partially valid if the number of occurrences of "A" or "B" is odd. There are two steps:

*

*The number of partially valid sequences is $(3^n-(-1)^n)/2$. To see this, we will divide the set of $3^n$ sequences into pairs, where one sequence in each pair is valid. Namely, the mate of a given sequence is found by changing the first occurrence of "A" or "C" into the other letter, "C" or "A". This pairs up almost all sequences; the only one unpaired is the sequence of all "B"s. This is valid if and only if $n$ is odd. Therefore,
$$
\text{# partially valid sequences}=
\begin{cases}
(3^n-1)/2 & n \text{ is even}
\\
(3^n-1)/2+1 & n \text{ is odd}
\end{cases}
$$
This works out to be the same as $(3^n-(-1)^n)/2$.


*Exactly half of the partially valid sequences are valid. A similar method works; given a partially valid sequence, you can change whether or not it is valid by changing the first instance of "A" or "B" to the other letter, "B" or "A".

Let me finish by saying that I think the best way to do this problem is to use EGF's, as awkward suggested in a comment. When you do so, a very simple formula falls out, which motivated me to look for this combinatorial proof. That is, I did not pull this out of thin air.
