From The Sunday Times, 3rd May 1981 [link]
People often ask me how I first got involved with setting teasers, and the answer is rather interesting. A friend suggested that I should like to visit a medium, who, with spiritual help, would give me some advice for the future. He said that he knew a jolly woman who would probably be able to suggest an exciting change in my career (I thought it more likely that I’d strike a happy medium).
Anyway, I went along, and found that this medium had an unusual ouija board. It consisted of 24 points equally spaced around the perimeter of a circle. She invited me to write a letter of the alphabet against each of these points. Some letters were used more than once, and some (of course) were not used at all.
Then, after much concentration, a counter moved from the centre of the circle straight to a letter. It paused, and then went straight to another letter, and so on. When it had completed a word, it went straight back to the centre of the circle, paused, and then started the next word in the same way.
There were two fascinating things about the message that it spelt out for me. The first was that, each time the counter moved, it moved an exact whole number of inches. The second was that it spelt out the message:
SET
A
SUNDAY
TIMES
BRAIN
TEASER
IN
???
The last bit consisted of three letters which were the first three letters of a month.
Which month?
This puzzle is included in the book The Sunday Times Book of Brainteasers (1994).
[teaser980]
Jim Randell 11:52 am on 12 March 2024 Permalink |
This puzzle was set in 2013, so Harry had his 100th birthday in 2012, and so was born in 1912.
Peter was born in the same month in 2012 as Harry’s 100th birthday, so Peter’s 100th birthday will be in 2112.
And we are interested in counting birthdays that fall on a Monday.
This Python program collects candidate birthdays >(month, day) for each of them and groups them by the number of Monday birthdays in the first 100. We then look for situations where Harry has 2 more Monday birthdays that Peter, and then try to find common (weekday, month) combinations.
It runs in 63ms. (Internal runtime is 3.1ms).
Run: [ @replit ]
from datetime import (date, timedelta) from enigma import (defaultdict, group, intersect, printf) # collect birthdays between y1 and y2 that fall on a Monday def collect(y1, y2): # find the first Monday (weekday = 0) in the range inc = timedelta(days=1) d = date(y1, 1, 1) while d.weekday() != 0: d += inc # and then skip forward by weeks inc = timedelta(days=7) # count the number of Monday birthdays by date r = defaultdict(int) while True: r[(d.month, d.day)] += 1 d += inc if d.year > y2: break # group dates by Monday count return group(r.keys(), by=r.get) # count birthdays on a Monday for Harry from 1913 - 2012 gH = collect(1913, 2012) # count birthdays on a Monday to Peter from 2013 - 2112 gP = collect(2013, 2112) # collect results rs = set() # consider possible counts for H for (kH, vH) in gH.items(): # P has a count that is 2 less kP = kH - 2 vP = gP.get(kP) if vP is None: continue # collect possible (weekday, month) combinations for Harry and Peter fn = lambda d: (d.weekday(), d.month) dH = group((date(1912, m, d) for (m, d) in vH), by=fn) dP = group((date(2012, m, d) for (m, d) in vP), by=fn) # look for (weekday, month) combinations common to both for (w, m) in intersect([dH.keys(), dP.keys()]): rs.add(w) # find possible days of the week days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] for w in rs: printf("weekday = {w}", w=days[w])Solution: Harry and Peter were both born on a Tuesday.
And they could be both born on Tuesdays in any month from March to December.
For example:
Harry was born on Tuesday, 5th March 1912, and has had 15 birthdays on a Monday up to 2012 (in years: 1917, 1923, 1928, 1934, 1945, 1951, 1956, 1962, 1973, 1979, 1984, 1990, 2001, 2007, 2012).
Peter was born on Tuesday, 6th March 2012, and will have 13 birthdays on a Monday up to 2112 (in years: 2017, 2023, 2028, 2034, 2045, 2051, 2056, 2062, 2073, 2079, 2084, 2090, 2102).
The sequences differ because 2000 was a leap year, but 2100 will not be.
LikeLike