Coin Exchange (Part II)

Check out Part I of the problem here . It is less challenging, but I suggest trying it before this one.

Alison and Bob play a game with coins. Alison starts with 1 1 coin while Bob starts with 999 999 coins. Each turn, if Alison has a a coins and Bob has b b coins, Alison has a b 1000 \frac{b}{1000} chance of receiving a coin from Bob and a a 1000 \frac{a}{1000} chance of giving Bob a coin. Let A ( n ) A(n) denote the expected number of coins Alison has after n n turns. Find 1 0 5 A ( 30 ) 10^{5}A(30) rounded to the nearest integer.

A calculator should be used to compute the final answer. You may use a computer program only as last resort.


The answer is 3008773.

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.

1 solution

Sam Zhou
Jun 12, 2019

Let p k p_{k} be the probability that Alison has k k coins after n n turns. We can see that A ( n ) = i = 0 1000 i p i A(n)=\sum_{i=0}^{1000} ip_{i} .

If Alison has k k coins, she has a 1000 k 1000 \frac{1000-k}{1000} chance of gaining a coin and a k 1000 \frac{k}{1000} chance of losing one next turn. Therefore, her expected net gain each turn would be 1000 2 k 1000 \frac{1000-2k}{1000} .

A ( n + 1 ) = A ( n ) + i = 0 1000 1000 2 i 1000 p i = A ( n ) + i = 0 1000 p i 2 1000 ( i = 0 1000 i p i ) = A ( n ) + 1 1 500 A ( n ) = 499 500 A ( n ) + 1 A(n+1)=A(n)+\sum_{i=0}^{1000} \frac{1000-2i}{1000}p_{i}=A(n)+\sum_{i=0}^{1000} p_{i}-\frac{2}{1000}(\sum_{i=0}^{1000} ip_{i})=A(n)+1-\frac{1}{500}A(n)=\frac{499}{500}A(n)+1

Solve with the initial condition A ( 0 ) = 1 A(0)=1 , and we get A ( n ) = 1 + 499 500 A ( n 1 ) = 1 + 499 500 + ( 499 500 ) 2 A ( n 2 ) = . . . = i = 0 n ( 499 500 ) i = 1 ( 499 500 ) n + 1 1 499 500 = 500 ( 1 ( 499 500 ) n + 1 ) A(n)=1+\frac{499}{500}A(n-1)=1+\frac{499}{500}+(\frac{499}{500})^{2}A(n-2)=...=\sum_{i=0}^{n}(\frac{499}{500})^{i}=\frac{1-(\frac{499}{500})^{n+1}}{1-\frac{499}{500}}=500(1-(\frac{499}{500})^{n+1})

When n = 30 n=30 , A ( n ) = 30.08773 A(n)=30.08773 , so the answer is 3008773 \boxed{3008773} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...