Brain-Teaser 32: [Square farm]
From The Sunday Times, 29th October 1961 [link]
A, B, & C are sitting in a railway carriage, and A, an Australian, is talking to B about his farm in Australia.
“It is square”, he says, and tells B the length of its sides: a whole number of miles; “but I am thinking of selling a rectangular part of it whose sides are in length a whole plural number of miles”. He tells B the area of the rectangle: an odd number of square miles.
B says: “If I knew whether its breadth was less than two-thirds of its length, I could tell you its dimensions”. A tells him that its breadth is more than two-thirds of its length.
C, a stranger, who had been listening to this conversation, but missed the area of the rectangle, nevertheless correctly deduced its dimensions, although, he reflected, had A‘s farm had sides one mile longer he could not have done so.
What are the lengths of the sides of A‘s farm, and of the rectangular part to be sold?
This puzzle was originally published with no title.
[teaser32]
Jim Randell 7:34 am on 2 May 2021 Permalink |
I think this puzzle is flawed.
B knows the size of A’s farm (which gives the maximum dimension of the rectangle – assuming the rectangle is aligned with the square), and also the area of the rectangle (which were are told is odd).
And he must be able to narrow down the options (= non-trivial divisor pairs of the odd area, subject to the maximum dimension) to two possible values, which can then be distinguished by knowing if the breadth of the rectangle is less than 2/3 the length.
So, for instance an area of 63 has two options:
So, if the size of the farm is at least 21 × 21, and B is told an area of 63, this is a candidate solution. (Or 17 × 17 if the rectangle does not have to be aligned with the square).
If the rectangle is allowed to be a square the next candidate solution is when the size of the farm is at least 25 × 25, and B is told an area of 225:
At 27 × 27, an area of 81 becomes viable:
When we get to 33 × 33 we get two further possible solutions:
And so on.
C knows the size of the farm, but did not hear the area of the rectangle, and so presumably also doesn’t know that the area is odd.
But even for the minimum possible area of 21 × 21 there are 16 possible areas that have 2 decompositions into viable rectangles, and C has no way to choose between them.
So let’s suppose that C does know that the area of the rectangle is odd. (Maybe B commented: “Ah, so the area of the rectangle is odd”, and C heard this, but not the actual value of the area).
For a farm of size 21 × 21 to 24 × 24 there is only one possible area (= 63), and as we know the breadth of the rectangle is more than 2/3 the length, this means it must be 7 × 9. So if C had heard any of these farm areas, they could deduce the area of the rectangle.
But when we get to 25 × 25 the possibility of a rectangle of area 225 appears (giving a rectangle of 15 × 15, where the breadth is more than 2/3 the length), so C cannot determine which rectangle it is.
So the solution would seem to be:
Solution: A’s farm is 24 × 24 miles. The rectangular area is 7 × 9 miles.
However the published solution is that A’s farm is 25 × 25 miles.
I suppose the perimeter of the square could be required to be unaffected, but that is not mentioned in the puzzle text. (And if the rectangle doesn’t have to be aligned with the sides of the square we can easily fit a 9×25 rectangle entirely within a 25×25 square, but not within a 24×24 square, which makes 24×24 a more likely answer).
This Python program runs in 52ms.
Run: [ @replit ]
from enigma import (irange, inf, subsets, group, multiply, filter2, unpack, printf) # solve for an n mile x n mile area def solve(n): # group potential sub-rectangles by area d = group(subsets(irange(2, n), size=2, select="R"), by=multiply) for k in sorted(d.keys()): # k must be odd if k % 2 != 1: continue vs = d[k] # there must be 2 choices for the area if len(vs) != 2: continue # that are distinquished by known in a < (2/3) b (lt, ge) = filter2(unpack(lambda a, b: 3 * a < 2 * b), vs) if not (len(lt) == 1 and len(ge) == 1): continue printf("[n={n}] {k} -> {vs} -> {lt} + {ge}") yield (k, lt[0], ge[0]) ps = list() for n in irange(1, inf): rs = list(solve(n)) if len(rs) > 1: printf("farm = {n1} x {n1}", n1=n - 1) if len(ps) == 1: (k, _, (a, b)) = ps[0] printf("rectangle = {a} x {b} [area = {k}]") break ps = rsLikeLike