Brain-Teaser 855: Pity the poor postman
From The Sunday Times, 4th December 1977 [link]
Extract (genuine!) from a national daily, 27th January 1977:
Pity the poor postman trying to deliver letters along Stonebow Road in the village of Drake’s Broughton, in north-west England. Due to local government confusion the road boasts five houses with the number 1, four others are number 2, three have number 4, and two are numbered 6.
To add to the postman’s woes there are four families called Davies in Stonebow Road, plus two named Bridges, three named Barker, and two named Webb.
On the unwarranted supposition that:
(i) the occupants of the said houses included all of the said families; but
(ii) the postman’s problem was somewhat alleviated by the fact that no two families of the same name had the same house-number; and
(iii) the house-numbers of the Webbs totalled to more than did those of the Bridges, while those of all the families with two of the four names totalled the same as did those of all the families with the other two names.What were the house-numbers of the Barkers and Webbs respectively?
This puzzle is included in the book The Sunday Times Book of Brain-Teasers: Book 1 (1980). The puzzle text above is taken from the book.
[teaser855]
Jim Randell 8:11 am on 23 September 2021 Permalink |
This Python program runs in 49ms.
Run: [ @replit ]
from enigma import (multiset, subsets, partitions, printf) # the pool of house numbers ns = multiset.from_pairs([(1, 5), (2, 4), (4, 3), (6, 2)]) # choose 2 house numbers for the Bridges for Brs in subsets(ns.keys(), size=2): sBrs = sum(Brs) # choose 2 house number for the Webbs ns1 = ns.difference(Brs) for Ws in subsets(ns1.keys(), size=2): sWs = sum(Ws) if not (sWs > sBrs): continue # choose 4 numbers for the Davies ns2 = ns1.difference(Ws) for Ds in subsets(ns2.keys(), size=4): sDs = sum(Ds) # choose 3 numbers for the Barkers ns3 = ns2.difference(Ds) for Bas in subsets(ns3.keys(), size=3): sBas = sum(Bas) # consider partitions of the sums ... for (p1, p2) in partitions([sBrs, sWs, sDs, sBas], 2): # that give the same total if sum(p1) == sum(p2): printf("Bridges = {Brs}; Webbs = {Ws}; Davies = {Ds}; Barkers = {Bas} [{p1}, {p2}]")Solution: The Barkers are at 1, 4, 6. The Webbs are at 1, 4.
And the total sum of their numbers is 16.
The Davies are at 1, 2, 4, 6, and The Bridges are at 1, 2.
The total sum of their numbers is also 16.
There are house numbers 1, 2, 2 remaining.
LikeLike