wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> hard >> Card game (solution)
(Message started by: tim on Jul 28th, 2002, 2:46am)

Title: Card game (solution)
Post by tim on Jul 28th, 2002, 2:46am
The process I used to solve the card game was pretty simple:

Assume an infinite deck for simplicity, so each card is independent of previous ones.  Work out the expected value when there are 'n' cards remaining.  Use this to devise a strategy, then make refinements based on the finite size of the deck if necessary.

For the 4th card, the expected value is clearly 7.

For the 3rd card, if it is 8 or more, you will want to keep it.  Otherwise look at the fourth.  The expected value is then 7*7/13 + (8+9+10+11+12)/13.  That is, 7/13 chance of getting a low card and moving onto the single hidden card, and 1/13 chance of each of 8..13.  This works out to about 8.615.

For the 2nd card, you want to keep a 9 or more (i.e. more than 8.615), otherwise keep going.  Using the same iterative process, the value works out to about 9.533

For 3 more cards, keep 10+ (i.e. smallest card greater than 9.533).  This is the final case for the game, with a value of about 10.185 or something.  (From memory, I didn't write it down before moving onto the next part)

A finite deck should improve the value of the game since if you get poor cards in the beginning there is a slightly higher chance of getting better cards later.  This turns out to be true: the same strategy gives a values of 10.206947 (obtained through exhaustive computer enumeration).  Subtracting the $10 he has to pay to play, the net value to B is +0.206947.  So my strategy was a good one.

The finite deck should not shift the expected values enough to change the strategy except in one case:

If you are on the 3rd card, and it is a 7, and the average of the other two is greater than 7, then the expected value of the 4th card drops to very slightly under 7, so keep it.  With this modification to the strategy, the bet value to B increases to +0.207031.  As expected from how unlikely it is to arise, this is a trivial improvement in strategy, and so the original "infinite deck" one was really quite good enough.

Title: Re: Card game (solution)
Post by GRAND_ADMRL_THUORN on Feb 12th, 2003, 12:16pm
well thought out, and i agree w/ your strategy



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board