Card Puzzle, Part 2

The motivation for last week’s puzzle was, of all things, casino blackjack.  Consider the following common situation: several players sit at a blackjack table, all playing individually against the same dealer from a common shoe.  All of the players at the table are “experts” who know how to play the game.  They all know when to stand, when to hit, etc…. except for one.

This one player is a beginner and doesn’t know the game very well.  (Or perhaps she read one of the many books containing inaccurate information about the game.)  Worse yet, the beginner sits at “third base,” the chair closest to the dealer, and so everyone’s attention is focused on her hand as the last to be completed before the dealer turns over his hole card and completes his hand.

The beginner has twelve against the dealer’s six.  Twelve seems like a small number, so she hits, drawing a ten and busting.  The dealer then turns over his hole card, revealing a ten, and draws a five for a total of 21, taking money from the rest of the table as well.

One of the experts grumbles that the beginner “took the dealer’s bust card.”  That is, if she had stayed with her twelve like she was supposed to do, the dealer would have drawn the ten and busted instead of her, and she and the rest of the table would have won the hand.  But another player objects to this, claiming that the beginner’s decisions have no effect on the average return of any other player at the table.  Who is right?

Ok, so that is the setup, what does all of this have to do with last week’s puzzle?  As I will try to show, the original puzzle and the situation described above are essentially the same problem.  More importantly, in both cases, there is a nice intuitive argument for the solution, that I think may be more persuasive than more technical arguments, particularly in the case of casino blackjack.

First, recall the original puzzle: consider a standard, shuffled poker deck of 52 playing cards, of which 26 are red and 26 are black.  I place the deck face down on a table.  I will draw a card, one at a time, from the top of the pile and place it face up on the table for you to see whether it is red or black.  At some point before drawing the last card in the deck, you must say, “Stop.”  If the next card that I turn over is red, you win one dollar.  If it is black, you lose one dollar.  What is the optimal strategy for playing this game, and what is the probability of winning?

Let us approach the problem in a few different ways.  First, we can throw the computer at it; following is Mathematica code that computes the maximum possible probability of winning, by choosing the larger of the probability of stopping now or (recursively) the probability of drawing another card to continue the game:

v[0, b_] := v[0, b] = 0
v[r_, 0] := v[r, 0] = 1
v[r_, b_] := v[r, b] = Max[r / (r + b), r / (r + b) v[r - 1, b] +
                                        b / (r + b) v[r, b - 1]]
v[26, 26]

(As an aside, following is the same algorithm in MATLAB.  It is interesting to compare the two, noting which is easier to read and write, and why.  Functional programming and built-in pattern matching and memoization can be powerful tools.)

function p = v(r, b)

persistent q;
if isempty(q)
    q = nan(r,b);
end

if r == 0
    p = 0;
elseif b == 0
    p = 1;
elseif ~isnan(q(r,b))
    p = q(r,b); % retrieve previously computed value
else
    p = max(r / (r + b), r / (r + b) * v(r - 1, b) + ...
                         b / (r + b) * v(r, b - 1));
    q(r,b) = p; % save value for later retrieval
end

Running either of these two programs, we see that we can do no better than winning with probability 1/2.  But the really interesting observation is that we also can do no worse.  That is, even replacing Max[] with Min[] in the above code, actively trying to perform as poorly as possible, still yields an overall probability of winning equal to 1/2.  In other words, the game is fair no matter what strategy we follow.

Now that we know that the answer is simple, can we convince ourselves with a simpler argument than the brute force computer solution above?  To do this, consider the following very slight modification of the game: suppose that when you say, “Stop,” rather than turning over the next card from the top of the face down deck, I instead turn over the card from the bottom of the deck, and if it is red you win, black you lose.

Assuming that we can convince ourselves that this is the “same game” in some sense, then it is now much easier to see that our choice of strategy makes no difference in the average outcome, because it makes no difference even in the particular outcome for a given shuffled arrangement of cards in the deck.  Your payoff was determined by the shuffle of the cards before you even decided on a strategy, let alone before you got around to saying, “Stop.”

Coming back to the blackjack table now, it turns out that the resolution of the argument is the same, and for the same reason: the other players should not grumble at the beginner, because her strategy for removing cards from the shoe (or not) has no effect, on average, on the outcome of the dealer’s (and thus the other players’) hands.  There are a few technical details to consider that are described in this paper if you are interested, including the sense in which the original puzzle may be viewed as a special case of the more complex game of blackjack.

But I think the key point in the paper is relatively simple to explain and understand, and thus may be more persuasive than more technical arguments, particularly when dealing with a frustrated and possibly intoxicated blackjack player who just lost his money.  Specifically, suppose that we make a similar hypothetical change to the rules of the game: the cards for all of the players at the blackjack table are dealt from the top of the shoe as usual, but the cards for the dealer’s hand are dealt from the bottom of the shoe.  Just as with the original puzzle, I think this perspective makes it clearer that any one player’s choice of strategy does not affect the probabilities of the various outcomes of the dealer’s hand.

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Card Puzzle, Part 2

  1. Pingback: Blackjack and pair splitting | Possibly Wrong

  2. Pingback: Another card puzzle | Possibly Wrong

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s