Say, we have 4 red balls, 4 blue balls, 4 green balls, 4 yellow balls. How many ways are there to form a sequence of 10 balls such that every color of ball occurs at least twice?
My thought: r = red b = blue g = green y = yellow * = undetermined
Every arrangments should in this form: rrbbggyy**
Case 1: two * are same
$\frac{\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{1}10!}{4!2!2!2!}$
Case 2: two * are different
$\frac{\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{2}\binom{4}{2}10!}{3!3!2!2!}$
Result = Case 1 + Case 2
Any suggestions would be appreciated!
It's two cases.
First. We have one quadruplet of 4 balls of the same color. There are 4 variations here to form quadruplets. The rest 6 balls will automatically form 3 doublets (to satisfy the conditions of the problem). The overall number of placing them into a sequence is permutations with repetition: $$\frac{10!}{4!\,2!\,2!\,2!}$$ But we have to multiply it by 4 because we have 4 variations. So it is $$4\cdot\frac{10!}{4!\,2!\,2!\,2!}$$
Second case. We have two triplets and two doublets. How many variations in terms of triplets and doublets? The answer is four choose two -- that is combinations. The rest is the same as above: $${4\choose2}\cdot\frac{10!}{3!\,3!\,2!\,2!}$$
And finally the overall number of possible strings of balls: $$4\cdot\frac{10!}{4!\,2!\,2!\,2!}+{4\choose2}\cdot\frac{10!}{3!\,3!\,2!\,2!}$$