Combinatorics: I know that to calculate the number of combinations of \[k\] elements chosen from a set of \[n\], you use the binomial coefficient \[C(n,k)={n!\over {k!(n-k)!}}\] But if the set contains more times the same element, how then? I men what if I want to know the combinations of four letters from the set {A,A,A,A,B,B,B,C,C,D} ?
I know that in permutations (if n = k), you just divide by the product of the factorials of the number of repeated elements. in the case it would be: \[10! \over {5!4!3!2!1}\] But, what about combinations?
(if k<n)
As far as I know there's no easy formula for this kind of problem.
does combination mean that order is important? or not important?
Basically, you're asking how many unique subsets of multisets exist. As far as I can tell, there's no formula to do that.
I was wrong, terribly sorry. The order does _not_ matter. If n = k you get 1, even if you have n! permutations.
Even if there isn't a formula, how would you solve the specific case {A,A,A,A,B,B,B,C,C,D}?
For this example (which is small enough) I would do a case by case analysis. Not pretty, but it gets the job done.
Perhaps fool can impart some wisdom on us.
Hmm, there are two ways to approach this one. First, somewhat tedious case analysis which is somewhat error prone. Second, using a generating function. PS: You forgot to mention 'distinct' in your definition of \( \large \binom nk \)
well, how would you solve this?
in combo abba = baba = aabb = etc ... and are only counted once, if i recall correctly
Yeah, you're right.
could we simplified the set to {a,b,c,d} if they represent doubled elements?
I don't think so. ABBA is a valid combination. You can't get that from your set. Anyway, C(10,4) = 210. The number of those with 2 A are C(8,2) = 28, so I subtract 14. Could I go on like this?
I don't really think so...
aaaa = 1 aaab = 4 aaac = 4 aaad = 4 aabb = 6 aacc = 6 bbbc = 4 bbcc = 6 bbbd = 4 ccd = 0 d = 0 i think i sorted them right
abbb = 4 forgot that one
It looks like a case-by-case analysis you're starting, so you could continue how you started, but I think you calculated the number of sets with 2 a's incorrectly.
looks to me like there are 10 different set that can be formed by your example
It really looked like a simple problem... That's disappointing, Math.
opps, 6 different sets :) forgot how to count
similar to Fool's generating function idea, you could make a recurrence relation to solve this problem.
I love recursion, but really have no idea how to use it here.
It's not a very nice problem.
If you want more information on multisets however, wikipedia has a great page on them http://en.wikipedia.org/wiki/Multiset
If I find out a general formula I'll let you know. It really seems kind of easy.
Join our real-time social learning platform and learn together with your friends!