Brain-Teaser 894: Prime consideration
From The Sunday Times, 24th September 1978 [link]
At our local the other night I made the acquaintance of a chap called Michael and his wife Noelle. We talked a good bit about our respective families, our activities and our hobbies. When I happened to mention my interest in mathematical puzzles to Michael he said that he knew one at first hand which might give me some amusement. He proceeded to tell me that although he himself, his parents (who were born in different years), Noelle and their children (featuring no twins, triplets, etc.) had all been born in the nineteen-hundreds and none of them in a leap year, the numerical relationship between their years of birth was nevertheless in two respects a bit unusual.
“In the first place”, he said, “just one of us has our year of birth precisely equal to the mean of all the others’ years of birth. But more remarkably the difference between my father’s year of birth and that of any one of the rest of us is a prime, and the same is true of that of my mother. And she, like Noelle here, had no child after she had passed her twenties”.
And then with a grin he concluded, “So now you’ll know about the whole family and even, if you want, be able to figure out just how old Noelle is without having to be rude and ask her!”
In which year was Noelle born? And how many children does she have?
This puzzle is included in the book The Sunday Times Book of Brain-Teasers: Book 1 (1980). The puzzle text above is taken from the book.
[teaser894]
Jim Randell 10:03 am on 28 December 2021 Permalink |
There are no multiple births for Noelle, but she could manage to have 2 children in a calendar year (by having one early in the year, and one late in the year).
Also, if she was born at the end of the year (as is suggested by her name), it is possible to squeeze a child (or two) in during the calendar year containing her 30th birthday.
In order to get a unique solution, we need to assume Michael and Noelle have more than 1 child (justified by his use of “children”).
This Python program runs in 52ms.
Run: [ @replit ]
from enigma import (defaultdict, irange, Primes, subsets, div, printf) # check for leap years is_leap = lambda y: y % 4 == 0 and (y % 100 != 0 or y % 400 == 0) # primes less than 100 primes = Primes(100) # find possible 19xx years years = list(y for y in irange(1900, 1978) if not is_leap(y)) # look for viable mother -> children maps kids = defaultdict(list) for (m, c) in subsets(years, size=2): k = c - m if 16 < k < 31: kids[m].append(c) # choose a year for M's mother for (MM, Ms) in kids.items(): # all other years must have a prime difference to MM ys1 = set(y for y in years if abs(y - MM) in primes) # find a viable birth year for M for M in Ms: if not (M in ys1): continue # and for his father for MF in ys1: k = M - MF if not (k > 15 and k in primes): continue # all other years must also have a prime difference to MF ys2 = set(y for y in ys1 if abs(y - MF) in primes).difference([M, MF]) # now find a year for N for N in ys2: ks = sorted(ys2.intersection(kids.get(N, []))) if not ks: continue # no multiple births, so (0, 1, 2) children in each year for ns in subsets((0, 1, 2), size=len(ks), select="M"): k = sum(ns) if k < 2: continue # ages ages = [MF, MM, M, N] for (n, v) in zip(ns, ks): if n: ages.extend([v] * n) t = sum(ages) # exactly one of the birth years is the mean year m = div(t, len(ages)) if m is None or ages.count(m) != 1: continue # output solution printf("MF={MF} MM={MM} -> M={M}; N={N} -> {k} kids; {ages} -> {m}")Solution: Noelle was born in 1943. She has 4 children.
Michael’s father was born in 1900 (which was not a leap year), and his mother in 1902.
Michael was born in 1931 (prime differences of 31 and 29 to his father and mother), and his mother was 28 or 29 when he was born.
Noelle was born in 1943 (prime differences of 43 and 41 to Michael’s father and mother), towards the end of the year.
Her four children were born in 1961 (one towards the beginning of the year, when Noelle was 17, and one towards the end of the year, when she was 17 or 18), and in 1973 (one towards the beginning of the year, when Noelle was 29, and one towards the end of the year, when she was still 29).
LikeLike