Ballot problem with initial votes counted

148 Views Asked by At

In an election where candidate $A$ receives $p$ votes and candidate $B$ receives $q$ votes with $p > q$, what is the probability that $A$ will be strictly ahead of $B$ throughout the count given that the first $m$ counted votes belong to $A$?

The part that is boldface is what I have added to the original problem. The answer to the original problem is $(p-q)/(p+q)$. I tried to find a recursive formula to solve this but I am really getting confused. Is that addressed in the literature?