No longer updated!

## Tuesday, July 15, 2008

### The Card Riddle

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?

Answer: The solution to this problem is, in my opinion the most difficult to understand of all the puzzles. Indeed I was unable to solve it and didn't receive a complete solution until two years after originally posting it. The final solution, in the form of the spreadsheet was sent to me by Han Zheng.

For this reason I have left on the page the thoughts i had before I had the final solution as they represent an easier to understand and more simplistic approach. Also the reasoning may help you arrive at the final solution by yourself or help you understand it. I would recommend reading that answer before you dive into the full answer. But an important thing to note are that as the player we can't lose this game as we can gamble till all the cards are drawn and our net position is zero.

From our earlier analysis it is clear we need a dynamic quit rule. A singal value is not sufficent. We must, at each stage consider what cards are remaining, and therefor the probability of a positive or negative outcome from drawing again.

For the explanation i will ask you first to consider a deck containing only 6 cards, 3 +ve & 3 -ve (note i'm no longer calling the cards black and red, it confuses me.)