How many Combinations can you make with the set {1,1,2,3,4} taken 2 at a time? If I do this in the way I do in Permutation: C(5,2) / 2!, I end up in wrong answer.
Actually, there are 7 Combinations: 1 1, 1 2, 1 3, 1 4, 2 3, 2 4, 3 4.
How should I solve this one.
Thank You!
Can I here use the ${k+n-1\choose r}$ formula?
Generalising slightly, you want the number of different selections you can make of two items for a collection in which all the numbers $1,\dots,n$ appear at least once, and $m$ of these numbers appear more than once (whilst no other numbers outside $1,\dots,n$ appear at all). For example, you might be selecting from $\{1,1,2,3,3,3,4,5,6,6\}$.
If the selection is of the form $k,k$, then there are just $m$ possible values for $k$, so $m$ different possible selections. If the selection is of the form $h,k$ with $h\ne k$, then $h,k$ are chosen from $1,2,\dots n$, so the usual ${n\choose 2}$ works fine. Or starting from scratch, we can pick $h$ in $n$ ways, then $k$ in $n-1$ ways, but that gives us every selection twice so there are $n(n-1)/2$ different selections.
Putting that together, there are a total of $m+{n\choose 2}$ different possible selections.
In the particular case given in the question, $\{1,1,2,3,4\}$ we have $n=4,m=1$, so there are ${4\choose 2}+1=6+1=7$ different possible pairs. In the case $\{1,1,2,3,3,3,4,5,6,6\}$ you have $n=6,m=3$, so the answer is ${6\choose 2}+3=18$.