In how many different ways to select unordered 5 elements from a set with three elements when repetition is allowed?
I know that total ways are $C(n + r - 1, n - 1)$.
But, I am mainly interested in how five elements are selected from $3$ elements. Take an example of set of 3 elements as $\{A,B,C\}$ ?
I am thinking like this. Is this correct ?
ABACC CAABB CCABB ABBBB................
Such "selections" are called multisets. Given a set $X$ a multiset on $X$ is a function $f:\>X\to{\mathbb N}_{\geq0}$. For an $x\in X$ the function value $f(x)$ indicates how many times the element $x$ "occurs" in the multiset under consideration. The sum $\sum_{x\in X} f(x)\leq\infty$ then is the cardinality of this multiset.
Your example is about multisets on $X:=\{A,B,C\}$ of cardinality $5$.