On High Rollers

In the Baron's most recent wager, he was to roll a twenty sided die marked with the digits zero to nine twice apiece and place it either upon a space representing tens or upon another representing ones according to his fancy, after which Sir R----- was to do the same. Then the Baron and Sir R----- were to roll a second die each and place them upon their empty spaces. If the number thus made by the Baron was smaller than that made by Sir R-----, then Sir R----- was to have a prize of twenty nine coins from the Baron, otherwise the Baron was to have one of thirty coins from Sir R-----.

The key to figuring the fairness of the wager lies in recognising that there exists an optimal strategy that the Baron should have followed if he were at all desirous of victory and another that Sir R----- should have adopted if he were at all keen to frustrate him.
Indeed, I explained as much to the Baron, but I fear that he may not have entirely grasped its significance.

Specifically, if the Baron's first roll was five or greater then he should have placed the die upon his tens space, with the expectation that he was more likely than not to roll no greater with his second die, otherwise he should have placed it upon the ones, with precisely the opposite expectation.
In the first case, if Sir R----- rolled greater than the Baron then he should have placed his die upon his tens space for assured victory. If he instead rolled lower then he should have placed it upon his ones space to stave off assured defeat. Finally, if he rolled equally then he should have placed it upon the tens space with the same expectation that he was more likely than not to roll no better with his second die.
In the second case, Sir R----- should simply have taken the Baron's strategy and placed the die upon his ones space if he rolled less than five and upon his tens space otherwise.

If we label the Baron's first die $$b_1$$ and Sir R-----'s $$r_1$$ then we can express these contingencies as
\begin{align*} &b_1 \geqslant 5 \wedge r_1 > b_1\\ &b_1 \geqslant 5 \wedge r_1 = b_1\\ &b_1 \geqslant 5 \wedge r_1 < b_1\\ &b_1 < 5 \wedge r_1 \geqslant 5\\ &b_1 < 5 \wedge r_1 < 5 \end{align*}
where $$\wedge$$ stands for and.

Now Sir R----- is sure to win in the first case, which occurs with a probability of
$\Pr\left(b_1 \geqslant 5 \wedge r_1 > b_1\right) = \sum_{b_1=5}^9 \frac{1}{10} \times \frac{9-b_1}{10} = \frac{4 + 3 + 2 + 1 + 0}{100} = \frac{1}{10}$
where $$\sum$$ is the summation sign. Here we're exploiting the facts that each number from zero to nine has one chance in ten of being rolled and that there are $$9-b_1$$ numbers between zero and nine that are greater than $$b_1$$.

