Brain-Teaser 744: Job prediction
From The Sunday Times, 19th October 1975 [link]
Professor Knowall has recently become very interested in dreams.
A friend of mine has been doing some research about the extent to which dreams can be used foretell the future. He persuaded his five employees (Alf, Bert, Charlie, Duggie and Ernie) to help him in his enquiries. They liked the idea of being in the forefront of anything new and their beds seemed a nice cosy place for research.
They met a year ago, and predicted their jobs now. Thus:
Alf: “Ernie will not be the Door-Opener.”
Bert: “Duggie will not be the Bottle-Washer.”
Charlie: “Alf will not be the Welfare Officer.”
Duggie: “Ernie will be the Bottle-Washer.”
Ernie: “Bert’s prediction will be true.”Their jobs now are those of Bottle-Washer, Welfare Officer, Door-Shutter, Door-Opener and Worker.
The Professor was most interested in this
“But, my dear Sergeant Bungle”, he said, “how many of these predictions were correct and who made them?”
In fact only two of the predictions were correct and they were made by the men who became the Welfare Officer and the Worker.
What are all their jobs now?
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.
[teaser744]










Jim Randell 9:05 am on 27 April 2021 Permalink |
This Python program runs in 49ms.
Run: [ @replit ]
from enigma import subsets, printf jobs = ("BW", "WO", "DS", "DO", "W") # consider assignments of jobs for (A, B, C, D, E) in subsets(jobs, size=len, select="P"): # evaluate the statements: # A: "E will not be DO" sA = (E != "DO") # B: "D will not be BW" sB = (D != "BW") # C: "A will not be WO" sC = (A != "WO") # D: "E will be BW" sD = (E == "BW") # E: "B's statement is true" sE = (sB == True) # only 2 of the statements are true, and they were made by WO and W ts = set(j for (s, j) in zip([sA, sB, sC, sD, sE], [A, B, C, D, E]) if s) if ts != {"WO", "W"}: continue # output solution printf("A={A} B={B} C={C} D={D} E={E}")Solution: Alf is the Worker. Bert is the Door-Opener. Charlie is the Welfare Officer. Duggie is the Bottle-Washer. Ernie is the Door-Shutter.
LikeLike
Frits 10:18 am on 28 April 2021 Permalink |
from enigma import SubstitutedExpression # BW = 1, WO = 2, DS = 3, DO = 4, W = 5 jobs = ("n/a", "BW", "WO", "DS", "DO", "W") # the alphametic puzzle p = SubstitutedExpression( [ # A: "E will not be DO" "(E != 4) = V", # B: "D will not be BW" "(D != 1) = W", # C: "A will not be WO" "(A != 2) = X", # D: "E will be BW" "(E == 1) = Y", # E: "B's statement is true" "(W == 1) = Z", # only 2 of the statements are true, and they were made by WO and W "sorted([V * A, W * B, X * C, Y * D, Z * E]) == [0, 0, 0, 2, 5]", ], answer="A, B, C, D, E", # let values range from 1-5 so the sorted formula is enough # to check that only 2 of the statements are true digits=range(0, 6), d2i=dict([(0, "ABCDE")]), distinct="ABCDE", verbose=256 ) # print answers for (_, ans) in p.solve(): for i, a in enumerate(ans): print(f"{'ABCDE'[i]}={jobs[a]}", end=" ") print() # A=W B=DO C=WO D=BW E=DSLikeLike
Frits 10:48 am on 28 April 2021 Permalink |
If E is true: B is true A is false E = DO DO talks the truth -- > incorrect Else: E is false B is false D = BW D is false A is true C is true A = W C = WO E = DS B = DOLikeLike
John Crabtree 4:30 pm on 29 April 2021 Permalink |
One does not need to know D’s prediction to solve the teaser. It must be false, which in fact it is.
LikeLike