I am trying to figure out the following combinatorics problem:
We have an even number $N$ of identical boxes, each of them labelled by $j=1,...,N$, where for each $j$ we can put only a single ball. There are three distinct types of balls, which are labelled with a value $n_{j}=0,1,2$ for a ball at the box $j$. Now the question is, how many possible combinations can we make so that the sum of all ball values in each of the boxes gives $\sum_{j=1}^{N}n_{j}=N/2$ (remember $N$ is even)?
If we make the same problem with $n_{j}=0,1$, i.e. only two different balls, the answer is the known: \begin{eqnarray} C_{N,N/2} = \left(\begin{matrix} N\\ N/2 \end{matrix}\right)=\frac{N!}{\frac{N}{2}!\frac{N}{2}!} \end{eqnarray} In that case, the problem is equivalent to asking, for a binary string of zeros and ones, how many combinations can we make such that the total sum of the element of the string is equal to $N/2$. But for the "three-state" string, I don't know how this generalizes.