All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Games
Card game (Posted on 2006-08-12) Difficulty: 3 of 5
Jack has challenged you to play a card game with him. The idea of the game is that a player gets a random card and after seeing it it's placed back in the deck. The player may get as many cards as he/she wants and the sum of the values of these cards represents the points this player got. However if the player gets an ace he/she gets zero points as total and the other player may try. How should one play this game (how many cards should be picked) for maximum chance of winning against Jack?
Face cards can be interpreted so that king is 13 points, queen is 12 points and jack is 11 points.

No Solution Yet Submitted by atheron    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
mathematical description of tables in computer solution | Comment 4 of 8 |
(In reply to computer assisted solution by Charlie)

My post included several tables of functions, produced by computer program.  Here are the mathematical notations for the functions:

exact(n) is the probability of hitting exactly n as a total somewhere before hitting an ace:

exact(n) = 0, if n < 0
         = 1, if n = 0
         = Sigma{i=n-13 to n-2} (exact(i)/13), otherwise

atLeast(n) is the probability of reaching at least n as a total somewhere before hitting an ace:
        
atLeast(n) = 0, if n < 0
           = 1, if n = 0
           = Sigma{i=n-13 to n-2} (exact(i) * (i-n+14))/13  +  exact(n-1)*12/13, otherwise
          
Note that the last term is outside the Sigma, as an exact hit either 2 less or 1 less (the exceptional term) than n has 12 out of 13 chances of reaching or exceeding n, via cards 2 through 13.       

The probability of winning by staying with the total one has (n) is simply 1 - atLeast(n+1).  The probability of winning if one chooses to draw another card when one already has n points is given by

Sigma{i=2 to 13}(1-atLeast(n+i+1))/13

The overall probability of winning, given that one has chosen at the outset to stop when reaching a total of at least n is given by:

Sigma{i=n-13 to n-2} (Sigma{j=n-i to 13} (exact(i) * (1 - atLeast(i + j + 1)) / 13)
 + Sigma{j=2 to 13}(exact(n-1)*(1-atLeast(n+j))/13 )
 
 Note the second Sigma on j is within the Sigma on i.  Its separation corresponds with the exclusion of j=1 in the computer program, as aces don't count in adding to totals.

Edited on August 13, 2006, 11:35 am
  Posted by Charlie on 2006-08-13 11:34:42

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information