Balls and Bins problem with constraint

311 Views Asked by At

Assume we have $B$ black balls and $R$ red balls, where $R+B$ is a multiple of 4. We want to distribute the balls in $\frac{R+B}{4}$ bins such that each bin has at least 1 red ball and at least 1 black ball and also each bin has a total of 4 balls. What is the probability a randomly selected bin has 2 red and 2 black balls?

I am trying to approach the problem in two phases as follows, but it's getting very complicated to count all of the possibilities. Phase 1: place one black and one red ball in each bin (to account for the constraint) Phase 2: place the rest of the balls in the bins and count all the possible ways.

An alternative approach could be to exclude the 1st phase and go directly to the second, but I don't know if this is correct. Any ideas? If we do this, we get:

$\Pr(\text{2 Black, 2 Red | all bins have at least 1 Black and at least 1 Red})=\frac{\binom{R-(R+B)/4}{1}\binom{B-(R+B)/4}{1}}{\binom{(R+B)/2}{2}}$