Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 98

Will The Dog Catch The Duck?

A duck paddles in a perfectly circular pond and a dog prowls the bank. The dog cannot swim and the duck cannot take flight from the water, but the duck can fly to safety the instant it reaches shore, provided the dog is not there. Both are perfect strategists and can change direction instantly without losing speed. The duck starts at the centre, the dog somewhere on the edge. How many times faster than the duck must the dog be able to run so that the duck can never escape?

The Riddler, FiveThirtyEight(original post)

Solution

Take the pond to have radius 11, the duck speed 11, and let the dog run at speed kk. The naive duck swims straight away from the dog, a distance 11, while the dog runs the half-circumference π\pi to meet it; that escapes only for k<π3.14k < \pi \approx 3.14. The duck can do far better, and the key is to notice where it can out-turn the dog.

On a circle of radius rr the duck’s angular speed is 1/r1/r and the dog’s, running the rim, is kk. The duck turns faster than the dog exactly while r<1/kr < 1/k. So the duck spirals out to the circle of radius 1/k1/k and there holds itself diametrically opposite the dog: just inside it gains angle, at 1/k1/k it exactly keeps pace. From that opposed position it makes one straight dash.

The best dash is along the tangent to the circle of radius 1/k1/k, the line through the duck perpendicular to the radius to it. That line meets the shore at distance 11k2=k21k,\sqrt{1 - \tfrac{1}{k^2}} = \frac{\sqrt{k^2-1}}{k}, and the exit point lies an angle arccos(1/k)\arccos(1/k) around from the duck’s radial direction (the right triangle with hypotenuse 11 and near side 1/k1/k). The dog, starting opposite, must cover that exit: a half-turn plus the offset, an angle π+arccos(1/k)\pi + \arccos(1/k), at speed kk. The duck escapes when its dash is quicker, k21k<π+arccos(1/k)kk21<π+arccos ⁣1k.\frac{\sqrt{k^2-1}}{k} < \frac{\pi + \arccos(1/k)}{k} \quad\Longleftrightarrow\quad \sqrt{k^2-1} < \pi + \arccos\!\tfrac{1}{k}. The dog catches the duck only once this fails, so the threshold is the single kk with equality. It has no closed form; numerically k21=π+arccos1kk4.6033.\sqrt{k^2-1} = \pi + \arccos\tfrac{1}{k} \quad\Longrightarrow\quad k \approx \boxed{4.6033}.

The computation

There is no elementary solution, so locate the threshold directly: the escape condition above holds with equality exactly at the critical speed ratio. Solve that equation by bracketing the sign change of its two sides.

import numpy as np
from scipy.optimize import brentq

# escape fails when sqrt(k^2-1) reaches pi + arccos(1/k); the root is the threshold
gap = lambda k: np.sqrt(k*k - 1) - (np.pi + np.arccos(1/k))
print(round(brentq(gap, 1.5, 10), 4))
# 4.6033