All sets with groups of similar objects

32 Views Asked by At

I have $i$ types of objects, and I want to build sets with $j$ ($1 \le j \le n$) objects from them ($i \le n$). The position of objects in the set is immaterial.

For example, for $i=2$ (i.e. I have two types of objects: $a$ and $b$) and $n=4$. Then:

for $j=1$: Two sets: $\{a\}, \{b\}$

for $j=2$: Three sets: $\{a, a\}, \{a, b\}, \{b, b\}$

for $j=3$: Four sets: $\{a, a, a\}, \{a, a, b\}, \{a, b, b\}, \{b, b, b\}$

for $j=4$: Five sets: $\{a, a, a, a\}, \{a, a, a, b\}, \{a, a, b, b\}, \{a, b, b, b\}, \{b, b, b, b\}$

How can I come to a formula for this type of arrangements? for any $i$ and $n$?

1

There are 1 best solutions below

0
On BEST ANSWER

This is just star-and-bar argument.

SUppose we have objects of $i$ types, and for any $k \le i$, there are $a_k$ objects in the set with $j$ objects.

This suffices to evaluate number of solutions of $a_1+a_2+...+a_i=j$, the number of solutions is exactly ${i+j-1}\choose{j}$. (given by https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics))