Teaser 3310: Building bridges
From The Sunday Times, 1st March 2026 [link] [link]
Chuck’s ranch is 16 km north of a narrow straight river flowing west to east. His cousin Dwayne has a ranch 72 km south and 30 km east of Chuck’s ranch. To join their ranches, they are each required to build a straight road from their ranch to a bridge that will be constructed over the river at a location yet to be decided.
Selfishly, Chuck wishes to have the bridge built at a location that would require Dwayne’s road to be as much as possible longer than the road he has to build on his side of the river. Dwayne wishes another location for the bridge, a location that would require the roads on both sides of the river to be of equal lengths.
What is the distance between these two bridge locations?
[teaser3310]















Jim Randell 7:12 am on 1 March 2026 Permalink |
(See also: Teaser 3286).
Here is a numerical solution. (Which saves having to do any calculus).
The following Python program runs in 72ms. (Internal runtime is 231µs).
from enigma import (hypot, find_max, find_zero, printf) # calculate lengths of road for location of bridge x # x = km E from C C = lambda x: hypot(16, x) D = lambda x: hypot(56, 30 - x) # calculate how much more road D builds than C f = lambda x: D(x) - C(x) # find C's proposed bridge location (maximise f) xC = find_max(f, -100, +130).v printf("xC = {xC:.3f}") # find D's proposed bridge location (f = 0) xD = find_zero(f, -100, +130).v printf("xD = {xD:.3f}") # calculate the distance between the proposed locations d = abs(xC - xD) printf("diff = {d:.3f}")Solution: The proposed locations for the bridge are 75 km apart.
C’s proposed location is 12 km west of the nearest point on the river to him. C’s road would be 20 km, and D’s road would be 70 km. (Total road length would be 90 km).
(This corresponds to the position where the angles that the roads make with the river are equal. So if we mirrored one of the brothers ranches in the river, so that they are both on the same side, then there would be one straight road that joins the bridge to both ranches).
D’s proposed location is 33 km east of the nearest point on the river to him. Both roads would be 65 km. (Total road length would be 130 km).
The minimal total road length occurs if the bridge is built 6.66 km east of the nearest point on the river to C. C’s road would be 17.33 km, and D’s road would be 60.66 km. (Total road length = 78 km).
(If we were to draw a straight line between the ranches, we achieve the shortest possible combined distance, and the position of the bridge is where the line crosses the river).
Note that measuring the distances between points, we have:
Which means the quadrilateral (C, XC, D, XD) is cyclic.
Analytically:
The two roads are the same length when:
And we see both roads have length 65 km.
To calculate the maximum of the function f(x) we can differentiate it, at look for stationary points (i.e. points where f'(x) = 0):
And we can find values when f'(x) is 0 by looking for values where:
x = −12 is a stationary point that gives the maximum value of f(x) (= 50 km when D’s road is 70 km and C’s road is 20 km).
(And x = 20/3 is not a stationary point of f(x), but does give the position of the bridge for the minimum combined distance for the roads).
LikeLike
Jim Randell 8:48 am on 28 March 2026 Permalink |
Here is a way to find the maximum value of f(x) without using calculus:
We reflect ranch D in the line of the river, so it appears at D′, north of the river.
For a point on the river X the road distances XD and XD′ are the same length.
We then construct the triangle CXD′, and using the triangle inequality we get:
with equality occurring when the points are co-linear and the triangle is degenerate (zero area).
but:
Hence:
with equality occurring when X, C, D′ are co-linear.
And so when X, C, D′ are co-linear the maximum value of f(x) is achieved, and this value is the distance CD′.
The distance CD′ is calculated as the hypotenuse of a right-angled triangle where the other two sides are 30 and 56 − 16 = 40, and so CD′ = 50.
This is a (3, 4, 5)×10 triangle.
Since the points X, C, D′ are co-linear, the triangle with hypotenuse XD′ is just a larger version of a (3, 4, 5) triangle with the 4 side measuring 56 (= 4×14).
Hence the base of the triangle is 3×14 = 42, which gives a point X on the river 12 km to the W of the closest point on the river to C (i.e. x = −12).
LikeLike