$A$ is a multiset $\{x_1, \cdots, x_1, x_2, \cdots, x_2, \cdots, x_j\}$ which has different objects $x_1, x_2,\cdots, x_j$ and the number of $x_i$ is $n_i$ ($\sum_{i=1}^{j} n_i = N$)
How many different $k$-size multi-subset of $A$?
I know it should be equivalent to find number of integer solutions of
$$a_1 + a_2 + \cdots + a_j = k$$ with constraints $0 \le a_i \le n_i$.
for example: $A = \{1,1,2,2,2\}$, $3-$size multi-subsets are $\{1,1,2\}$, $\{1,2,2\}$, $\{2,2,2\}$.
Is there an analytical solution of above question, which depends on $n_1, \cdots, n_j, k$? I mean that it's similiar to Catalan Number, Bell Number or Stirling number which can be written as formula of binomial coefficients/multinomial coefficients. Thanks.