Combinatorial problem discrete math

Find the no of ways of placing 6 identical balls into 3 distinct boxes in such a way that first box contains 0,1 or 2 objects,2bd box contains 1,2,3 objects and 3rd one contains 3 or 5 objects.

Ans-

I tried using combinatorial problem

That I find 6 !

And after 6C2 ,6C3

I don't know if I am correct but can the answer be the coefficient of $$x^6$$ in the expansion of

$$(1+x+x^2)(x+x^2+x^3)(x^3+x^5)$$

Won't be wrong if I say that right?

• Please explain how to fimd – Akash Sarkar Feb 21 at 5:33
• Yup, that's right. In this scenario, we can use generating functions to do it. Might be a little pain to multiply out the polynomials, but oh well, that's how these problems tend to go. – Eevee Trainer Feb 21 at 5:34
• @Akash_Sarkar Just expand $$x^4(1+x+x^2)^2(1+x^2)=x^4(1+x^2+x^4+2x+2x^3+2x^2)(1+x^2)$$. And I don't think there would be a problem to find coefficient of $x^2$ in $(1+x^2+x^4+2x+2x^3+2x^2)(1+x^2)$ – Darkrai Feb 21 at 5:35

Let $$(a,b,c)$$ represent the number of objects in 3 boxes in that order. That is, $$(a,b,c)$$ means that the 1st box has $$a$$ balls, the 2nd box has $$b$$ balls, and so on.

Then all possible cases are $$(0,1,5), (0,3,3), (1,2,3), (2,1,3)$$ Therefore, the total number of ways of placing 6 balls is $$\binom{6}{0,1,5} + \binom{6}{0,3,3} + \binom{6}{1,2,3} + \binom{6}{2,1,3}.$$