Teaser 2817: Our secret
From The Sunday Times, 18th September 2016 [link]
Eight friends joined a very secret society and each was given a different membership number between 70 and 100. The friends are Bec, Cal, Doc, Ian, Jon, Luv, Rev and one other – and I am not willing to divulge his common three-letter name. But I can tell you that his membership number is 84. Also, Bec’s membership number is the highest of the eight. The friends noticed that, for any pair of them, their names had at least one letter in common if and only if their membership numbers had a common prime factor.
(a) What was Ian’s membership number?
(b) What was the name of the eighth friend?
[teaser2817]
Jim Randell 9:17 pm on 30 October 2019 Permalink |
The following recursive Python 3 program finds two sets of three letters that may be combined to form a “common three-letter” name. But only one of them really works.
It runs in 433ms.
Run: [ @repl.it ]
Solution: (a) Ian’s membership number is 76. (b) The eighth friend is named Vic.
The solutions found by the program are “civ” and “acv”. The only rearrangement that gives a common three-letter name is “Vic” (which as the setter is Victor Bryant, is probably what is wanted as the answer). Although one could argue that “Cav” or “Vac” are no worse than the names used for other members.
So the membership numbers are:
Shared letters and factors are (each pair only shown once):
However if we were to use “Vac” (or “Cav”) instead of Vic, we would have the following pairings for Vac:
Vac and Cal give us the only pairing that shares more than 1 letter, so if this had been disallowed we would know for certain that the three letters that make up the name of the eighth friend were “civ”.
This posting completes my notes for all Sunday Times Teaser puzzles that I have previously posted to repl.it [ @repl.it ].
I do however have more code for puzzles that I didn’t post, so there may well be more to come.
LikeLike