Brain-Teaser 771: Doctor Bungle bungles
From The Sunday Times, 25th April 1976 [link]
The doctors in the country town of Keepwell are keen soccer fans and with the assistance of their staff they have formed themselves into 3 teams who are all to play each other once.
I asked my friend, Dr Bungle, who is secretary of one of the teams, if he could let me know the current situation and he produced the following table:
I knew that not more than 3 goals had been scored in any match and it did not take me long to see that there was something wrong with the table. I discovered subsequently that the doctor had been taking a non-truth drug of his own prescription. The drug was not 100% effective and so all but one of the figures were incorrect, and the remaining figure was correct.
What were the scores in the matches played so far?
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.
[teaser771]





Jim Randell 8:49 am on 1 June 2021 Permalink |
This Python program uses the [[
Football()]] helper class from the enigma.py library.It runs in 49ms.
Run: [ @replit ]
from itertools import product from enigma import Football, printf # possible scores (not more than 3 goals scored) score = dict() score['w'] = { (1, 0), (2, 0), (3, 0), (2, 1) } score['d'] = { (0, 0), (1, 1) } score['l'] = set((y, x) for (x, y) in score['w']) score['x'] = [None] def check(xs, ys): return sum(x == y for (x, y) in zip(xs, ys)) # scoring system (matches may not be played) football = Football(games='wdlx') # there are 3 matches for (AB, AC, BC) in football.games(repeat=3): # table rows for A, B, C A = football.table([AB, AC], [0, 0]) B = football.table([AB, BC], [1, 0]) C = football.table([AC, BC], [1, 1]) # check for correct digits (the can be at most one) d1 = check( [A.played, A.w, A.l, A.d, B.played, B.w, B.l, B.d, C.played, C.w, C.l, C.d], [1, 0, 1, 0, 2, 2, 0, 0, 1, 0, 2, 1], ) if d1 > 1: continue # consider possible scores for (sAB, sAC, sBC) in product(score[AB], score[AC], score[BC]): # goals for/against (fA, aA) = football.goals([sAB, sAC], [0, 0]) (fB, aB) = football.goals([sAB, sBC], [1, 0]) (fC, aC) = football.goals([sAC, sBC], [1, 1]) # check for correct digits d2 = check([fA, aA, fB, aB, fC, aC], [2, 0, 1, 2, 0, 3]) if d1 + d2 != 1: continue printf("AB={AB}:{sAB} AC={AC}:{sAC} BC={BC}:{sBC}; d1={d1} d2={d2}") printf("A={A}; f={fA} a={aA}") printf("B={B}; f={fB} a={aB}") printf("C={C}; f={fC} a={aC}") printf()Solution: The scores were: A vs B = 1-1; A vs C = 3-0; B vs C = 1-2.
The only correct figure is B’s played value (= 2).
LikeLike