In the second case, Sir R----- must roll higher than the Baron with his second die to secure victory
$b_1 \geqslant 5 \wedge r_1 = b_1 \wedge r_2 > b_2$
an eventuality that has a likelihood of
\begin{align*} \Pr\left(b_1 \geqslant 5 \wedge r_1 = b_1 \wedge r_2 > b_2\right) &= \Pr\left(b_1 \geqslant 5 \wedge r_1 = b_1\right) \times \Pr\left(r_2 > b_2\right)\\ &= \left(\frac{1}{2} \times \frac{1}{10}\right) \times \left(\sum_{b_2=0}^9 \frac{1}{10} \times \frac{9-b_2}{10}\right)\\ &= \frac{1}{20} \times \frac{9+8+7+6+5+4+3+2+1+0}{100}\\ &= \frac{1}{20} \times \frac{45}{100} = \frac{9}{400} \end{align*}
In the third case there are two possible conclusions in which Sir R----- prevails. Firstly, if his second roll is greater than the Baron's first
$b_1 \geqslant 5 \wedge r_1 < b_1 \wedge r_2 > b_1$
and secondly if it is equal to it and the Baron's second roll is less than Sir R-----'s first
$b_1 \geqslant 5 \wedge r_1 < b_1 \wedge r_2 = b_1 \wedge b_2 < r_1$
The chances of these outcomes are
\begin{align*} \Pr\left(b_1 \geqslant 5 \wedge r_1 < b_1 \wedge r_2 > b_1\right) &= \sum_{b_1=5}^9 \frac{1}{10} \times \frac{b_1}{10} \times \frac{9-b_1}{10}\\ &= \frac{5 \times 4 + 6 \times 3 + 7 \times 2 + 8 \times 1 + 9 \times 0}{1,000}\\ &= \frac{20 + 18 + 14 + 8}{1,000} = \frac{3}{50} \end{align*}
and
\begin{align*} \Pr\left(b_1 \geqslant 5 \wedge r_1 < b_1 \wedge r_2 = b_1 \wedge b_2 < r_1\right) &= \sum_{b_1=5}^9 \frac{1}{10} \times \sum_{r_1=0}^{b_1-1} \frac{1}{10} \times \frac{1}{10} \times \frac{r_1}{10}\\ &= \sum_{b_1=5}^9 \; \sum_{r_1=0}^{b_1-1} \frac{r_1}{10,000} \end{align*}
Now the inner sum here is an arithmetic series and so, by the law that governs them, must satisfy
$\sum_{i=0}^n i \times d = \frac{1}{2} \times n \times (n+1) \times d$
and consequently
\begin{align*} \Pr\left(b_1 \geqslant 5 \wedge r_1 < b_1 \wedge r_2 = b_1 \wedge b_2 < r_1\right) &= \sum_{b_1=5}^9 \frac{\frac{1}{2} \times \left(b_1-1\right) \times \left(b_1-1+1\right)}{10,000}\\ &= \sum_{b_1=5}^9 \frac{\left(b_1-1\right) \times b_1}{20,000}\\ &= \frac{4 \times 5 + 5 \times 6 + 6 \times 7 + 7 \times 8 + 8 \times 9}{20,000}\\ &= \frac{20 + 30 + 42 + 56 + 72}{20,000} = \frac{11}{1,000} \end{align*}
Similarly, there are two outcomes following from the fourth case in which Sir R----- takes the prize; if the Baron's second roll is less than Sir R-----'s first, or if it equals it and Sir R-----'s second roll is greater than the Baron's first
\begin{align*} &b_1 < 5 \wedge r_1 \geqslant 5 \wedge b_2 < r_1\\ &b_1 < 5 \wedge r_1 \geqslant 5 \wedge b_2 = r_1 \wedge r_2 > b_1 \end{align*}
We can figure the chances of these with
$\Pr\left(b_1 < 5 \wedge r_1 \geqslant 5 \wedge b_2 < r_1\right) = \frac{1}{2} \times \sum_{r_1=5}^9 \frac{1}{10} \times \frac{r_1}{10} = \frac{1}{2} \times \frac{5+6+7+8+9}{100} = \frac{1}{2} \times \frac{35}{100} = \frac{7}{40}$
and
$\Pr\left(b_1 < 5 \wedge r_1 \geqslant 5 \wedge b_2 = r_1 \wedge r_2 > b_1\right) = \sum_{b_1=0}^4 \frac{1}{10} \times \frac{1}{2} \times \frac{1}{10} \times \frac{9-b_1}{10} = \frac{9+8+7+6+5}{2,000} = \frac{7}{400}$
Finally, in the last case Sir R----- wins if his second roll exceeds the Baron's or if it is equal and his first roll was greater than the Baron's
\begin{align*} &b_1 < 5 \wedge r_1 < 5 \wedge r_2 > b_2\\ &b_1 < 5 \wedge r_1 < 5 \wedge r_2 = b_2 \wedge r_1 > b_1 \end{align*}
which have likelihoods of
\begin{align*} \Pr\left(b_1 < 5 \wedge r_1 < 5 \wedge r_2 > b_2\right) &= \frac{1}{2} \times \frac{1}{2} \times \sum_{b_2=0}^9 \frac{1}{10} \times \frac{9-b_2}{10}\\ &= \frac{9+8+7+6+5+4+3+2+1+0}{400} = \frac{9}{80} \end{align*}
and
\begin{align*} \Pr\left(b_1 < 5 \wedge r_1 < 5 \wedge r_2 = b_2 \wedge r_1 > b_1\right) &= \Pr\left(b_1 < 5 \wedge r_2 = b_2 \wedge r_1 < 5 \wedge r_1 > b_1\right)\\ &= \sum_{b_1=0}^4 \frac{1}{10} \times \frac{1}{10} \times \frac{4-b_1}{10}\\ &= \frac{4+3+2+1+0}{1,000} = \frac{1}{100} \end{align*}
Note that, since we're only considering those circumstances in which the Baron's and Sir R-----'s first rolls were less than five, there are but $$4-b_1$$ chances in ten that $$r_1$$ was greater than $$b_1$$.

