2

This is a variation of question asked on this site before.

Consider a set with $_1$ 'distinct' 1s, $_2$ 'distinct' 2s, ... , $_$ 'distinct' ns. You have $_1+1$ choices for the 1s (including the option of none of them being chosen) and similarly for the other elements. The total number of subsets is therefore $(_1+1)(_2+2)...(_+1)$

Now how to find the number of subsets with size $\leq $ 'k'.

IamKnull
  • 1,497
  • 10
  • 29

1 Answers1

1

We have the multiset $\{ 1^{a_1} ,2^{a_2} , \cdots ,n^{a_n}\}$ (where multiplicity of the elements is indicated by the expononent). The number of subsets (of size $k$) will be the coefficient of $x^k$ in the function below \begin{eqnarray*} (1+x+ \cdots +x^{a_1}) (1+x+ \cdots +x^{a_2}) \cdots (1+x+ \cdots +x^{a_n}). \end{eqnarray*}

Donald Splutterwit
  • 36,613
  • 2
  • 26
  • 73