Teaser 2434: [Metal box]
From The Sunday Times, 17th May 2009 [link]
In metalwork class, Pat was given a thin tin sheet, the shape of a regular polygon, each of whose sides was a two-digit number of centimetres. By sawing and discarding an identical piece from each corner, and doing some folding, he made an open-topped box. Its base was a similar-shaped polygon to the original piece, with vertical sides.
Pat had chosen the size of the discarded pieces to maximise the volume of the box: a six-figure number of cubic centimetres. That number, written as dd/mm/yy, was his grandfather’s date of birth.
What was the volume of the box?
This puzzle was originally published with no title.
[teaser2434]






Jim Randell 10:35 am on 27 May 2026 Permalink |
This Python program considers possible n-gons for n = 3 .. 10, and possible 2-digit side lengths. And looks for viable combinations where the maximum volume is a recognisable 6-digit date.
It runs in 94ms. (Internal runtime is 25ms).
from math import (tan, pi) from enigma import (irange, fdiv, polygon_area_regular, cproduct, find_max, snapf, nsplit, printf) # calculate volume of a box, starting with a regular n-gon # with side <x>, and then make a box by measuring <y> from # each corner and cutting off a quadrilateral from each corner def vol(n, x, y): # the area of the base = A A = polygon_area_regular(n, x - 2*y) # height of the sides = z t = pi * fdiv(n - 2, 2 * n) z = y * tan(t) # volume return A * z # consider possible n-gons and possible 2-digit sides (= x) for (n, x) in cproduct([irange(3, 10), irange(10, 99)]): # maximise the volume (= V) r = find_max((lambda y: vol(n, x, y)), 0, 0.5 * x) # volume is close to a 6-digit integer V = snapf(r.fv, t=1e-4, default=None) # V should be recognisable as a 6-digit date (dd/mm/yy) if V is None or V < 100000: continue (dd, mm, yy) = nsplit(V, k=3, base=100) if not (0 < dd < 32 and 0 < mm < 13): continue y = r.v # output solution printf("n={n} x={x} -> y={y:.4f} V={V} ({dd:02d}/{mm:02d}/{yy:02d})")Solution: The volume of the box is 140625 cm³ .
So the grandfather’s DOB is 14/06/25 (14th June 1925).
The original sheet of metal was a hexagon (6-gon) with a side length of 75 cm.
Cuts perpendicular to the sides at a distance 12.5 cm from each corner are made to produce a hexagonal base with side length 50 cm (area = 3750 √3 cm²) and six rectangular sides with height 12.5 √3 cm.
The volume of the box is then: (3750 √3) × (12.5 √3) = 3750 × 12.5 × 3 = 140625.
LikeLike
Jim Randell 3:30 pm on 28 May 2026 Permalink |
Using some analysis:
The equation for the volume is:
And, for a fixed n and x this is at a maximum when:
hence:
And for an integer volume the cot²(𝝅/n) part (= c) must be rational, restricting the value of n to one of the following:
And so we can simplify the program:
from enigma import (irange, cproduct, div, cb, nsplit, printf) # rational (n, cot^2(pi/n)) pairs as (n, p/q) ncs = { 3: (1, 3), 4: (1, 1), 6: (3, 1), } for ((n, (p, q)), x) in cproduct([ncs.items(), irange(10, 99)]): # calculate volume V V = div(n * cb(x) * p, 54 * q) # must be recognisable as a 6-digit date (dd/mm/yy) if V is None or V < 100000: continue (dd, mm, yy) = nsplit(V, k=3, base=100) if not (0 < dd < 32 and 0 < mm < 13): continue # output solution printf("n={n} x={x} -> V={V} ({dd:02d}/{mm:02d}/{yy:02d})")LikeLike