Having enumerated each and every way in which Sir R----- might have defeated the Baron, we need simply add their probabilities to figure the likelihood that he should have done so.
\begin{align*} &\frac{1}{10} + \frac{9}{400} + \frac{3}{50} + \frac{11}{1,000} + \frac{7}{40} + \frac{7}{400} + \frac{9}{80} + \frac{1}{100}\\ &\quad = \frac{200}{2,000} + \frac{45}{2,000} + \frac{120}{2,000} + \frac{22}{2,000} + \frac{350}{2,000} + \frac{35}{2,000} + \frac{225}{2,000} + \frac{20}{2,000}\\ &\quad = \frac{1,017}{2,000} \end{align*}
Sir R-----'s expected winnings were therefore
$\frac{1,017}{2,000} \times 29 - \frac{983}{2,000} \times 30 = \frac{29,493}{2,000} - \frac{29,490}{2,000} = \frac{3}{2,000}$
and I should have had no compunction whatsoever in suggesting that he take on the Baron's challenge!

But alas, I should have been wrong to do so; the diligent Mister O--[1] has deduced that the Baron should have been better served had he first cast a five if he had placed it upon his ones space!

Now it is still the case that, should the Baron have first rolled five or less and placed his die upon the ones, Sir R----- should have placed his first upon the tens if it were a five since he would have won the wager if either
$b_2 < 5$
or
$b_2 = 5 \wedge r_2 > b_1$
which would happen with probabilities
\begin{align*} \Pr\left(b_2 < 5\right) &= \frac12\\ \Pr\left(b_2 = 5 \wedge r_2 > b_1\right) &= \frac{1}{10} \times \sum_{b_1=0}^5 \frac{1}{6} \times \frac{9-b_1}{10} =\frac{9+8+7+6+5+4}{600} = \frac{39}{600} \end{align*}
since there are but six such outcomes for the Baron's first die, totalling $$339$$ chances in $$600$$. In contrast, if Sir R----- had placed his five in the ones space then he should have triumphed in the eventualities
\begin{align*} &r_2 > b_2\\ &r_2 = b_2\wedge b_1 < 5 \end{align*}
which have probabilities of
\begin{align*} \Pr\left(r_2 > b_2\right) &= \sum_{b_2=0}^9 \frac{1}{10} \times \frac{9-b_2}{10} = \frac{9+8+7+6+5+4+3+2+1+0}{100} = \frac{9}{20} = \frac{270}{600}\\ \Pr\left(r_2 = b_2 \wedge b_1 < 5\right) &= \frac{1}{10} \times \frac{5}{6} = \frac{1}{12} = \frac{50}{600} \end{align*}
totalling just $$320$$ chances in $$600$$. Sir R----- should therefore have adopted the former strategy and we must consider the cases
\begin{align*} &b_1 > 5 \wedge r_1 > b_1\\ &b_1 > 5 \wedge r_1 = b_1\\ &b_1 > 5 \wedge r_1 < b_1\\ &b_1 \leqslant 5 \wedge r_1 \geqslant 5\\ &b_1 \leqslant 5 \wedge r_1 < 5 \end{align*}
The first of these occurs with probability
$\Pr\left(b_1 > 5 \wedge r_1 > b_1\right) = \sum_{b_1=6}^9 \frac{1}{10} \times \frac{9-b_1}{10} = \frac{3 + 2 + 1 + 0}{100} = \frac{3}{50}$
and ensures victory for Sir R-----.

