Brain-Teaser 514: [Picnic buns]
From The Sunday Times, 18th April 1971 [link]
On the occasion of the Early Risers Aquatic Club Easter Regatta, Mrs Perch packed a large picnic hamper, including nine dozen small buns, and dispatched her husband with seven of their children, all of different ages under 17, to enjoy the occasion.
At lunch time the family party attacked the buns with gusto, but Mr Perch, having eaten more buns than any of the children, felt rather uncomfortable and managed to persuade Mr Fish, the President, to dispose of as many buns as he (Mr Perch) and his oldest child had eaten between them.
Each of the children had eaten at least one bun, and there were sufficient left for each of the family party to eat another two at tea time and a further three on the journey home, which they dutifully did, returning home with an empty hamper.
It happened that both after lunch and after tea, two of the children had each consumed three times as many buns and two of the children had consumed twice as many buns as one or other of the other children, and that by the time they arrived home each of the children had eaten exactly as many buns as he was years of age.
How many buns were given to Mr Fish?
This puzzle was originally published with no title.
[teaser514]

Jim Randell 7:31 am on 3 March 2020 Permalink |
There are seven children of different ages, less than 17. Each child’s age is also the total number of buns eaten by that child during the day, so the minimum possible value is 6.
This Python program considers possible ages, and checks that the numbers of buns consumed meet the required conditions. It runs in 70ms.
from enigma import subsets, irange, div, icount_exactly as icount, printf # check numbers in the list s (each reduced by d) have exactly 2 # matches that are 2x and 3x other numbers on the list def check(s, d): # calculate the required list s = list(x - d for x in s) # two must be 3x and two must be 2x other numbers on the list return all(icount(s, (lambda x: k * x in s), 2) for k in (2, 3)) # consider possible ages for the children for s in subsets(irange(6, 16), size=7): # so the total number of buns eaten by the children is... t = sum(s) # the remaining buns are eaten by... # the father: x + 5 # fish: (x + g - 5) # giving a total of: 2x + g g = s[-1] x = div(108 - t - g, 2) if x is None or not(x > g - 5): continue # the total number of buns eaten by the children after lunch and tea if not (check(s, 5) and check(s, 3)): continue # calculate the number of buns eaten by fish f = x + g - 5 printf("fish = {f} [father = {x5}; ages = {s}]", x5=x + 5)Solution: Mr. Fish ate 21 of the buns.
The children are aged: 6, 7, 8, 9, 12, 14, 15.
And this is the total number of buns consumed by them at the end of the day. Accounting for 71 buns in total.
They each ate 3 buns on the journey home, so after tea the bun tally was: 3, 4, 5, 6, 9, 11, 12.
We see that two of the children have consumed 3× the number of buns as some other child: 9 (=3× 3), 12 (=3× 4).
And also two of the children have consumed 2× the number of buns as some other child: 6 (=2× 3), 12 (=2× 6).
And before that they each had 2 buns at tea time, so after lunch the bun tally was: 1, 2, 3, 4, 7, 9, 10.
Again we have: 3 (=3× 1), 9 (=3× 3); and: 2 (=2× 1), 4 (=2× 2).
So the children consumed 71 buns in all, leaving 37 to be accounted for.
Of these Mr Fish ate 21, this being the same number that the father ate at lunch, plus the number the eldest child ate at lunch (= 10).
So the father must have eaten 11 buns at lunch (which is more than the eldest child). With the 2 at tea, and 3 on the way home, this brings the fathers total to 16.
So adding the total number of buns eaten by the children, the father and Mr. Fish we get: 71 + 16 + 21 = 108, exactly 9 dozen (= 9 × 12).
LikeLike