The maximum earning is v(r,b)
Let v(r,b) be the expected value of the game for the player, assuming optimal play, if the remaining deck has r red cards and b black cards.
Then v(r,b) satisfies the recursion
and
The stopping rule is simple: Stop when v(r,b)=0.
To explain the recursion . . .
If r,b>0, and the player elects to play a card, then:
- The revealed card is red with probability , and in that case, the player gets a score of +1, and the new value is V(r-1,b)
- The revealed card is black with probability , and in that case, the player gets a score of −1, and the new value is V(r,b-1)
Thus, if r,b>0, electing to play a card yields the value f(r,b).
But the player always has the option to quit, hence, if r,b>0, we get v(r,b)=max(0,f(r,b)).
Implementing the recursion in Maple, the value of the game is
v(26,26)=41984711742427/15997372030584
v(26,26) ≈2.624475549
and the optimal stopping strategy is as follows . . .
- If 24≤b≤26, play while r≥b−5.
- If 17≤b≤23, play while r≥b−4.
- If 11≤b≤16, play while r≥b−3.
- If 6≤b≤10, play while r≥b−2.
- If 3≤b≤5, play while r≥b−1.
- If 1≤b≤2, play while r≥b.
- If b=0, play while r>0.
So, The maximum earning is v(r,b)
Learn more about PROBABILITY here
brainly.com/question/24756209
#SPJ4