Teaser 2506: [Domestic chores]
From The Sunday Times, 3rd October 2010 [link] [link]
Three brothers share a house in a university city. Each is capable of undertaking two of the four domestic chores required. For instance, only one knows how to vacuum and only one can dust. They have recruited two friends who can do three chores each, so now any chore can be done by three people. Leo does not wash up; in fact, only one person can both wash up and do the laundry. There is one job both Leo and Neil can do, while Keith and Neil can do two jobs together. John can vacuum; Mike cannot. Neil is one of the brothers.
Who are the other two brothers, and who does the dusting?
This puzzle was originally published with no title.
[teaser2506]
Jim Randell 10:34 am on 23 September 2025 Permalink |
We can think of filling out a 5×5 binary matrix, indicating whether a person is one of the brothers, and which of the 4 tasks he can do.
Here is a solution using the [[
SubstitutedExpression]] solver from the enigma.py library.It runs in 133ms. (Internal runtime is 439µs).
The following program can be used to give a more friendly output to the answer:
from enigma import (SubstitutedExpression, seq2str, printf) # load the puzzle p = SubstitutedExpression.from_file(["{dir}/teaser2506.run"]) # names names = ["John", "Keith", "Leo", "Mike", "Neil"] tasks = ["brother", "vacuum", "dust", "wash-up", "laundry"] results = ["JAFQV", "KBGRW", "LCHSX", "MDITY", "NEPUZ"] # solve the puzzle and format the solutions for s in p.solve(verbose=0): # output solution for (n, rs) in zip(names, results): # collect tasks ts = list(t for (t, v) in zip(tasks, rs) if s[v]) printf("{n}: {ts}", ts=seq2str(ts, sep=", ", enc="")) printf()Solution: The other two brothers are: John and Mike. Keith, Leo and Neil can do dusting.
The complete solution is:
LikeLike
Frits 1:27 pm on 23 September 2025 Permalink |
The task function could also have been used instead of the person function.
LikeLike