Teaser 2464 : [Trapezium plots]
From The Sunday Times, 13th December 2009 [link]
George and Martha have a trapezium-shaped garden [*]. The southern border (running east-west) is 100 metres long, as is the western border (north-south). The eastern border (also north-south) is a whole number of metres long (more than 100, but less than 200) and the fourth border is also a whole number of metres long. Coincidentally, if you replace “100” with “1000” and “200” with “2000”, exactly the same can be said of the park over the road.
“Then the park’s sides are all 10 times those of our garden”, Martha said. “Actually, they are not”, George replied.
How long is the park’s longest side?
[*] Trapezium = a quadrilateral with two parallel sides.
This puzzle was originally published with no title.
[teaser2464]
Jim Randell 8:44 am on 16 December 2025 Permalink |
We can construct the shape of the plots by taking a Pythagorean triangle (x, y, z), and then constructing the square on the y side to give a trapezium with sides (x + y, y, y, z).
(I believe in US terminology this shape would be referred to as a trapezoid).
This Python program collects possible triangles with y = 100 (for the garden) or y = 1000 (for the park), and then looks for a pair where not all sides are in the ratio 10:1.
It runs in 80ms. (Internal runtime is 150µs).
from enigma import (cproduct, printf) import pells # generate candidate triangles def triangles(y): for (x, z) in pells.diop_quad(1, -1, -y*y): if not (x < y): break if x > 0: yield (x, y, z) # find candidate dimensions for the garden and the park gs = list(triangles(100)) ps = list(triangles(1000)) # find garden/park combinations that are not in 1:10 ratio for ((x1, y1, z1), (x2, y2, z2)) in cproduct([gs, ps]): if (x2 == 10 * x1 and z2 == 10 * z1): continue printf("garden: S={y1}, W={y1}, E={E}, Z={z1}", E=x1 + 100) printf("park: S={y2}, W={y2}, E={E}, Z={z2}", E=x2 + 1000) printf()Solution: The longest side of the park measures 1225 m.
The garden has dimensions: 175, 100, 100, 125.
The park has dimensions: 1225, 1000, 1000, 1025.
LikeLike
Jim Randell 2:50 pm on 16 December 2025 Permalink |
Alternatively, we can just look at possible dimensions of the park, and reject any where each side is divisible by 10.
The following code has an internal runtime of 98µs.
from enigma import printf import pells # generate candidate triangles def triangles(y): for (x, z) in pells.diop_quad(1, -1, -y*y): if not (x < y): break if x > 0: yield (x, y, z) # find candidate dimensions for the park for (x, y, z) in triangles(1000): # reject dimensions that are all divisible by 10 if 0 == x % 10 == y % 10 == z % 10: continue # output solution printf("park: S={y}, W={y}, E={E}, Z={z}", E=x + 1000)LikeLike
Ruud 1:05 pm on 16 December 2025 Permalink |
import istr s = {} for n in (100, 1000): s[n] = {(a ** (1 / 2) * 1000 / n, b * 1000 / n) for b in range(n + 1, 2 * n) if istr.is_square((a := (b - n) ** 2 + n**2))} print([max(a, b) for a, b in s[1000] - s[100]])LikeLike
Ellen Napier 4:13 pm on 26 December 2025 Permalink |
Specifically, a Right Trapezoid (two right angles), which is implied by the compass directions given.
LikeLike