# Combinatorics/probability ballot problem

Suppose that there’s an election! Two candidates, Sherlock and Moriarty, are running for office. Suppose that Sherlock receives 8 votes and Moriarty receives 7 votes, and that these votes are being counted up one-by-one to create a running total. What is the probability that Sherlock is never behind in this running total? In general, if Sherlock got s votes and Moriarty got m votes, what is this probability? Can anyone help me explain this problem? There seems to be a bunch of different cases here for which I have not figured out what the best approach is.

I give the answer for the special case of $$s=m=n$$. Considering an opening bracket a vote for Sherlock and a closing bracket a vote for Moriarty, you're actually looking for the number of valid strings with $$n$$ pairs of brackets, which equals the $$n^{th}$$ Catalan number, i.e., $$C_n$$. Thus, the probability you're looking after in this special case equals: $$\frac{C_n \times n! \times n!}{(2n)!}.$$