You can play a game with me. I have
1
0
coins, each showing
$
1
on one side and
GAME OVER
on the other. All coins are fair, trust me. The game is as follows: each turn, I will toss all the coins still in the game. If all of them shows
GAME OVER
, then game over, you lose, go home with nothing. If any of them shows
$
1
, you score a dollar for each of them, I will put them aside, and you get a choice: do you want to go home with what you have, or push your luck, try to get more money, let me toss the remaining coins (those with
GAME OVER
face side up)?
Here's an example game. I toss the coins, you get $ 1 on six coins, so the prize is now at $ 6 . If you quit now, you collect $ 6 ; if you continue, I will toss the remaining four coins. Suppose that you continue; among the four coins, two more come up $ 1 , adding to your prize pool to $ 8 . You could have quit with $ 8 , but no, you decide to continue again, with only two coins left. I toss them, and they come out GAME OVER for both. Game over, you lose, you don't get the eight dollars.
Let E be the expected amount of money you can get by playing optimally. What is ⌊ 1 0 4 E ⌋ ?
(You may use a calculator or similar to do calculations. You may also try simulating it, but I'm pretty sure you won't get it simply with simulation.)
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Suppose $ 1 face is heads and GAME OVER face is tails.
The idea is a simple recurrence system.
Suppose E ( n ) is the expected value that you can get with n coins remaining, right before you make your choice. Thus E ( 0 ) = 1 0 ; if you survive with zero coins left, clearly you should quit, since if you "play" there will be no heads coming up and thus you lose. Also, you're looking for E ( 1 0 ) . Clearly you shouldn't quit before you play the game, so giving the possibility of quitting at the beginning won't change the result.
Now, E ( n ) is the maximum of the two choices: either you quit, pocketing 1 0 − n dollars, or you push on. The latter is simple: i = 1 ∑ n ( i n ) E ( n − i ) , corresponding to getting i dollars: there are ( i n ) to get i heads, and after getting i heads, you're left with n − i coins, thus the expected value is E ( n − i ) . Note that it's not i + E ( n − i ) or anything; the i heads we have won't necessarily cash out, if it turns out that we lose later, and they are counted in E ( n − i ) already. Also note that the summation starts from 1 , since with 0 heads you lose already. So E ( n ) = max ( 1 0 − n , i = 1 ∑ n ( i n ) E ( n − i ) ) for all 1 ≤ n ≤ 1 0 . By computing carefully, we obtain that E ( 1 0 ) = 3 5 1 8 4 3 7 2 0 8 8 8 3 2 2 7 4 3 8 5 7 5 4 9 7 6 4 8 5 ≈ 7 . 7 9 8 5 1 , so ⌊ 1 0 4 E ⌋ ≈ ⌊ 7 7 9 8 5 . 1 ⌋ = 7 7 9 8 5 .
This problem is inspired by Tiny Dice Dungeon , although it has a completely different setup (no fixed number of "coins", any single GAME OVER loses).
What is your optimal strategy?
Log in to reply
Oh, right, I didn't actually construct the strategy. Note that E ( n ) = max { 1 0 − n , ∑ something } ; this corresponds to the two choices we have. If E ( n ) = 1 0 − n , then this corresponds to stopping; if E ( n ) is the other term, then this corresponds to continuing. So after computing E ( n ) for all 0 ≤ n ≤ 1 0 , the strategy is to stop if E ( n ) = 1 0 − n and to continue otherwise.
Log in to reply
My solution shows what the strategy is...
Log in to reply
@Mark Hennings – Yeah, I forgot my computation (it has been 1.5 years), so I forgot which values of E ( n ) actually corresponds to 1 0 − n and thus which values of n we should stop on. If your solution is also correct, then the values of n where you should stop are 0 , 1 , 2 .
It seems that you forgot to divide the sum of combinatoric number by 2^n..
Problem Loading...
Note Loading...
Set Loading...
Let E k be the expected additional gain you make from a single round of the game, if you have already have a total of k , for any 0 ≤ k ≤ 9 . Clearly E k = 2 1 0 − k 1 [ j = 1 ∑ 1 0 − k ( j 1 0 − k ) j − k ] = 2 1 ( 1 0 − k ) − 2 1 0 − k k 0 ≤ k ≤ 9 Since E k > 0 for 0 ≤ k ≤ 7 , while E k < 0 for k = 8 , 9 , it follows that the optimum strategy is to keep playing so long as your total gain is 7 or less, but to take the money and run if your total gain is 8 or more.
Let P j , for 0 ≤ j ≤ 1 0 , be the expected final profit you will make if you are in the middle of a game, playing the optimal strategy, and currently have a total of j . Thus P 8 = 8 , P 9 = 9 , P 1 0 = 1 0 , while, for 0 ≤ j ≤ 7 , P j = 2 1 0 − j 1 k = 1 ∑ 1 0 − j ( k 1 0 − j ) P j + k = 2 1 0 − j 1 k = j + 1 ∑ 1 0 ( k − j 1 0 − j ) P k It is a simple calculation that P 0 = 7 . 7 9 8 5 1 2 2 , making the answer 7 7 9 8 5 .