Let $C = \{1,...,n\}$ be a set of $n$ colors. Let $S\_1,...,S\_k$ be non-empty subsets of $C$, that is, $S\_i \subseteq C$ for all $i \in \{1,...,k\}$. It is helpful to think of the $S\_i$ as urns with colored balls.


We now draw one ball from each $S\_i$.


Given $b\_1,...,b\_n$ with $b\_1 +...+ b\_n = k$. How many ways are there to draw $b\_1$ balls with color $1$, $b\_2$ balls with color $2$, ..., and $b\_n$ balls with color $n$?


Please note that the special case where each $S\_i = C$ is well-known. Here, the number of combinations is $$\binom{k}{b\_1}\binom{k-b\_1}{b\_2}...\binom{k-\sum\_{j=1}^{n-2} b\_j}{b\_{n-1}}\binom{k-\sum\_{j=1}^{n-1} b\_j}{b\_n}.$$


I am looking for a closed form expression. I'm afraid this expression is rather complicated and involves some incarnation of the inclusion-exclusion principle. Alternatively, I'd be interested in an algorithm that is more efficient than a trivial enumeration of all possible combinations.



Draws from multiple non-disjoint urns
The answer is the coefficient of $x\_1^{b\_1}\cdots x\_n^{b\_n}$ in 
$$\prod\_{i=1}^k \biggl(\sum\_{j\in C\_i} x\_j\biggr).$$
It's unlikely that anything more useful can be said in the general case.


