The probability that the $n$ white balls will be next to each other if $m$ black and $n$ white balls are arranged in a row

probability

Imagine you have $n$ white balls and $m$ black balls. You randomly put these balls in a straight line. What is the probability that the $n$ white balls will be next to each other?

I have two contradictory ways to tackle this problem so at least one of them is wrong.

The first is to assume what I consider to be an equivalent problem of having already the $m$ black balls on the line but sufficiently spaced between each other. Then I put each white ball in one of the $m+1$ spaces ($m-1$ for the spaces in between black balls and $2$ more for the extremities).

From this perspective it seems clear that having randomly placed the first white ball in any of those spots, I just need the remaining white balls to fall precisely at that slot, which happens with probability $\frac{1}{m+1}$. Thus the total probability would be $\frac{1}{m+1}^{n-1}$

But on the other hand if I consider that having placed a given white ball I am also creating an extra slot space (one white ball occupies one slot but creates two neighbouring slots). Then the probability will be different:

$\frac{2}{m+2}\frac{3}{m+3}\ldots\frac{n-1}{m+n-1}\frac{n}{m+n}$

Where is my mistake?

Best Answer

The number of distinguishable arrangements is $$\binom{m + n}{n}$$ since we must choose which $n$ of the $m + n$ positions required from $n$ white and $m$ black balls will be filled with white balls.

If all the white balls are together, we can treat them as a single object. That means we have $m + 1$ objects to arrange, the $m$ black balls and the block of $n$ white balls. There are $m + 1$ ways to choose the position of the block.

Therefore, the probability that all the white balls will be placed together is $$\frac{m + 1}{\dbinom{m + n}{n}}$$

As @paw88789 has pointed out in the comments (and I initially missed), your second answer, which is a nice application of the rising factorial, is equivalent to this one.

As for your first method, while it is true that there are initially $m + 1$ slots in which a white ball could be placed, the addition of a white ball to the line means that there are now $m + 2$ places where the second white ball could be placed. Of these, two are favorable, namely those adjacent to the first white ball. Once the second white ball has been placed, there are now $m + 3$ places where the third white ball could be placed, of which three are favorable, those adjacent to or between the two adjacent white balls that have already been placed. Continuing in this way, we obtain the rising factorial expression you obtained with your second method. $$\left(\frac{2}{m + 2}\right)\left(\frac{3}{m + 3}\right)\left(\frac{4}{m + 4}\right) \cdots \left(\frac{n}{m + n}\right)$$