
-----------------------------------
Raknarg
Mon Dec 08, 2014 9:23 pm

Choose function with non unique elements
-----------------------------------
Is there a formula for calculating the number of ways to choose a certain amount of elements from a collection if some of the elements are not unique? 

For example, you have the A, B, C, D, D, E, E, E. Is there a way to calculate the number of unique pairing or triplings you can make? Or any list with n unique values, and each value has n(i) number of copies in the list.

-----------------------------------
Dreadnought
Mon Dec 08, 2014 11:22 pm

Re: Choose function with non unique elements
-----------------------------------
Assuming the order in which the elements are chosen is unimportant.

[code]
Suppose that you have distinct elements a_1,...,a_m with n_1,...,n_m occurrences in the list respectively.
Suppose also that you want to pick k elements without replacement.

Let S = { (i_1,...,i_m) | 0 