Recall that the stopping rule for red and black is to continue playing until the gambler is ruined or her fortune reaches the target fortune $a$. Thus, the gambler's strategy is to decide how much to bet on each game before she must stop. Suppose that we have a class of strategies that correspond to certain valid fortunes and bets; $A$ will denote the set of fortunes and $B_{x}$ will denote the set of valid bets for $x\in A$. For example, sometimes (as with timid play) we might want to restrict the fortunes to set of integers $\{0, 1, , a\}$; other times (as with bold play) we might want to use the interval $\left[0 , 1\right]$ as the fortune space. As for the bets, recall that the gambler cannot bet what she does not have and does not bet more than she needs in order to reach the target. Thus, a betting function $S$ must satisfy

$$S(x)\le \min\{x , a-x\}\text{,\hspace{0.5em}}x\in A$$Moreover, we always restrict our strategies to those for which the stopping time is $N$ finite.

The success function of a strategy is the probability that the gambler reaches the target $a$ with that strategy, as a function of the initial fortune $x$. A strategy with success function $V$ is optimal if for any other strategy with success function $U$, we have $U(x)\le V(x)$ for $x\in A$

Show if there exists an optimal strategy, then the optimal success function is unique.

However, there may not exist an optimal strategy or there may be several optimal strategies. Moreover, the optimality question depends on the value of the game win probability $p$, in addition to the structure of fortunes and bets.

Our main theorem, and a sketch of its proof, are given in the following exercise:

A strategy $S$ with success function $V$ is optimal if

$$pV(x+y)+qV(x-y)\le V(x)\text{,\hspace{1em}}x\in A\text{,\hspace{0.5em}}y\in B_{x}$$- Consider the following strategy: if the initial fortune is $x\in A$, we pick $y\in A_{x}$ and then bet $y$ on the first game; thereafter we follow strategy $S$. Condition on the outcome of the first game to show that the success function for this new strategy is $U(x)=pV(x+y)+qV(x-y)$.
- Thus, the theorem can be restated as follows: If $S$ is optimal with respect to the class of strategies in part (a), then $S$ is optimal over all strategies.
- Let $T$ be an arbitrary strategy with success function $U$. The random variable $V(X_{n})$ can be interpreted as the probability of winning if the gambler's strategy is replaced by strategy $S$ after time $n$.
- Condition on the outcome of game $n$ to show that $(V(X_{n}), X_{0}=x)=(pV(X_{n-1}+Y_{n})+qV(X_{n-1}-Y_{n}), X_{0}=x)$.
- Use (d) and the optimality condition to show $(V(X_{n}), X_{0}=x)\le (V(X_{n-1}), X_{0}=x)$ for $n\in $ and $x\in A$.
- Use (e) to show that $(V(X_{n}), X_{0}=x)\le V(x)$ for $n\in $ and $x\in A$
- Let $N$ denote the stopping time for strategy $T$. Let $n\to \infty $ in (f) to show that $(V(X_{N}), X_{0}=x)\le V(x)$ for $x\in A$.
- Show that $(V(X_{N}), X_{0}=x)=U(x)\text{,\hspace{1em}}x\in A$.
- Conclude that $U(x)\le V(x)$ for $x\in A$.

Suppose now that $p\ge 1/2$ so that the trials are favorable (or at least not unfair) to the gambler. Next, suppose that all bets must be multiples of a basic unit, which we might as well assume is $1. Of course, real gambling houses have this restriction. Thus the set of valid fortunes is $A=\{0, 1, , a\}$ and the set of valid bets for $x\in A$ is $B_{x}=\{0, 1, , \min\{x , a-x\}\}$. Our main result, and a sketch of its proof, are given in the following exercise:

Show that timid play is an optimal strategy.

- Recall the success function $f$ for timid play.
- Recall the optimality condition in Exercise 2.
- Show first that optimality condition holds if $p=1/2$.
- If $p> 1/2$, show that the condition for optimality is equivalent to $p\left(\frac{q}{p}\right)^{(x+y)}+q\left(\frac{q}{p}\right)^{(x-y)}\ge \left(\frac{q}{p}\right)^{x}$
- Show that the inequality in (d) is equivalent to $pq(p^{y}-q^{y})(p^{(y-1)}-q^{(y-1)})\le 0$.
- Show that the inequality in (e) holds for $p> 1/2$.

