How to count number of different 3-members-subsets (not ordered) of a multiset {1,1,1,2,2,2,3}? I need a general formula or a general method of solving that problems. Another example: how to count number of defferent 4-members-subsets (not ordered) of a multiset {3,3,4,4,5,5,7,7,7}?
Asked
Active
Viewed 46 times
-1
-
The general problem is frustrating and the general formula will be ugly. Search long enough on this site and you'll find it. That said, you can relatively easily craft a formula for a specific scenario that is not fully generalized. Inclusion-exclusion here in particular is what is going to be useful or generating functions. – JMoravitz May 04 '21 at 17:41
-
This is half the "anagram" question eg. dealt with here - "which letters to use" (followed typically by "what order are they in") – Joffan May 04 '21 at 21:39
1 Answers
1
One way to do this is with generating functions. For the first problem, the answer is the coefficient of $x^3$ in $$(1+x+x^2+x^3)^2(1+x)$$ We can take either $0,1,\text{ or }2$ copies of $1$. Similarly for $2$. For $3$, we can take either $0$ or $1$ copies.
saulspatz
- 53,131
-
-
1better answer than the one in the duplicate thread, for this OP's purposes. why do these threads keep being closed? 'already answered' is clearly different from 'already answered well' – kyary May 04 '21 at 18:53
-