If I have a multiset as shown below
{0.5, 0.5, 1, 1}
I want to get the combinations of size n like:
0.5, 0.5
1, 1
1, 0.5
(Note the combinations of coins are unique. So 0.5, 1 is same as 1, 0.5.)
How do I calculate the number of combinations? I am pretty new to combinatorics, so an easy to understand algorithm would be helpful.