In the red and black game set the target fortune to 16, the initial fortune to 8, and the game win probability to 0.45. Define the strategy of your choice and play 100 games. Compare your relative frequency of wins with the probability of winning with timid play.

We will now assume that the house allows arbitrarily small bets and that $p> 1/2$, so that the trials are strictly favorable. In this case it is natural to take the target as the monetary unit so that the set of fortunes is $A=\left[0 , 1\right]$, and the set of bets for $x\in A$ is $B_{x}=\left[0 , \min\{x , 1-x\}\right]$. Our main result, and a sketch of the proof, are given in the following exercise. The results for timid play will play an important role in the analysis, so we will let $f(j, a)$ denote the probability of reaching an integer target $a$, starting at the integer $j\in \left[0 , a\right]$, with unit bets.

Show that the optimal success function is $V(x)=1$ for $x\in \left(0 , 1\right]$.

- Fix a rational initial fortune $x=\frac{k}{n}\in \left[0 , 1\right]$. Let $m$ be a positive integer and suppose that, starting at $x$, the gambler bets $\frac{1}{mn}$ on each game.
- Show the strategy in (a) is equivalent to timid play with target fortune $mn$, and initial fortune $mk$,
- The probability of reaching the target 1 under the strategy in (b) is $f(mk, mn)$.
- Show that $f(mk, mn)\to 1$ as $m\to \infty $.
- From (d), show that $V(x)=1$ if $x\in \left(0 , 1\right]$ is rational.
- From (e) and the fact that $V$ is increasing to show that $V(x)=1$ for all $x\in \left(0 , 1\right]$

We will now assume that $p\le 1/2$ so that the trials are unfair, or at least not favorable. As before, we will take the target fortune as the basic monetary unit and allow any valid fraction of this unit as a bet. Thus, the set of fortunes is $A=\left[0 , 1\right]$, and the set of bets for $x\in A$ is $B_{x}=\left[0 , \min\{x , 1-x\}\right]$. The following exercise gives our main result and a sketch of the proof.

Show that bold play is optimal.

- Let $F$ denote the success function for bold play, and let $D(x, y)=F(\frac{x+y}{2})-pF(x)+qF(y)$
- Show that the optimality condition is in Exercise 2 equivalent to $D(x, y)\le 0$ for $0\le x\le y\le 1$.
- Use the continuity of $F$ to show that it suffices to prove the inequality in (b) when $x$ and $y$ are binary rationals.
- Show that the inequality in (b) holds when $x$ and $y$ have rank 0: $x=0$, $y=0$; $x=0$, $y=1$; and $x=1$, $y=1$.
- Suppose that the inequality in (b) holds when $x$ and $y$ have rank $m$ or less. For parts (f)-(k) below, suppose that $x$ and $y$ have rank $m+1$ or less.
- Suppose that $x\le y\le 1/2$. Show that $D(x, y)=pD(2x, 2y)$.
- Suppose that $1/2\le x\le y$. Show that, $D(x, y)=qD(2x-1, 2y-1)$.
- Suppose that $x\le \frac{x+y}{2}\le 1/2\le y$ and that $2y-1\le 2x$. Show that $D(x, y)=qF(2y-1)+qD(2y-1, 2x)$
- Suppose that $x\le \frac{x+y}{2}\le 1/2\le y$ and that $2x\le 2y-1$. Show that $D(x, y)=qF(2x)+qD(2x, 2y-1)$
- Suppose that $x\le 1/2\le \frac{x+y}{2}\le y$ and that $2y-1\le 2x$. Show that $D(x, y)=p(q-p)(1-F(2x))+pD(2y-1, 2x)$
- Suppose that $x\le 1/2\le \frac{x+y}{2}\le y$ and that $2x\le 2y-1$. Show that $D(x, y)=p(q-p)(1-F(2y-1))+pD(2x, 2y-1)$
- Use the induction hypothesis in (e) and parts (f)-(k) to finish the proof that bold play is optimal when the trials are unfair.