Once again, Sir R----- will emerge victorious in the second case only if his second roll exceeds the Baron's, which happens with a probability of
\begin{align*} \Pr\left(b_1 > 5 \wedge r_1 = b_1 \wedge r_2 > b_2\right) &= \Pr\left(b_1 > 5 \wedge r_1 = b_1\right) \times \Pr\left(r_2 > b_2\right)\\ &= \left(\frac{4}{10} \times \frac{1}{10}\right) \times \left(\sum_{b_2=0}^9 \frac{1}{10} \times \frac{9-b_2}{10}\right)\\ &= \frac{1}{25} \times \frac{9+8+7+6+5+4+3+2+1+0}{100}\\ &= \frac{1}{25} \times \frac{45}{100} = \frac{9}{500} \end{align*}
In the third case Sir R----- will win if either his second die is greater than the Baron's first or if it is equal and the Baron's second is less than his first, for which we can figure the probabilities
\begin{align*} \Pr\left(b_1 > 5 \wedge r_1 < b_1 \wedge r_2 > b_1\right) &= \sum_{b_1=6}^9 \frac{1}{10} \times \frac{b_1}{10} \times \frac{9-b_1}{10}\\ &= \frac{6 \times 3 + 7 \times 2 + 8 \times 1 + 9 \times 0}{1,000}\\ &= \frac{18 + 14 + 8}{1,000} = \frac{1}{25} \end{align*}
and
\begin{align*} \Pr\left(b_1 > 5 \wedge r_1 < b_1 \wedge r_2 = b_1 \wedge b_2 < r_1\right) &= \sum_{b_1=6}^9 \frac{1}{10} \times \sum_{r_1=0}^{b_1-1} \frac{1}{10} \times \frac{1}{10} \times \frac{r_1}{10}\\ &= \sum_{b_1=6}^9 \; \sum_{r_1=0}^{b_1-1} \frac{r_1}{10,000}\\ &= \sum_{b_1=6}^9 \frac{\frac{1}{2} \times \left(b_1-1\right) \times \left(b_1-1+1\right)}{10,000}\\ &= \frac{5 \times 6 + 6 \times 7 + 7 \times 8 + 8 \times 9}{20,000}\\ &= \frac{30 + 42 + 56 + 72}{20,000} = \frac{1}{100} \end{align*}
The two winning outcomes for Sir R----- in the fourth case are now
\begin{align*} &b_1 \leqslant 5 \wedge r_1 \geqslant 5 \wedge b_2 < r_1\\ &b_1 \leqslant 5 \wedge r_1 \geqslant 5 \wedge b_2 = r_1 \wedge r_2 > b_1 \end{align*}
having likelihoods of
$\Pr\left(b_1 \leqslant 5 \wedge r_1 \geqslant 5 \wedge b_2 < r_1\right) = \frac{6}{10} \times \sum_{r_1=5}^9 \frac{1}{10} \times \frac{r_1}{10} = \frac{3}{5} \times \frac{5+6+7+8+9}{100} = \frac{3}{5} \times \frac{35}{100} = \frac{21}{100}$
and
\begin{align*} \Pr\left(b_1 \leqslant 5 \wedge r_1 \geqslant 5 \wedge b_2 = r_1 \wedge r_2 > b_1\right) &= \sum_{b_1=0}^5 \frac{1}{10} \times \frac{1}{2} \times \frac{1}{10} \times \frac{9-b_1}{10}\\ &= \frac{9+8+7+6+5+4}{2,000} = \frac{39}{2,000} \end{align*}
In the fifth and final case Sir R----- needs his second die to be greater than the Baron's second or, if it equals it, his first to be greater than the Baron's first, having chances of
\begin{align*} \Pr\left(b_1 \leqslant 5 \wedge r_1 < 5 \wedge r_2 > b_2\right) &= \frac{3}{5} \times \frac{1}{2} \times \sum_{b_2=0}^9 \frac{1}{10} \times \frac{9-b_2}{10}\\ &= \frac{3}{10} \times \frac{9+8+7+6+5+4+3+2+1+0}{100}\\ &= \frac{3}{10} \times \frac{45}{100} = \frac{27}{200} \end{align*}
in the first eventuality and
\begin{align*} \Pr\left(b_1 \leqslant 5 \wedge r_1 < 5 \wedge r_2 = b_2 \wedge r_1 > b_1\right) &= \Pr\left(b_1 < 5 \wedge r_2 = b_2 \wedge r_1 < 5 \wedge r_1 > b_1\right)\\ &= \sum_{b_1=0}^4 \frac{1}{10} \times \frac{1}{10} \times \frac{4-b_1}{10}\\ &= \frac{4+3+2+1+0}{1,000} = \frac{1}{100} \end{align*}
in the second since Sir R-----'s first die could not possibly have exceeded the Baron's if it were a five.

\begin{align*} &\frac{3}{50} + \frac{9}{500} + \frac{1}{25} + \frac{1}{100} + \frac{21}{100} + \frac{39}{2,000} + \frac{27}{200} + \frac{1}{100}\\ &\quad = \frac{120}{2,000} + \frac{36}{2,000} + \frac{80}{2,000} + \frac{20}{2,000} + \frac{420}{2,000} + \frac{39}{2,000} + \frac{270}{2,000} + \frac{20}{2,000}\\ &\quad = \frac{1,005}{2,000} \end{align*}
which unfortunately turns the tide against Sir R----- whose expected outcome was consequently
$\frac{1,005}{2,000} \times 29 - \frac{995}{2,000} \times 30 = \frac{29,145}{2,000} - \frac{29,850}{2,000} = -\frac{705}{2,000}$
and he would have been most ill-served by my advice!
$$\Box$$

[1] With thanks to Roger Orr.