I'd like to count the following casese:
We have a set. We have $n$ different elements. But we can only contain total 50 elements in a set. Moreover, this set is a multi-set, i.e., we can select a element duplicatively in a constraint of 50 total elements.
So how many cases we have in total?
i will use Generating function to solve it
the problem asks for
coefficient of $x^{50}$ in expansion of $(1+x+x^2+x^3+.....)^{n}$
coefficient of $x^{50}$ in expansion of $\dfrac{1}{({1-x})^n}=(1-x)^{-n}$
we know, coff. of $x^{r}$ in expansion of $(1-x)^{-n}=^{n+r-1}C_{r} \ =\ ^{n+r-1}C_{n-1}$
so,
coefficient of $x^{50}$ in expansion of $(1-x)^{-n}=^{n+49}C_{50}\ =\ ^{n+49}C_{n-1}$