Skip to content
Vamshi Jandhyala

Books · The Fiddler: Solutions

Chapter 19

Can You Get the Rover Home?

A rover is dropped onto a spherical planet of radius 10001000 miles. It is programmed with one fixed routine: move straight forward a distance ss and stop; without advancing, turn left 6060^\circ; move forward ss again and stop; turn left 6060^\circ once more; move forward ss a final time and stop. To be collected, the rover must finish exactly where it began. What is the smallest value of s>0s>0 for which this happens?

The Fiddler, Zach Wissner-Gross, February 13, 2026(original post)

Solution

“Straight forward” on a sphere means along a great circle, so the rover walks three equal geodesic arcs joined by two left turns of 6060^\circ. For the path to close, the three arcs must form an equilateral spherical triangle, and the 6060^\circ left turns make the exterior angle at each vertex 6060^\circ, hence each interior angle 120120^\circ.

Let a=s/Ra = s/R be the angular length of a side, with R=1000R = 1000. The spherical law of cosines for an equilateral triangle with interior angle AA reads cosa=cos2a+sin2acosA\cos a = \cos^2 a + \sin^2 a \cos A. Setting A=120A = 120^\circ, so cosA=12\cos A = -\tfrac12, and writing c=cosac = \cos a, c=c212(1c2)    3c22c1=0    c=1 or c=13.c = c^2 - \tfrac12(1 - c^2)\;\Longrightarrow\; 3c^2 - 2c - 1 = 0 \;\Longrightarrow\; c = 1 \text{ or } c = -\tfrac13 . The root c=1c = 1 is the degenerate a=0a = 0, so the smallest genuine side has cosa=13\cos a = -\tfrac13, giving s=1000arccos ⁣(13)=1910.6 miles.s = 1000\,\arccos\!\Bigl(-\tfrac13\Bigr) = \boxed{1910.6\ldots \text{ miles}}.

The closed route: an equilateral spherical triangle of side arccos(13)109.47\arccos(-\tfrac13)\approx109.47^\circ, with 120120^\circ interior angles.

The computation

Drive the rover on the actual sphere: track its position and heading as unit vectors, step forward by rotating along the heading, turn left 6060^\circ by rotating the heading about the position, and measure how far the finish lands from the start. At a=arccos(13)a=\arccos(-\tfrac13) it returns home.

import numpy as np
R = 1000.0
def step(p, h, a):                          # forward arc a along heading h
    return p*np.cos(a) + h*np.sin(a), h*np.cos(a) - p*np.sin(a)
def turnL(p, h, b):                         # rotate heading left by b about p
    return h*np.cos(b) + np.cross(p, h)*np.sin(b)
def closed(a):                              # 1 - cos(angle start->finish)
    p, h = np.array([0, 0, 1.]), np.array([1., 0, 0])
    for k in range(3):
        p, h = step(p, h, a)
        if k < 2: h = turnL(p, h, np.deg2rad(60))
    return 1 - p @ np.array([0, 0, 1.])
am = np.arccos(-1/3)
print(round(R*am, 3), closed(am))           # 1910.633  ~0

Extra Credit

There are other distances ss that also bring the rover home. Counting the one above, how many positive values s<100,000s < 100{,}000 miles work?

Solution

Two more families join the first. Whenever a side wraps an extra full great circle, aa increases by 2π2\pi, so a=arccos(13)+2πna = \arccos(-\tfrac13) + 2\pi n all close the same triangle. Reflecting the construction gives a=2πarccos(13)+2πna = 2\pi - \arccos(-\tfrac13) + 2\pi n. Finally, if each leg is a whole great circle, a=2πna = 2\pi n, every forward move returns to its own starting point. With s=Ras = Ra and the bound s<100,000s < 100{,}000 meaning a<100a < 100, counting the three progressions in (0,100](0, 100] gives 16+16+15=47.16 + 16 + 15 = \boxed{47}.

The computation

Generate every candidate arc-length from the three families and confirm each one truly closes by running the rover walk (closed from the main section) on it; count those under the bound.

from math import pi
am = np.arccos(-1/3); sols = set()
for n in range(40):
    for v in (am + 2*pi*n, 2*pi*(n+1) - am, 2*pi*(n+1)):
        if 0 < v <= 100 and closed(v) < 1e-6:    # rover actually returns home
            sols.add(round(v, 6))
print(len(sols))                            # 47