From The Sunday Times, 15th February 1970 [link]
The Duke of Teresa and Baron von Barin agreed to have a march-past of their respective men-at-arms to celebrate the wedding of the Duke’s son with Baron’s daughter. Each troop would march past in column of three (i.e. 3 men per file). The Duke has a few thousand men and the Baron about half as many.
On the appointed day however, one of the Duke’s men could not go on parade and so the men were ordered into column of four, but 3 men were left over, whereupon they formed column of five and 4 men were left over, and this pattern of behaviour persisted as the Duke consecutively increased the number per file until all the men made an exact number of files.
Meanwhile, the Baron has the same problem. One man reported sick and he consecutively increased the number per file and in column of four had 3 left over, column of five had 4 left over, etc., and eventually he reached a number per file that left no man spare.
The Baron’s men proceeded to march past but the Duke was in a dilemma as each body of troops had a different number of men per file. He immediately solved this by ordering his men to form files with the same number of men as the Baron’s. This they did without any men being left over.
How many men respectively had the Duke and the Baron on parade?
This puzzle was originally published with no title.
[teaser457]
Jim Randell 9:42 am on 26 April 2022 Permalink |
When resistors with values r1 and r2 are connected in parallel, the value of the combined resistance R is given by:
(See: Teaser 3058).
The value of R can also be calculated using the following diagram:
Where the height of the crossing point gives the combined resistance.
The flagpoles in the question also correspond to this diagram. Their heights being r1 and r2 and the crossing point being 11ft = 132in above the ground corresponds to R.
So we need to find two different values whose reciprocals sum to 1/132. And the [[
reciprocals()]] function in the enigma.py library can do this for us.The following Python program runs in 59ms.
Run: [ @replit ]
from enigma import (Accumulator, reciprocals, sprintf, printf) # find (a, b) such that 1/a + 1/b = 1/132 # record the smallest difference (i.e. the final candidate) r = Accumulator(fn=min) for (a, b) in reciprocals(2, 132): # a, b must be different if a == b: continue r.accumulate_data(b - a, (a, b)) printf("[a={a} b={b}]") # format <x> inches as "<f>ft <i>in" def fmt(x): (d, r) = divmod(x, 12) return sprintf("{d}ft {r}in") # output solution (a, b) = r.data printf("A = {a}; B = {b}", a=fmt(a), b=fmt(b))Solution: The heights of the flagpoles are: 21ft 1in, 23ft 0in.
This is the solution where the flagpoles are as close as possible in height (we have: 1/253 + 1/276 = 1/132).
But there are other candidate solutions where the difference in height is greater, e.g. the next solution would be 1/231 + 1/308 = 1/132 to give values of 19ft 3in and 25ft 8in.
So to narrow the solution down to a single candidate we could say the flagpoles had a difference in height of less than 6ft.
LikeLike
GeoffR 11:12 am on 26 April 2022 Permalink |
LikeLike