“Red Black Card Game and Generalized Catalan Numbers”, Ben Howe2014-07-05 (, ; backlinks)⁠:

“Puzzle #14: 52 Cards Win a Dollar”:

You have 52 playing cards (26 red, 26 black). You draw cards one by one. A red card pays you a dollar. A black one fines you a dollar. You can stop any time you want. Cards are not returned to the deck after being drawn. What is the optimal stopping rule in terms of maximizing expected payoff?

Also, what is the expected payoff following this optimal rule?

A link between Catalan numbers and a simple gambling card game is shown. The Catalan numbers are generalized in order to form the complete statistics to the card game.

My discovery of the statistics of the game was done by a progression from brute force to smarter & smarter spreadsheets & C programs (because I am a programmer).

It took me far too long to reach the final solution. The solution is somewhat simple and elegant, but the path to reach the solution was not clear (at least not for me). I hope that this paper will help others skip straight to the elegant solution.

The paper also explains the reason why the possible “winnings” distribution closely resembles a Rayleigh distribution.