Solution
Never Behind
Show the problem again
Alice receives 6 votes and Bob receives 4. The 10 ballots are counted one at a time, and a counting order is recorded as a sequence of six A's and four B's (so there are C(10, 4) = 210 possible orders). In how many of these orders does Alice's running total never fall below Bob's (ties are allowed)? Give an integer.
Worked solution
**Answer: 90.** Track the margin (Alice minus Bob) as a walk starting at 0, stepping +1 for an A and −1 for a B, ending at 6 − 4 = 2. A bad order is one whose walk touches −1. Reflect the portion of a bad walk before its first visit to −1 (swap A and B in that prefix). The result is a walk from −2 to 2, which is exactly a sequence of 7 A's and 3 B's, and the map is a bijection since every walk from −2 to 2 must cross −1. So the bad orders number C(10, 3) = 120, and the good ones number 210 − 120 = 90. This matches the weak ballot formula (a − b + 1)/(a + 1) · C(a + b, b) = (3/7) · 210 = 90.
Source: Weak form of Bertrand's ballot problem, solved by the reflection principle. Statement written for AxiomIQ.