Teaser 2350: [Circles and tangents]
From The Sunday Times, 7th October 2007 [link]
A puzzle in a magazine was flawed: it had two different answers. The puzzle showed two circles that did not meet. It gave the radii (prime numbers of centimetres) and the distance between the centres (a whole number of centimetres less than 50).
It then said:
“Imagine a straight line that is a tangent to both the circles. The distance between the two points where that line touches the circles is. a whole number of centimetres.
How many?”
What was the radius of the smaller circle?
This puzzle was originally published with no title.
[teaser2350]
Jim Randell 7:32 am on 13 May 2025 Permalink |
We are to construct the tangents to two non-touching circles. See: [ @wikipedia ]
I am assuming that, as we are asked to find the radius of the smaller circle, then the two circles must be of different sizes. (And without this condition the Teaser puzzle itself is flawed).
If the circles have radii r and R (where r < R), and the separation between their centres is d, then the tangents have length:
This Python program runs in 59ms. (Internal runtime is 2.3ms).
from enigma import (primes, irange, ircs, printf) # r = radius of smaller circle (a prime) for r in primes.between(2, 24): # R = radius of the larger circle (a prime) for R in primes.between(r + 1, 48 - r): # d = separation of centres (< 50) for d in irange(r + R + 1, 49): # calculate: T = length of outer tangent, t = length of inner tangent (T, t) = (ircs(d, -(R - r)), ircs(d, -(R + r))) if T is None or t is None or t == T: continue # output viable configurations printf("r={r} R={R} d={d} -> T={T} t={t}")Solution: The smaller circle has a radius of 7 cm.
There are two possible scenarios that provide tangents with two different integer lengths:
And so one of these must be the scenario presented in the magazine puzzle.
The first of these solutions looks like this:
If the circles were allowed to be the same size, then we can find the following additional viable configurations, that give two different integer tangent lengths:
And the Teaser puzzle would not have a unique solution.
These additional solutions can be seen by changing line 6 in the program to start the search for R from the value of r.
LikeLike
Frits 7:13 pm on 14 May 2025 Permalink |
In both scenarios we have (not a general rule):
d^2 = T^2 + t^2 = 2.(r^2 + R^2)
LikeLike
Frits 11:02 am on 16 May 2025 Permalink |
from enigma import primes, pythagorean_triples, subsets from collections import defaultdict prms = set(primes.between(2, 48)) # collect Pythagorean triples for each distance between the centres pt = defaultdict(list) for x, y, h in pythagorean_triples(49): pt[h] += [x] pt[h] += [y] for d, vs in pt.items(): for t, T in subsets(sorted(vs), 2): # make sure r and R are integers if t % 2 != T % 2: continue r, R = (T - t) // 2, (T + t) // 2 if any(x not in prms for x in (r, R)): continue print(f"{r=} {R=} {d=} -> {T=} {t=}")LikeLike