Brain-Teaser 883: Goals galore
From The Sunday Times, 9th July 1978 [link]
We’ve grown tired of these low-scoring, defensive football matches in our locality, and so it was agreed last March for the annual competition between the five villages, each playing the others once, that no goalkeepers would be allowed, and each game would continue until nine goals had been scored.
Each village won 2 matches, and scored a different number of goals in each match. In the games, each possible result occurred twice. We had to decide the tournament on the total of goals scored, and happily, all five totals were different.
Blackton, the eventual champions, lost 2-7 to Appleton. Easton were last with 11 goals fewer than Blackton.
The Drafton centre-forward remarkably scored a hat-trick in each match, which included a last-second winner against Blackton.
Caxton scored in every match and could indeed have won the league if they had scored twice more in their match against Blackton. As it was they finished one goal ahead of Drafton in the final totals.
What was the score between Easton and Appleton; and what was the score between Caxton and Drafton?
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.
[teaser883]





Jim Randell 9:12 am on 11 November 2021 Permalink |
I used the [[
SubstitutedExpression]] solver from the enigma.py library to solve this puzzle.The following run file executes in 357ms.
Run: [ @replit ]
Solution: Appleton vs. Easton = 3 – 6; Caxton vs. Grafton = 2 – 7.
The full results are:
LikeLike
Frits 12:28 pm on 12 November 2021 Permalink |
Similar but with fewer variables (including the hat-trick requirement).
#!/usr/bin/env python3 -m enigma -r # let the matches be: # # A vs B = F - .. # A vs C = G - .. # A vs D = H - .. # A vs E = I - .. # B vs C = J - .. # B vs D = K - .. # B vs E = L - .. # C vs D = M - .. # C vs E = N - .. # D vs E = O - .. SubstitutedExpression # each village scored a different number of goals in each match # (and so they also each conceded a different number of goals in each match) --distinct="FGHI, JKL, MN" "9 - F not in {J, K, L}" "all_different(9 - G, 9 - J, M, N)" "all_different(9 - H, 9 - K, 9 - M, O)" "all_different(9 - I, 9 - L, 9 - N, 9 - O)" # each team won 2 matches "sum([F > 4, G > 4, H > 4, I > 4]) = 2" "sum([9 - F > 4, J > 4, K > 4, L > 4]) = 2" "sum([9 - G > 4, 9 - J > 4, M > 4, N > 4]) = 2" "sum([9 - H > 4, 9 - K > 4, 9 - M > 4, O > 4]) = 2" "sum([9 - I > 4, 9 - L > 4, 9 - N > 4, 9 - O > 4]) = 2" # each result occurred twice --code="twice = lambda *y: sorted(sorted(x) for x in y) == \ sorted([[0, 9], [1, 8], [2, 7], [3, 6], [4, 5]] * 2)" "twice((F, 9-F), (G, 9-G), (H, 9-H), (I, 9-I), (J, 9-J), (9-K, K), (9-L, L), (9-M, M), (N, 9-N), (O, 9-O))" # each side scored a different number of goals "all_different(F + G + H + J, 9 - F + J + K + L, 18 - G - J + M + N, 27 - H - K - M + O, 36 - I - L - N - O)" # A vs B = 7 - 2 --assign="F,7" # D beat B and scored at least 3 goals in each match --invalid="5-9,K" --invalid="0-2,O" --invalid="7-9,HM" # E has 11 goals fewer than B" "11 - (9 - F + J + K + L - (36 - I - L - N)) = O" # C finished 1 goal ahead of D "(18 - J + M + N) - (27 - H - K - M + O) - 1 = G" # B were the eventual champions "9 - F + J + K + L > max(F + G + H + J, 18 - G - J + M + N)" # C scored in every match --invalid="0,MN" --invalid="9,GJ" # C could have scored 2 more goals against B ... --invalid="0-1,J" # ... and been champions "20 - G - J + M + N > max(F + G + H + J, 7 - F + J + K + L)" # [optional] neater output --template="F, G, H, I, J, K, L, M, N, O" --solution=""LikeLike
Jim Randell 2:47 pm on 12 November 2021 Permalink |
Thanks for the tip about the hat-trick!
LikeLike