How many ways are there to distribute 10 balls ( 2 x 5 distinct colors) to 5 boxes (A, B, C, D, E), so every box get exacly 2 balls and box B & D get different colors
What I got
Number of ways that B gets different colors, basically equal to number of B get any pairs minus B get same colors
$$n(X) = \binom{10}{2} - 5$$
Number of ways that D gets different colors
$$n(Y) = \binom{8}{2} - 4$$
Number of ways to distribute other 6 balls to A, C, E (any pairs possible)
$$n(Z) = \binom{6}{2} \binom{4}{2} \binom{2}{2}$$
So, there are $$n(X) \times n(Y) \times n(Z)$$ ways to distribute 10 balls ( 2 x 5 distinct colors) to 5 boxes (A, B, C, D, E), so every box get exacly 2 balls and box B & D get different colors
I am given this question and I do not have the answer key, can anyone confirm/correct me?
The number of ways $a(n)$ to distribute $n$ distinctly coloured pairs of balls into $n$ boxes that can each hold $2$ balls is given by OEIS A000681. The relevant values are as follows: $$a(3)=21\qquad a(4)=282\qquad a(5)=6210$$ Now if box B has two same-coloured balls, there are $5$ ways to choose the colour and $a(4)$ ways fo assign the remaining balls – the same applies for box D. If both B and D are monochromatic there are $5×4$ ways to choose the colours and $a(3)$ ways to finish the assignment. Hence by inclusion/exclusion the answer is $$a(5)-2\cdot5a(4)+20a(3)=3810$$