Brain-Teaser 691: That’s torn it …
From The Sunday Times, 13th October 1974 [link]
It was typical of Uncle Bungle that he should have torn up the sheet of paper which gave particulars of the numbers of matches played, won, lost, drawn, etc. of four local football teams who were eventually going to play each other once. The only piece left was as shown (as usual there are 2 points for a win and 1 for a draw):
It will not surprise those who know my Uncle to hear that one of the figures was wrong, but fortunately it was only one out (i.e. one more or less than the correct figure).
Each side had played at least one game, and not more than seven goals were scored in any match.
Calling the teams A, B, C and D (in that order), find the score in each match.
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.
[teaser691]

Jim Randell 9:02 am on 11 February 2021 Permalink |
(See also: Puzzle 81).
This Python program uses the [[
Football]] helper class from the enigma.py library. It runs in 198ms.from enigma import (Football, subsets, cproduct, printf) # scoring system football = Football(points=dict(w=2, d=1)) # possible scores in the matches (no match has more than 7 goals scored) scores = { 'w': [ (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (2, 1), (3, 1), (4, 1), (5, 1), (6, 1), (3, 2), (4, 2), (5, 2), (4, 3), ], 'd': [(0, 0), (1, 1), (2, 2), (3, 3)], 'x': [None], } scores['l'] = list((b, a) for (a, b) in scores['w']) # choose outcomes for each of the matches for (AB, AC, AD, BC, BD, CD) in subsets('wdlx', size=6, select="M"): # calculate the points A = football.table([AB, AC, AD], [0, 0, 0]) B = football.table([AB, BC, BD], [1, 0, 0]) C = football.table([AC, BC, CD], [1, 1, 0]) D = football.table([AD, BD, CD], [1, 1, 1]) # each team has played at least one game if not all(x.played > 0 for x in [A, B, C, D]): continue # count the discrepancies in the points dp = abs(A.points - 3) + abs(B.points - 5) + C.points if dp > 1: continue # choose the scores in C's games for (sAC, sBC, sCD) in cproduct([scores[AC], scores[BC], scores[CD]]): (fC, aC) = football.goals([sAC, sBC, sCD], [1, 1, 0]) dC = aC if dp + dC > 1: continue # choose the scores in A's games for (sAB, sAD) in cproduct([scores[AB], scores[AD]]): (fA, aA) = football.goals([sAB, sAC, sAD], [0, 0, 0]) dA = abs(aA - 5) if dp + dA + dC > 1: continue # remaining game for sBD in scores[BD]: (fB, aB) = football.goals([sAB, sBC, sBD], [1, 0, 0]) dB = abs(aB - 6) if dp + dA + dB + dC > 1: continue (fD, aD) = football.goals([sAD, sBD, sCD], [1, 1, 1]) dD = abs(aD - 7) if dp + dA + dB + dC + dD != 1: continue printf("A=({aA} {A.points}) B=({aB} {B.points}) C=({aC} {C.points}) D=({aD} {D.points}) / \\") printf("AB={AB}:{sAB} AC={AC}:{sAC} AD={AD}:{sAD} BC={BC}:{sBC} BD={BD}:{sBD} CD={CD}:{sCD}")Solution: The scores in the played matches are: A vs B = 3-3; A vs D = 3-2; B vs C = 1-0; B vs D = 4-3.
The A vs C and C vs D matches are not yet played.
The incorrect value is C’s “goals against”. It should be 1, not 0.
It is clear that the incorrect value must be one of C’s, as if they have played at least one game they cannot have both 0 points and 0 goals against.
LikeLike