In the red and black game, set the target fortune to 16, the initial fortune to 8, and the game win probability to 0.45. Define the strategy of your choice and play 100 games. Compare your relative frequency of wins with the probability of winning with bold play.

Consider again the sub-fair case where $p\le 1/2$ so that the trials are not favorable to the gambler. We will show that bold play is not the only optimal strategy; amazingly, there are infinitely many optimal strategies. Recall first that the bold strategy has betting function

$$S_{1}(x)=\min\{x , 1-x\}=\begin{cases}x & \text{if $0\le x\le 1/2$}\\ 1-x & \text{if $1/2\le x\le 1$}\end{cases}$$Now consider the following strategy, which we will refer to as the second order bold strategy:

- With fortune $x\in \left(0 , 1/2\right)$, play boldly with the object of reaching $1/2$ before falling to 0.
- With fortune $x\in \left(1/2 , 1\right)$, play boldly with the object of reaching 1 without falling below $1/2$.
- With fortune $1/2$, bet $1/2$.

Show that the second order bold strategy has betting function $S_{2}$ given by

- $S_{2}(x)=x$ if $x\in \left[0 , 1/4\right]$
- $S_{2}(x)=1/2-x$ if $x\in \left[1/4 , 1/2\right)$
- $S_{2}(1/2)=1/2$
- $S_{2}(x)=x-1/2$ if $x\in \left(1/2 , 3/4\right]$
- $S_{2}(x)=1-x$ if $x\in \left(3/4 , 1\right]$

Show that the second order bold strategy is optimal.

- Let $F_{2}$ denote the success function associated with strategy $S_{2}$.
- Suppose that the player starts with fortune $x\in \left(0 , 1/2\right)$ under strategy $S_{2}$. Note that the player reaches the target 1 if and only if she reaches $1/2$. and then wins the final game.
- In the setting of (b), consider the sequence of fortunes until the player reaches 0 or $1/2$. Argue that if we double the fortunes, then we have the fortune sequence under the ordinary bold strategy, starting at $2x$ and terminating at either 0 or 1.
- From parts (b) and (c) argue that $F_{2}(x)=pF(2x)$.
- Suppose that the player starts with fortune $x\in \left(1/2 , 1\right)$ under strategy $S_{2}$. Note that the player reaches the target 1 if and only if she reaches 1 without falling back to $1/2$ or falls back to $1/2$ and then wins the final game.
- In the setting of (b), consider the sequence of fortunes until the player reaches $1/2$ or 1. Argue that if we double the fortunes and subtract 1, then we have the fortune sequence under the ordinary bold strategy, starting at $2x-1$ and terminating at either 0 or 1.
- Argue from (e) and (f) that $F_{2}(x)=F(2x-1)-1p$.
- Using (d) and (g) and the functional equation for ordinary bold play, conclude that $F_{2}(x)=F(x)$ for all $x\in \left(0 , 1\right]$, and hence that .$S_{2}$ is optimal.

Once we understand how this construction is done, it's straightforward to define the third order bold strategy and show that it's optimal as well. The graph of the betting function is shown below:

Explicitly give the third order betting function and show that the strategy is optimal.

More generally, we can define the $(n)$ order bold strategy and show that it is optimal as well.

Show that the sequence of bold strategies can be defined recursively from the basic bold strategy $S_{1}$ as follows:

- $S_{n+1}(x)=1/2S_{n}(2x)$ if $x\in \left[0 , 1/2\right)$
- $S_{n+1}(x)=1/2S_{n}(2x-1)$ if $x\in \left(1/2 , 1\right]$
- $S_{n+1}(1/2)=1/2$

Even more generally, we can define an optimal strategy $T$ in the following way: for each $x\in \left[0 , 1\right]$ select $n_{x}\in $ and let $T(x)=S_{n_{x}}(x)$. The graph below shows a few of the graphs of the bold strategies. For an optimal strategy $T$, we just need to select, for each $x$ a bet on one of the graphs.