Given $p$ red balls and $q$ blue balls, in how many ways can I pick 2 red, then 2 blue, then 2 red, in a row?

68 Views Asked by At

Arranging $p$ red balls and $q$ blue balls on a single line, in how many ways can I put 2 red, then 2 blue, then 2 red, in a row? Even further, in how many ways can I pick 2 reds 2 blues 2 reds in a row, and also 3 reds in a row? I'm looking to generalize this problem, but couldn't even solve the simple one. Thank you!

1

There are 1 best solutions below

0
On BEST ANSWER

You can do this by summing over the numbers $p_0 \le p-4$ and $q_0 \le q-2$ of red and blue balls, respectively, before the first instance of your pattern. That is, let $I_{p_0,q_0}$ denote the number of ways to arrange $p_0$ red balls and $q_0$ blue balls, containing your pattern, then there are $\binom{p_0}{q_0}-I_{p_0,q_0}$ arrangements of $p_0$ red balls and $q_0$ blue balls which don't contain your pattern. Then by choosing one of these $\binom{p_0}{q_0}I_{p_0,q_0}$ arrangements before the 6-ball first pattern, and any of the $\binom{p-p_0-4}{q-q_0-2}$ arbitrary arrangements after the first pattern, you get a total of $$I_{p,q}=\sum_{p_0=0}^{p-4} \sum_{q_0=0}^{q-2} \left(\binom{p_0}{q_0}-I_{p_0,q_0}\right)\binom{p-p_0-4}{q-q_0-2}$$ arrangements in total. Then you can try and calculate $I_{p,q}$ by induction.