Back

The Buried Cable

Medium
Created: March 5, 2026

The enemy has run a communication cable in a straight line somewhere beneath a square plot of land, 1 km on each side. The cable's exact position and direction are unknown — only that it crosses the plot in a straight line.

You need to dig trenches within this plot of land to guarantee you'll find the cable. What is the shortest total length of trenches needed?

Hint

We can dig along the full perimeter of the square, totalling 4 km of trenches. But can we do better?

Solution

The best known answer is 2+622.64\sqrt{2} + \frac{\sqrt{6}}{2} \approx 2.642+262.64 km. Whether this is truly optimal remains an open problem.

Label the square's vertices A (top-left), B (top-right), C (bottom-right), D (bottom-left). Any straight line crossing the square enters through one side and exits through another, so our trenches need to intersect every such line.

The full perimeter works — 4 km of trenches, and every line through the square crosses at least one side. But we can do better.

We can drop one side. Digging along just BC, CD, and DA (3 km total) still works: any line entering through AB must exit through one of the other three sides, where it hits our trench.

Can we do better? Consider digging along both diagonals, AC and BD, forming an X. Each diagonal has length 2\sqrt{2}2 km, giving 222.832\sqrt{2} \approx 2.83222.83 km total.

If a line crosses between opposite sides, it traverses the full width or height of the square and must cross both diagonals. If it crosses between adjacent sides (say bottom to right), the diagonal through the opposite corner separates those two sides — the line starts on one side of it and ends on the other, so it must cross it.

Can we do better still? Let E =(123,12)= \left(\frac{1}{2\sqrt{3}},\, \frac{1}{2}\right)=(231,21) and F =(1123,12)= \left(1 - \frac{1}{2\sqrt{3}},\, \frac{1}{2}\right)=(1231,21). The trench pattern AE, DE, EF, BF, CF forms a connected network where every edge meets at 120°120°120° angles at E and F, giving a total length of 1+32.731 + \sqrt{3} \approx 2.731+32.73 km.

The best known solution goes further by allowing the trench to be disconnected. Let E =(12,12)= \left(\frac{1}{2},\, \frac{1}{2}\right)=(21,21) (the centre) and F =(1236,1236)= \left(\frac{1}{2} - \frac{\sqrt{3}}{6},\, \frac{1}{2} - \frac{\sqrt{3}}{6}\right)=(2163,2163) (the Fermat point of triangle BCD). The trench pattern has two separate components: the segment AE, and the network CF, DF, BF. The total length is 2+622.64\sqrt{2} + \frac{\sqrt{6}}{2} \approx 2.642+262.64 km.

This is the shortest known solution, but whether it's truly optimal remains an open problem in mathematics, known as the opaque square problem.

Try These Next