Push your luck?

You can play a game with me. I have 10 10 coins, each showing $ 1 \$1 on one side and GAME OVER \text{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 \text{GAME OVER} , then game over, you lose, go home with nothing. If any of them shows $ 1 \$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 \text{GAME OVER} face side up)?

Here's an example game. I toss the coins, you get $ 1 \$1 on six coins, so the prize is now at $ 6 \$6 . If you quit now, you collect $ 6 \$6 ; if you continue, I will toss the remaining four coins. Suppose that you continue; among the four coins, two more come up $ 1 \$1 , adding to your prize pool to $ 8 \$8 . You could have quit with $ 8 \$8 , but no, you decide to continue again, with only two coins left. I toss them, and they come out GAME OVER \text{GAME OVER} for both. Game over, you lose, you don't get the eight dollars.

Let E E be the expected amount of money you can get by playing optimally. What is 1 0 4 E \lfloor 10^4E \rfloor ?

(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.)

Image Credit: Flickr Coins


The answer is 77985.

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.

2 solutions

Mark Hennings
Sep 29, 2016

Let E k 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 k , for any 0 k 9 0 \le k \le 9 . Clearly E k = 1 2 10 k [ j = 1 10 k ( 10 k j ) j k ] = 1 2 ( 10 k ) k 2 10 k 0 k 9 E_k \; = \; \frac{1}{2^{10-k}}\left[\sum_{j=1}^{10-k}\binom{10-k}{j}j - k\right] \; = \; \tfrac12(10-k) - \frac{k}{2^{10-k}} \hspace{1cm} 0 \le k \le 9 Since E k > 0 E_k > 0 for 0 k 7 0 \le k \le 7 , while E k < 0 E_k < 0 for k = 8 , 9 k = 8,9 , it follows that the optimum strategy is to keep playing so long as your total gain is 7 7 or less, but to take the money and run if your total gain is 8 8 or more.

Let P j P_j , for 0 j 10 0 \le j \le 10 , 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 j . Thus P 8 = 8 P_8 = 8 , P 9 = 9 P_9 = 9 , P 10 = 10 P_{10} = 10 , while, for 0 j 7 0 \le j \le 7 , P j = 1 2 10 j k = 1 10 j ( 10 j k ) P j + k = 1 2 10 j k = j + 1 10 ( 10 j k j ) P k P_j \; = \; \frac{1}{2^{10-j}}\sum_{k=1}^{10-j}\binom{10-j}{k}P_{j+k} \; = \; \frac{1}{2^{10-j}} \sum_{k=j+1}^{10} \binom{10-j}{k-j}P_k It is a simple calculation that P 0 = 7.7985122 P_0 =7.7985122 , making the answer 77985 \boxed{77985} .

Ivan Koswara
Mar 3, 2015

Suppose $ 1 \$1 face is heads and GAME OVER \text{GAME OVER} face is tails.

The idea is a simple recurrence system.

Suppose E ( n ) E(n) is the expected value that you can get with n n coins remaining, right before you make your choice. Thus E ( 0 ) = 10 E(0) = 10 ; 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 ( 10 ) E(10) . 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 ) E(n) is the maximum of the two choices: either you quit, pocketing 10 n 10-n dollars, or you push on. The latter is simple: i = 1 n ( n i ) E ( n i ) \displaystyle \sum_{i=1}^n \binom{n}{i} E(n-i) , corresponding to getting i i dollars: there are ( n i ) \binom{n}{i} to get i i heads, and after getting i i heads, you're left with n i n-i coins, thus the expected value is E ( n i ) E(n-i) . Note that it's not i + E ( n i ) i+E(n-i) or anything; the i 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 ) E(n-i) already. Also note that the summation starts from 1 1 , since with 0 0 heads you lose already. So E ( n ) = max ( 10 n , i = 1 n ( n i ) E ( n i ) ) E(n) = \displaystyle \max \left( 10-n, \sum_{i=1}^n \binom{n}{i} E(n-i) \right) for all 1 n 10 1 \le n \le 10 . By computing carefully, we obtain that E ( 10 ) = 274385754976485 35184372088832 7.79851 E(10) = \frac{274385754976485}{35184372088832} \approx 7.79851 , so 1 0 4 E 77985.1 = 77985 \lfloor 10^4E \rfloor \approx \lfloor 77985.1 \rfloor = \boxed{77985} .


This problem is inspired by Tiny Dice Dungeon , although it has a completely different setup (no fixed number of "coins", any single GAME OVER \text{GAME OVER} loses).

What is your optimal strategy?

Mark Hennings - 4 years, 8 months ago

Log in to reply

Oh, right, I didn't actually construct the strategy. Note that E ( n ) = max { 10 n , something } E(n) = \max \{10-n, \sum \text{something} \} ; this corresponds to the two choices we have. If E ( n ) = 10 n E(n) = 10-n , then this corresponds to stopping; if E ( n ) E(n) is the other term, then this corresponds to continuing. So after computing E ( n ) E(n) for all 0 n 10 0 \le n \le 10 , the strategy is to stop if E ( n ) = 10 n E(n) = 10-n and to continue otherwise.

Ivan Koswara - 4 years, 8 months ago

Log in to reply

My solution shows what the strategy is...

Mark Hennings - 4 years, 8 months ago

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 ) E(n) actually corresponds to 10 n 10-n and thus which values of n n we should stop on. If your solution is also correct, then the values of n n where you should stop are 0 , 1 , 2 0, 1, 2 .

Ivan Koswara - 4 years, 8 months ago

It seems that you forgot to divide the sum of combinatoric number by 2^n..

Pi Maths - 1 year, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...