From The Sunday Times, 5th June 1983 [link]
In our club we have three one-armed bandits. The Saturn Skyjacker accepts 10p, 2p and 1p coins, the Mars Marauder accepts 10p and 1p coins, and the Aries Axeman accepts 5p and 2p coins.
I am the club treasurer, so each week I have the onerous task of emptying the machines and counting the coins. Last week, my efforts were rewarded with the discovery of an interesting series of coincidences. On counting the coins for the Saturn Skyjacker, I found that there were the same number of coins of two of the denominations, and that the number of coins of the third denomination differed from this number by only one. In addition, the total value of all the coins was an exact number of pounds less than one hundred.
The coins from the Mars Marauder were similarly distributed: the numbers of 10p and 1p coins differed by only one, and the total value was again an exact number of pounds. In fact, this total value was the same as for the Saturn Skyjacker.
Incredibly, the same was true for coins from the Aries Axeman: the numbers of 5p and 2p coins differed by one, and the total value was the same as for the Mars Marauder and the Saturn Skyjacker.
What was the total number of coins I emptied that day?
This puzzle is included in the book The Sunday Times Book of Brainteasers (1994).
[teaser1087]
Jim Randell 1:34 pm on 23 January 2024 Permalink |
If we consider the side of the 10 metre square to be the base of a triangle, then the vertex of the triangle formed by the new fences must lie above the interior of the base, and outside a semicircle whose diameter is the base.
This Python program finds possible side configurations (for a shorter and longer site, chosen from 1..13), and then combines 4 of these configurations to find viable sets of triangles.
It runs in 59ms. (Internal runtime is 3.5ms).
from enigma import (irange, fdiv, sq, disjoint_union, printf) # generate possible (a, b) extensions def sides(): # consider possible sides (from 1 - 13) to make an acute angled triangle # the shorter side for a in irange(1, 12): # the longer side for b in irange(max(a + 1, 11 - a), 13): # determine vertex points x = fdiv(sq(b) - sq(a), 20) # vertex must be above base if not (x < 5): continue x2 = sq(x) y2 = sq(b) - sq(x + 5) # vertex must lie outside a radius 5 semicircle if not (x2 + y2 > 25): continue # this is a viable configuration yield (a, b) # generate solutions def solve(sides, k, ts=list(), ss=set()): # are we done? if k == 0: # mean is an integer if sum(ss) % len(ss) != 0: return # smallest side is 1, largest is 13 ss = sorted(ss) if not (ss[0] == 1 and ss[-1] == 13): return # viable solution yield (ts, ss) else: # add in another triangle for (i, t) in enumerate(sides): # all sides are different ss_ = disjoint_union([ss, t]) if ss_: yield from solve(sides[i:], k - 1, ts + [t], ss_) # find solutions rs = set() for (ts, ss) in solve(list(sides()), 4): printf("{ts} -> {ss}") rs.add(tuple(ss)) # output solutions for ss in rs: printf("sides = {ss}")Solution: The lengths of the fencing are (in metres): 1, 5, 7, 8, 9, 10, 11, 13.
There are 2 configurations that use this set of fences:
Here are examples of these configurations:
I did consider adding code to ensure the fences could be arranged such that the two fences meeting at the corner were not co-linear, but from the example diagrams it is clear that this can be done in both cases.
LikeLike