Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 247

Can You Carve The Perfect Pumpkin?

Riddler Express

A Sol LeWitt drawing depicts a solid inside a unit cube, with the solid’s faces meeting the cube’s edges at the halfway and quarter-way points. What is the volume of the darkened solid?

The Riddler, FiveThirtyEight, October 25, 2019(original post)

Status

The volume depends on the published drawing, and the drawing turns out to be ambiguous: the solid’s top face is defined by four corners that do not lie in a common plane, so that face must be curved or kinked, and the picture does not say which way. The two natural extremes (the face kinked inward versus outward) give volumes of 38/9638/96 and 39/9639/96, both about 0.40.4, and the column accepted any answer in that range. There is no single well-defined volume to box.

Because the answer requires the image and is not even uniquely determined by it, the Express is deferred from the worked-solution standard, in the same category as the column’s other image-only solids. The accepted range (0.40\approx 0.40, between 38/9638/96 and 39/9639/96) is recorded here.

Riddler Classic

On a spherical pumpkin you carve a triangular eye whose sides are geodesic arcs (shortest paths), equilateral and equiangular. A triangle with three right angles (9090^\circ corners) covers one-eighth of the surface. You want an eye covering exactly one-sixteenth of the surface. At what angle should each pair of sides meet?

The Riddler, FiveThirtyEight, October 25, 2019(original post)

Solution

On a sphere, a triangle’s area is governed by how much its angles exceed the flat-plane total of 180180^\circ. Girard’s theorem says that for a geodesic triangle on a sphere of radius RR, with interior angles summing to Σ\Sigma, area=(Σπ)R2,\text{area} = (\Sigma - \pi)\,R^2, the “spherical excess.” For an equiangular triangle with each angle θ\theta, that is (3θπ)R2(3\theta - \pi)R^2. The whole sphere has area 4πR24\pi R^2, so the fraction of the surface covered is 3θπ4π.\frac{3\theta - \pi}{4\pi}. The right-angled eye (θ=π2\theta = \tfrac{\pi}{2}) gives 3π/2π4π=18\frac{3\pi/2 - \pi}{4\pi} = \frac18, matching the one-eighth in the problem. For one-sixteenth, set the fraction to 116\tfrac{1}{16}: 3θπ4π=116    3θπ=π4    θ=5π12=75.\frac{3\theta - \pi}{4\pi} = \frac{1}{16} \;\Longrightarrow\; 3\theta - \pi = \frac{\pi}{4} \;\Longrightarrow\; \theta = \frac{5\pi}{12} = \boxed{75^\circ}. Since the covered fraction is linear in θ\theta, and 116\tfrac{1}{16} is exactly halfway between 00 (at 6060^\circ, a vanishingly small flat triangle) and 18\tfrac18 (at 9090^\circ), the angle is the midpoint, 7575^\circ.

The computation

Rather than reuse Girard’s formula, encode the area directly: build a symmetric equiangular spherical triangle, measure its corner angle from the geometry, and measure its area by Monte Carlo (the fraction of uniformly random sphere points falling inside the geodesic triangle). The angle that yields a one-sixteenth area should be 7575^\circ (and 9090^\circ should yield one-eighth), matching the excess formula.

import numpy as np
from scipy.optimize import brentq
def vertices(phi):                       # 3 points at colatitude phi, 120 deg apart
    return [np.array([np.sin(phi) * np.cos(a), np.sin(phi) * np.sin(a), np.cos(phi)])
            for a in (0, 2 * np.pi / 3, 4 * np.pi / 3)]
def vertex_angle(phi):
    V = vertices(phi)
    def tang(a, b): t = b - np.dot(b, a) * a; return t / np.linalg.norm(t)
    return np.degrees(np.arccos(np.clip(
        np.dot(tang(V[0], V[1]), tang(V[0], V[2])), -1, 1)))
def area_fraction(phi):                  # Monte Carlo solid-angle fraction
    V = vertices(phi)
    n = [np.cross(V[0], V[1]), np.cross(V[1], V[2]), np.cross(V[2], V[0])]
    s = [np.sign(np.dot(n[0], V[2])), np.sign(np.dot(n[1], V[0])),
         np.sign(np.dot(n[2], V[1]))]
    rng = np.random.default_rng(0)
    P = rng.standard_normal((2_000_000, 3))
    P /= np.linalg.norm(P, axis=1, keepdims=True)
    return np.mean((np.sign(P @ n[0]) == s[0]) & (np.sign(P @ n[1]) == s[1])
                   & (np.sign(P @ n[2]) == s[2]))
for deg in (90.0, 75.0):
    phi = brentq(lambda p: vertex_angle(p) - deg, 0.2, 1.5)
    print(f"angle {deg:.0f} deg -> area fraction {area_fraction(phi):.4f}")
# angle 90 deg -> area fraction 0.1248   (= 1/8)
# angle 75 deg -> area fraction 0.0625   (= 1/16)

The Monte Carlo area confirms that a 9090^\circ eye covers one-eighth and a 7575^\circ eye covers one-sixteenth, so the ideal pumpkin eye has 7575^\circ corners.