Brain-Teaser 30: [Football table]
From The Sunday Times, 15th October 1961 [link]
In a football tournament each country played each other country twice, the scores in all twelve matches being different.
The records for the top and bottom teams were:
England beat Wales twice by the same margin as she beat Ireland once.
The sum of the aggregate number of goals scored against Scotland, who finished second, and Ireland was 20.
What were the respective scores in the Ireland vs. Scotland matches?
This puzzle was originally published with no title.
[teaser30]

Jim Randell 9:41 am on 13 April 2021 Permalink |
This seems to be the earliest “football table” Teaser.
We are told that the sum of Scotland and Ireland’s “goals against” values is 20, which means the total of the “goals against” column must be 38. And so the sum of Scotland and Ireland’s “goals for” values must be 38 − (16 + 8) = 14.
The following Python program uses the [[ Football() ]] helper class from the enigma.py library. It runs in 1.22s.
from itertools import product from enigma import (Football, ordered, chunk, subsets, irange, multiset, join, printf) # scoring system football = Football(games="wdl", points=dict(w=2, d=1)) # identify matches with the same scoreline keys = lambda ss: list(ordered(*s) for s in ss) # check a sequence of scores, all different and in ordered pairs check = lambda ss, ps: len(set(ss)) == len(ss) and all(x > y for (x, y) in chunk(ps, 2)) # margin margin = lambda ss: ss[0] - ss[1] # record scores in the S vs I matches rs = multiset() # scorelines for E (who have won all their matches) (ew1, ew2, es1, es2, ei1, ei2) = mes = 'w' * 6 for ssE in football.scores(mes, [0] * 6, 16, 3): # check scorelines ss0 = keys(ssE) if not check(ss0, ss0): continue # E wins E vs W by same margin, same as exactly one of the E vs I (EW1, EW2, ES1, ES2, EI1, EI2) = ssE d = margin(EW1) if not (d == margin(EW2) and (margin(EI1), margin(EI2)).count(d) == 1): continue # W have 2 draws and 2 losses remaining for mws in subsets("ddll", size=len, select="mP"): for ssW in football.scores(mws, [0] * 4, 8, 15, [EW1, EW2], [1, 1]): ss1 = keys(ssW) if not check(ss0 + ss1, ss1): continue # calculate current goals for/against S and I (so far) (WS1, WS2, WI1, WI2) = ssW (fS, aS) = football.goals([ES1, ES2, WS1, WS2], [1, 1, 1, 1]) (fI, aI) = football.goals([EI1, EI2, WI1, WI2], [1, 1, 1, 1]) # goals against S and I sum to 20 (and goals for S and I sum to 14) (ga, gf) = (20 - aS - aI, 14 - fS - fI) if ga < 0 or gf < 0: continue # choose outcomes for S vs I matches (ws1, ws2, wi1, wi2) = mws for (si1, si2) in football.games(repeat=2): S = football.table([es1, es2, ws1, ws2, si1, si2], [1, 1, 1, 1, 0, 0]) I = football.table([ei1, ei2, wi1, wi2, si1, si2], [1, 1, 1, 1, 1, 1]) if not (12 >= S.points >= I.points >= 2): continue # chose remaining "for" and "against" goals for S for (x, y) in product(irange(0, gf), irange(0, ga)): # look for scorelines for (SI1, SI2) in football.scores([si1, si2], [0, 0], x, y): ss2 = keys([SI1, SI2]) if not check(ss0 + ss1 + ss2, ss2): continue # and check goals "for"/"against" I (x_, y_) = football.goals([SI1, SI2], [1, 1]) if not (x + x_ == gf and y + y_ == ga): continue # check S is second and I is third if not (S.points > I.points or fS - aS + x - y > fI - aI + x_ - y_): continue if not (I.points > 2 or fI - aI + x_ - y_ > -7): continue printf("[EW = {EW1} {EW2}; ES = {ES1} {ES2}; EI = {EI1} {EI2}; WS = {WS1} {WS2}; WI = {WI1} {WI2}; SI = {SI1} {SI2}]") rs.add((SI1, SI2)) # output solution for (k, v) in rs.most_common(): printf("S vs I = {k} [{v} solutions]", k=join(k, sep=", "))Solution: The scores in the Scotland vs. Ireland matches were 4-0 and 0-0.
There are many scenarios which lead to this solution. One of them is:
LikeLike
John Crabtree 4:28 pm on 16 April 2021 Permalink |
There were 38 goals scored, ie the minimum possible, and so the match scores were 0-0; 1-0; 2-0, 1-1; 3-0, 2-1; 4-0, 3-1, 2-2; 5-0, 4-1, 3-2.
Wales scored 8 goals, with scores of 2-3 vE, 1-2 vE, 1-1, 2-2, 1-3 and 1-4.
And so the scores in England’s other games were 1-0 vI, 2-0, 3-0 and 5-0.
The other two matches were between Ireland and Scotland with scores of 0-0 and 4-0.
It is interesting to know when these puzzles started. Some of the later ones were much more convoluted
LikeLike