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:
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 . . .
So, The maximum earning is v(r,b)
Learn more about PROBABILITY here
https://brainly.com/question/24756209
#SPJ4