Skip to content
Vamshi Jandhyala

Books · The Riddler

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)?

image

Solution

Place the large semicircle with radius RR, centered at the origin, its flat edge on the xx-axis and its arc above. The small inverted semicircle has its flat edge horizontal at height hh, running from (r,h)(-r,h) to (r,h)(r,h), with its arc dipping down to (0,hr)(0,h-r). Being inscribed pins down two facts: the two endpoints lie on the big arc, so r2+h2=R2r^2 + h^2 = R^2, and the lowest point of the small arc rests on the big diameter, so h=rh = r. Together these give R2=2r2R^2 = 2r^2.

Now the two areas are dark=π2r2,light=π2R2π2r2=π2(2r2r2)=π2r2.\text{dark} = \tfrac{\pi}{2}r^2, \qquad \text{light} = \tfrac{\pi}{2}R^2 - \tfrac{\pi}{2}r^2 = \tfrac{\pi}{2}(2r^2 - r^2) = \tfrac{\pi}{2}r^2. They are equal. Since the light region is 77, the dark region is also 7.\boxed{7}.

The computation

With R2=2r2R^2 = 2r^2, 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 1010 (a 77 gives 0.70.7). 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 dd of your score. From state dd you reroll, ignoring any value above dd, so the next meaningful outcome is uniform on {0,1,,d}\{0,1,\dots,d\}: a 00 (probability 1d+1\tfrac{1}{d+1}) ends the game, and each kk in {1,,d}\{1,\dots,d\} (probability 1d+1\tfrac{1}{d+1}) becomes the new last digit.

Let AdA_d be the expected score still to come, counting the current digit at place value 11. The current digit contributes dd, and each later digit sits one place further right, so Ad=d+110(d+1)k=1dAk.A_d = d + \frac{1}{10(d+1)}\sum_{k=1}^{d} A_k. Solving upward gives A1=2019A_1 = \tfrac{20}{19}, then A2,A3,,A9A_2, A_3, \dots, A_9. The first roll is uniform on 00 through 99: a 00 scores nothing, and a digit dd places AdA_d at the first decimal place. So the average final score is 110d=19110Ad=1100d=19Ad=9190.4737.\frac{1}{10}\sum_{d=1}^{9}\frac{1}{10}A_d = \frac{1}{100}\sum_{d=1}^{9} A_d = \frac{9}{19} \approx \boxed{0.4737}.

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