Ballot Problem & Catalan Paths

Lattice paths from (0,0) to (n,n) that never dip below the diagonal are counted by the n-th Catalan number C(n) = C(2n,n)/(n+1).

Ballot problem (Bertrand 1887): Candidate A gets p votes, B gets q<p. What's the probability A leads throughout counting? Answer: (p−q)/(p+q). Equivalently: paths from (0,0) to (p,q) that stay strictly above the diagonal = C(p+q,q)−C(p+q,q−1) (ballot numbers). Reflection principle: bad paths (touching diagonal) biject to all paths from (−1,1) to (p,q). Catalan numbers C(n) = C(2n,n)/(n+1) count Dyck paths — paths to (n,n) that never go below — giving 1,1,2,5,14,42,132,...
C(n) = — Total paths = —