Brain-Teaser 484: [Family ages]
From The Sunday Times, 6th September 1970 [link]
The total ages of my children, all of single birth, exactly equal my own age. On the same day next year they will exactly equal my husbands age.
At present my husband’s age is divisible by the age of only one child, but in one year’s time it will be divisible by the separate ages of three children and also by the number of children in the family, while my own age will be divisible by the age of one child only.
During the year ahead, on just one day in May, my husband’s age will be divisible by that of my eldest child.
What are the children’s ages?
Note: This puzzle is flawed, as there is not a single solution. A note was published with Brain-Teaser 485 saying that as there are three solutions no prize can be awarded.
This puzzle was originally published with no title.
[teaser484]
Jim Randell 9:54 am on 4 July 2019 Permalink |
I found many solutions to this puzzle, not just the 3 mentioned when Brain-Teaser 485 was published.
The simplest solution was with 4 children with ages: 1, 2, 11, 18. This gives:
The wife’s age is 32, the husband’s age is 35.
Only 1 divides into 35, but next year (when the children are 2, 3, 12, 19 and the husband is 36) three of the children ages (2, 3, 12) will divide in 36.
And the wife will be 33, and 3 divides into this.
During May the eldest child’s age (18) does not divide into the husband’s age (35), until the husband’s birthday, when he is 36. The next day is the eldest child’s birthday, who become 19, which not divide the husband’s age.
The problem with this solution is that at the time of birth of the eldest child the wife would be 14 and the husband 17. While not impossible, it’s probably not what the setter had in mind, so we’ll stick with more conventional scenarios.
To make a version of the puzzle with a single solution I added a couple of extra conditions.
Firstly I strengthened the “all of single birth” condition to the children all having different ages (in years), and restricted the current ages of the children to be between 2 and 16.
This gets me down to 5 solutions (one with 5 children, and four with 7 children). Adding a further reasonable conditions such as “the husband and wife are both aged less than 50” or “the wife was in her twenties at the time of the birth of the eldest child” can be used to narrow the possibilities down to a single solution.
So I settled on the following additional conditions to give a single solution:
This Python program solves the revised puzzle. It runs in 159ms.
Run: [ @repl.it ]
from enigma import (subsets, irange, div, printf) # x is divisible by y divides = lambda x, y: div(x, y) is not None # consider sets of at least 3 children ([extra] with no repeated ages) for ages in subsets(irange(2, 16), min_size=3, select='C'): k = len(ages) # wife's current age is the sum w = sum(ages) # husbands age + 1 is w + k h = w + k - 1 # [extra] husband and wife are less than 40 if not (h < 50): continue # husbands current age is divisible by the age of only one child if not (sum(divides(h, x) for x in ages) == 1): continue # in 1 years time it is divisible by the ages of three children... if not (sum(divides(h + 1, x + 1) for x in ages) == 3): continue # ... and also the number of children ... if not divides(h + 1, k): continue # ... while the wifes age is divisible by only one child if not (sum(divides(w + 1, x + 1) for x in ages) == 1): continue # on one day the husbands age will divide the age of the eldest child # so their birthdays must be on consecutive days a = ages[-1] # so they don't divide in general either now or both incremented if divides(h, a) or divides(h + 1, a + 1): continue # but they do divide when one of them is incremented if not (divides(h + 1, a) or (divides(h, a + 1))): continue # output solution (w0 and h0 are ages at the birth of the first child) printf("k={k}, ages={ages}, w={w}, h={h} [{w0}, {h0}]", w0=w - a, h0=h - a)Solution: The children are aged: 3, 6, 7, 9, 10.
The wife’s current age is 35 (the sum of the children’s ages). The husband’s current age is 39. (So they would be 25 and 29 at the birth of eldest child).
Of the children’s current ages, only 3 divides into 39. But when the ages are all increased by one to 4, 7, 8, 10, 11 then 4, 8 and 10 divide into 40. And the wife will be 36, which is divisible by 4.
During May the eldest child’s age (10) does not divide into the husband’s age (39), until the husband’s birthday, when he is 40. The next day is the eldest child’s birthday (11) and non-divisibility is resumed.
The intended solution was apparently 1, 6, 7, 9, 12.
LikeLike