Imagine that I have a group with elements {A,A,B,C,D} and I want to generate all non-ordenated possible combinantions with 2 letters. They are {A,A}, {A,B}, {A,C}, {A,D}, {B,C}, {B,D} and {C,D}.
Is it possible to calculte this number in general (a group of $k$ elements: $n_1$ elements $A_1$, $n_2$ elements $A_2$ ... with $\sum n_i=k$)?
I guess it will be something related with combinatorics numbers. However, I can't figure out a general formula.
My specific case is groups of 5, 6, 7, 8 and 9 elements from group {A,A,A,A,B,B,C,D,E}