๐Ÿงฎ Brain Teaser

The Ballot Box Twist: Runs of the Same Color

A bag contains rr red balls and bb blue balls, with r>br > b. They are drawn one at a time without replacement, in uniformly random order. What is the probability that the red balls are never in the minority throughout the drawing โ€” meaning at every point in the sequence, the number of red balls drawn so far is strictly greater than the number of blue balls drawn so far?

(Assume r>br > b and count from the very first draw.)

ballot problemcycle lemmacombinatoricsreflection principlerandom permutation

Answer: The Ballot Box Twist: Runs of the Same Color

Key Idea / Intuition

This is a beautiful disguised version of the Ballot Problem. The Ballot Problem says: if candidate A gets aa votes and candidate B gets bb votes with a>ba > b, then the probability that A leads B strictly throughout the entire counting is (aโˆ’b)/(a+b)(a - b)/(a + b). Here the "votes" are the drawn balls, with red playing the role of the winning candidate. The answer drops out immediately once you see this connection.

The magic of the ballot problem is that it reduces a complex path-counting question to a single elegant formula, proved by a beautiful reflection/cycle argument.


Formal Proof / Solution

Setting up the correspondence.

Label the rr red balls as +1+1 and the bb blue balls as โˆ’1-1. We draw all n=r+bn = r + b balls. Let SkS_k be the running sum after kk draws. We want:

P(Sk>0ย forย allย k=1,2,โ€ฆ,r+b)P(S_k > 0 \text{ for all } k = 1, 2, \ldots, r+b)

Since Sr+b=rโˆ’b>0S_{r+b} = r - b > 0, we are in exactly the setting of the Ballot Problem.

The Ballot Problem (Bertrand, 1887).

In an election, candidate A receives aa votes and candidate B receives b<ab < a votes. If ballots are counted in a uniformly random order, the probability that A is strictly ahead of B throughout the entire count is: aโˆ’ba+b.\frac{a - b}{a + b}.

Applying to our problem.

With a=ra = r red balls and bb blue balls:

P=rโˆ’br+b\boxed{P = \frac{r - b}{r + b}}

Sketch of proof via the Cycle Lemma.

Consider all (r+b)!(r+b)! orderings of the balls, or equivalently all (r+br)\binom{r+b}{r} sequences of +1+1s and โˆ’1-1s with rr of +1+1 and bb of โˆ’1-1.

For any such sequence (x1,โ€ฆ,xn)(x_1, \ldots, x_n) with n=r+bn = r+b, consider its nn cyclic rotations: (x1,โ€ฆ,xn),โ€…โ€Š(x2,โ€ฆ,xn,x1),โ€…โ€Šโ€ฆ,โ€…โ€Š(xn,x1,โ€ฆ,xnโˆ’1).(x_1,\ldots,x_n),\; (x_2,\ldots,x_n,x_1),\; \ldots,\; (x_n, x_1, \ldots, x_{n-1}).

Key fact (Cycle Lemma): Among these nn cyclic rotations, exactly rโˆ’br - b of them have all partial sums strictly positive.

Why? The partial sums of a rotation starting at position ii are all positive iff we start at a "record high" position of the cumulative sum. A careful counting argument shows there are exactly rโˆ’br - b such starting positions (since the total sum is rโˆ’b>0r - b > 0 and the sequence is generic).

Since each of the nn rotations is equally likely as a random arrangement, the probability that the original (random) sequence has all partial sums >0> 0 is:

rโˆ’br+b.\frac{r - b}{r + b}.

Example. With r=3r = 3 red and b=1b = 1 blue ball: P=3โˆ’13+1=24=12.P = \frac{3-1}{3+1} = \frac{2}{4} = \frac{1}{2}.

You can verify by listing all (41)=4\binom{4}{1} = 4 equally likely positions for the blue ball:

  • Blue in position 1: โŒ (immediately tied or behind)
  • Blue in position 2: RBRR โ€” after draw 2: 11 red, 11 blue โŒ
  • Blue in position 3: RRBR โ€” after draw 3: 22 red, 11 blue โœ“
  • Blue in position 4: RRRB โ€” all prefixes โœ“

Favorable outcomes: 2 out of 4 โœ“ โ€” matches 12\frac{1}{2}.

Source: Fifty Challenging Problems in Probability with Solutions (Frederick Mosteller), classical folklore

Type: ProbabilitySource: Fifty Challenging Problems in Probability with Solutions (Frederick Mosteller), classical folkloreEdit on GitHub โ†—