Brain-Teaser 451: [Soccer tournament]
From The Sunday Times, 4th January 1970 [link]
The final weeks of the University soccer tournament proved unusually exciting this year. With only four games left, Arts, Biology and Classics had drawn clear and were battling for the honours. The position then was that Biology were top with 32 points, Arts second also with 32 points, and Classics third with 30 points.
All three teams had scored 70 goals, but Classics had conceded 35 goals giving them an inferior goal average (i.e. ratio of goals for and against) to both Arts and Biology.
The remaining games required Classics to play both Biology and Arts, who each also had to play one game against another team lower in the division.
It turned out that after the four games, Arts had failed to score and, although having scored five of the total of ten goals scored, Classics worsened their goal average.
Consequently, all three teams finished with the same number of points, but Arts won the league from Classics on goal average.
What were the final goals for and against for each team?
A prize of £3 was offered for this puzzle.
This puzzle was originally published with no title.
[teaser451]
Jim Randell 9:25 am on 14 February 2019 Permalink |
Here’s a programmed solution in Python that uses the [[
Football()]] helper class from the enigma.py library. It runs in 108ms.Run: [ @replit ]
# there are four remaining matches: AC, BC, AX, BX from enigma import (Football, irange, cproduct, subsets, printf) # the scoring system football = Football(games='wdl', points=dict(w=2, d=1)) # possible scores (no team scored more than 5) scores = dict() scores['w'] = set((x, y) for x in irange(1, 5) for y in irange(0, x - 1)) scores['d'] = set((x, x) for x in irange(0, 5)) scores['l'] = set((y, x) for (x, y) in scores['w']) # possible outcomes in the remaining 4 games for (AC, BC, AX, BX) in football.games(repeat=4): # table for A, B, C in these four games A = football.table([AC, AX], [0, 0]) B = football.table([BC, BX], [0, 0]) C = football.table([AC, BC], [1, 1]) # A and B got the same number of additional points, and C got 2 more if not (A.points == B.points == C.points - 2): continue # choose scores for the 4 matches for (sAC, sBC, sAX, sBX) in cproduct(scores[x] for x in (AC, BC, AX, BX)): # in total 10 goals are scored in the 4 matches if not (sum(x + y for (x, y) in (sAC, sBC, sAX, sBX)) == 10): continue # goals for/against A, B, C (fA, aA) = football.goals([sAC, sAX], [0, 0]) (fB, aB) = football.goals([sBC, sBX], [0, 0]) (fC, aC) = football.goals([sAC, sBC], [1, 1]) # A failed to score, C scored 5 goals if not (fA == 0 and fC == 5): continue # C worsened their goal average: (70 + fC) / (35 + aC) < 70 / 35 if not (fC < 2 * aC): continue # A, B started off with 70 goals for and a, b goals against # their goal average is better than 70/35, so b < a < 35 for (b, a) in subsets(irange(1, 34), size=2): # and we ended with A having the best goal average, then C, then B if not ((70 + fA) * (35 + aC) > (70 + fC) * (a + aA)): continue if not ((70 + fC) * (b + aB) > (70 + fB) * (35 + aC)): continue # output solution printf("AC={AC}:{sAC} BC={BC}:{sBC} AX={AX}:{sAX} BX={BX}:{sBX} / a={a} b={b}") printf("A={A} f={fA} a={aA}", fA=70 + fA, aA=a + aA) printf("B={B} f={fB} a={aB}", fB=70 + fB, aB=b + aB) printf("C={C} f={fC} a={aC}", fC=70 + fC, aC=35 + aC) printf()Solution: A: for = 70, against = 35; B: for = 73, against = 37; C: for = 75, against = 38.
There are two scenarios. Assuming 2 points for a win and 1 for a draw, we start with:
Then the remaining four matches are played. The outcomes are one of:
Each of these scenarios has 10 goals scored, none of them by A and 5 of them by C.
The final table then becomes:
LikeLike