The original problem is to find the probability that the first candidate is always strictly ahead in the vote count. One may instead consider the problem of finding the probability that the second candidate is never ahead (that is, with ties are allowed). In this case, the answer is :\frac{p+1-q}{p+1}. The variant problem can be solved by the reflection method in a similar way to the original problem. The number of possible vote sequences is \tbinom{p+q}{q}. Call a sequence "bad" if the second candidate is ever ahead, and if the number of bad sequences can be enumerated then the number of "good" sequences can be found by subtraction and the probability can be computed. Represent a voting sequence as a
North-East lattice path on the Cartesian plane as follows: • Start the path at (0, 0) • Each time a vote for the first candidate is received move right 1 unit. • Each time a vote for the second candidate is received move up 1 unit. Each such path corresponds to a unique sequence of votes and will end at (
p,
q). A sequence is 'good' exactly when the corresponding path never goes above the diagonal line
y =
x; equivalently, a sequence is 'bad' exactly when the corresponding path touches the line
y =
x + 1. For each 'bad' path
P, define a new path
P′ by reflecting the part of
P up to the first point it touches the line across it.
P′ is a path from (−1, 1) to (
p,
q). The same operation applied again restores the original
P. This produces a one-to-one correspondence between the 'bad' paths and the paths from (−1, 1) to (
p,
q). The number of these paths is \tbinom{p+q}{q-1} and so that is the number of 'bad' sequences. This leaves the number of 'good' sequences as :\binom{p+q}{q} - \binom{p+q}{q-1} = \binom{p+q}{q}\frac{p+1-q}{p+1}. Since there are \tbinom{p+q}{q} altogether, the probability of a sequence being good is \tfrac{p+1-q}{p+1}. In fact, the solutions to the original problem and the variant problem are easily related. For candidate A to be strictly ahead throughout the vote count, they must receive the first vote and for the remaining votes (ignoring the first) they must be either strictly ahead or tied throughout the count. Hence the solution to the original problem is :\frac{p}{p+q}\frac{p-1+1-q}{p-1+1}=\frac{p-q}{p+q} as required. Conversely, the tie case can be derived from the non-tie case. Note that the
number of non-tie sequences with p+1 votes for A is equal to the number of tie sequences with p votes for A. The number of non-tie votes with p + 1 votes for A votes is \tfrac{p + 1 - q}{p + 1 + q} \tbinom{p + 1 + q}{q} , which by algebraic manipulation is \tfrac{p + 1 - q}{p + 1} \tbinom{p + q}{q} , so the
fraction of sequences with p votes for A votes is \tfrac{p + 1 - q}{p + 1}. ==Notes==