Teaser 2492: [Paper cut]
From The Sunday Times, 27th June 2010 [link] [link]
I started with a rectangular piece of paper and made a [straight] cut across it, dividing it into a triangle and a pentagon. Then I discarded the triangle and measured the lengths of the sides of the pentagon, all of which were whole numbers of centimetres.
I remember that the lengths of the shortest two sides [of the pentagon] were 17 cm and 19 cm, and that the length of the longest side was 33 cm.
What were the lengths of the other two sides?
This puzzle was originally published with no title.
[teaser2492]
Jim Randell 10:46 am on 15 August 2025 Permalink |
To make a rectangle into a pentagon with a single cut, we cut one of the corners off, which means we discard a right-angled triangle. And all sides of the pentagon have integer lengths, which means so do the sides of the triangle, so its sides are a Pythagorean triple.
This Python program runs in 60ms. (Internal runtime is 91µs).
from enigma import (irange, cproduct, pythagorean_triples, ordered, printf) # the hypotenuse of the removed triangle cannot be more than 33 for (x, y, z) in pythagorean_triples(33): if z < 17: continue # or less than 17 # consider possible rectangles (a, b) for (a, b) in cproduct([irange(x + 17, 33), irange(y + 17, 33)]): # the sides of the pentagon P = ordered(a, b, a - x, b - y, z) if not (P[0] == 17 and P[1] == 19 and P[-1] == 33): continue # output solution printf("rectangle={R} triangle={T} -> pentagon={P}", R=(a, b), T=(x, y, z))Solution: The remaining sides of the pentagon have lengths of 20 cm and 31 cm.
The scenario is this:
LikeLike
Frits 2:54 pm on 15 August 2025 Permalink |
from enigma import pythagorean_triples m1, m2, M = 17, 19, 33 # the hypotenuse of the removed triangle cannot be more than M for (x, y, z) in pythagorean_triples(33): if z < m1: continue # consider possible rectangles (w, h) for w in range(m1 + x, M + 1): lo, mi, hi = sorted([w, w - x, z]) if mi < m2: continue if {m1, m2, M}.isdisjoint({lo, mi, hi}): continue if hi != M: h_rng = [M] elif lo != m1: h_rng = [m1 + y] if m1 + y <= M else [] else: h_rng = range(m1 + y, M + 1) for h in h_rng: # five sides of the pentagon s1, s2, s3, s4, s5 = sorted([lo, mi, hi, h, h - y]) if not (s1 == m1 and s2 == m2 and s5 == M): continue print("answer:", [s3, s4])LikeLike