From The Sunday Times, 2nd August 1970 [link]
My nephew Anselm collects good old-fashioned sixpences in a good old-fashioned piggy bank. These he recently extracted to audit and, while experimenting by putting them into two or more equal piles of two or more coins, found that there were exactly six different ways in which this could be done.
From one of these combinations he returned one pile to the bank, and found that the balance could again be distributed into equal piles in exactly six different ways. On this second occasion he returned two equal piles from one of the combinations to the bank, and again found that the balance could be distributed into equal piles in six different ways only. He conducted this experiment a total of seven times, on the third occasion returning three piles, on the fourth four piles and so on, and after the seventh found that he had 24 sixpences remaining.
On none of these occasions did he deposit as much as 25s. in the bank. His third deposit was twice as much as his sixth, and three times as much as his second. His fifth deposit was five times as large as his first.
How many sixpences had he saved up?
I have modified the wording slightly to clarify the puzzle.
This puzzle was originally published with no title.
[teaser479]
Jim Randell 8:09 am on 23 May 2019 Permalink |
(A similar puzzle is given in H E Dudeney’s 1917 book Amusements In Mathematics [ link ]. See: Puzzle 426: The Hymn-Board Poser).
I assumed the hymns are numbered from 1 to 800.
I think it is easier to work out the digits required on the back of an envelope, but here is a program that does it.
It examines the hymn numbers, and finds sequences of 4 hymns that use a maximal number of copies of each card, and then totals the numbers for each type of card. It runs in 80ms.
from enigma import (defaultdict, irange, arg, printf) # maximum hymn number (N), and number of hymns on the board (K) N = arg(800, 0, int) K = arg(4, 1, int) printf("[N={N} K={K}]") # record maximum numbers m = defaultdict(lambda: defaultdict(list)) # consider hymn numbers for n in irange(1, N): # displayed as cards with '9' replaced by '6' s = str(n).replace('9', '6') # record the hymn numbers by the number of each digit required for d in set(s): m[d][s.count(d)].append(n) # count maximum numbers of each digit for 4 hymns T = 0 for d in '012345678': # collect K numbers with a maximal count ks = sorted(m[d].keys()) ns = list() t = 0 while True: n = K - len(ns) if n == 0: break k = ks.pop() xs = m[d][k][:n] t += k * len(xs) ns.extend(xs) printf("digit {d} -> {ns}; requires {t} copies") T += t printf("total copies = {T}")The minimum number of digits required is 82, and we put 2 digits on each card, so…
Solution: The minimum number of cards required is 41.
Examples of maximal sequences for each digit are:
There is no point making a card with the same digit on both sides, so we can make C(9, 2) = 36 cards corresponding to all pairs of different digits. This uses each digit 8 times, so leaves us with: 1, 2, 3, 4, 5, 6, 6, 6, 6, 7. And we can pair these up as: (1, 6), (2, 6), (3, 6), (4, 6), (5, 7), making a full set of pairs of different digits, and 5 duplicates.
To show that these cards are sufficient to make all possible combinations is a bit trickier, and something I might revisit later. It might be interesting to determine the smallest number of different pairing types (along with necessary duplicates) required to make a working set.
LikeLike