Teaser 3005: Tubular bales
From The Sunday Times, 26th April 2020 [link] [link]
Ten equal-length, rigid tubes, each a different prime-valued external radius from 11 mm to 43 mm, were baled, broadside, by placing the 43 mm and 11 mm tube together and the third tube, not the largest remaining, touching both of these. Each subsequent tube touched the previous tube placed and the 43 mm tube. A sub-millimetre gap between the final tube placed and the 11 mm tube, made a near perfect fit.
The radius sum of the first three tubes placed against the 43 mm tube was a multiple of one of the summed radii. Curiously, that statement remains true when each of “four”, “five”, “seven” and “eight” replaces “three”. For “two” and “six” tubes placed their radius sum was a multiple of an as yet unplaced tube’s radius.
What radius tube, in mm, was placed last?
[teaser3005]













Jim Randell 5:30 pm on 24 April 2020 Permalink |
This Python program runs in 78ms.
Run: [ @replit ]
from enigma import (primes, printf) # numbers available to to use rs = list(primes.between(11, 44)) assert len(rs) == 10 # check n is a multiple of some element of ms check = lambda n, ms: any(n % m == 0 for m in ms) # solve for the specified numbers # ns = unused numbers # ss = used numbers def solve(ns, ss): # are we done? if not ns: yield ss else: # what number placement is this? k = len(ss) + 1 t = sum(ss) # choose the next number to use for (i, n) in enumerate(ns): # 2nd: not the largest available if k == 2 and n == ns[-1]: continue t_ = t + n # 3rd, 4th, 5th, 7th, 8th: multiple of a used number ss_ = ss + [n] if k in (3, 4, 5, 7, 8) and not check(t_, ss_): continue # 2nd, 6th: multiple of an unused number ns_ = ns[:i] + ns[i + 1:] if k in (2, 6) and not check(t_, ns_): continue # solve for the remaining numbers yield from solve(ns_, ss_) # collect possible final numbers fs = set() for ss in solve(rs[1:-1], rs[:1]): fs.add(ss[-1]) printf("{ss}") # output solution printf("final number = {fs}")Solution: The 37 mm tube was placed last.
The conditions placed on the ordering of the numbers means that although there are four possible orders that the tubes could be assembled in, the answer to the puzzle (the radius of the final tube) is the same in all cases.
So it is not necessary to check that the placement results in a gap of less than 1 mm, but if you do, you find all 4 orderings result in a gap less than 1 mm (and one of them is an almost perfect fit).
Here is a diagram of the packing (11, 23, 17, 41, 29, 31, 19, 13, 37) around the 43 tube. This has the largest gap of 0.66 mm.
Here is a list of 4 packings, and the corresponding gaps:
The third one has a gap of just 55 nm, which is about half the diameter of a single coronavirus particle, and probably quite a lot smaller than the tolerance of the tubes.
Perhaps the puzzle was intended to be set with the radii of the tubes measured in centimetres, then there would be only one arrangement that had a sub-millimetre gap.
LikeLike