Chapter 32
How Low Can You Roll?
Riddler Express
Inspired by Catriona Shearer. An upside-down semicircle is inscribed inside a right-side-up semicircle. The lighter region (inside the larger semicircle but outside the smaller) has area 7. What is the area of the darker region (the smaller semicircle)?

Solution
Place the large semicircle with radius , centered at the origin, its flat edge on the -axis and its arc above. The small inverted semicircle has its flat edge horizontal at height , running from to , with its arc dipping down to . Being inscribed pins down two facts: the two endpoints lie on the big arc, so , and the lowest point of the small arc rests on the big diameter, so . Together these give .
Now the two areas are They are equal. Since the light region is , the dark region is also
The computation
With , confirm symbolically that the light and dark areas coincide.
import sympy as sp
r = sp.symbols('r', positive=True)
R2 = 2 * r**2
dark = sp.pi/2 * r**2
light = sp.pi/2 * R2 - sp.pi/2 * r**2
print(sp.simplify(dark - light)) # 0 -> dark == light == 7
Riddler Classic
Roll a fair ten-sided die (faces 0 to 9). Your score starts as the first roll over (a gives ). Keep rolling: if a roll is less than or equal to the last digit of your score, it becomes the new last digit; otherwise ignore it. The game ends when you roll a zero. What is your average final score?
Solution
Track the state by the last digit of your score. From state you reroll, ignoring any value above , so the next meaningful outcome is uniform on : a (probability ) ends the game, and each in (probability ) becomes the new last digit.
Let be the expected score still to come, counting the current digit at place value . The current digit contributes , and each later digit sits one place further right, so Solving upward gives , then . The first roll is uniform on through : a scores nothing, and a digit places at the first decimal place. So the average final score is
The computation
Play the game: roll, keep the digit when it does not exceed the current last digit, stop on a zero, and average the final score over many games.
import numpy as np
rng = np.random.default_rng(0)
runs = 2_000_000; total = 0.0
for _ in range(runs):
first = rng.integers(0, 10)
if first == 0:
continue # score 0
digits = [first]
while True:
roll = rng.integers(0, 10)
if roll == 0:
break # zero ends the game
if roll <= digits[-1]:
digits.append(roll)
total += sum(v * 10**-(i+1) for i, v in enumerate(digits))
print(total / runs) # ~0.4737 = 9/19