### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,158)
- misc (2)
- project euler (2)
- puzzle (40)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 178,002 hits

Advertisements

Programming Enigma Puzzles

14 January 2014

Posted by on **From New Scientist #1306, 20th May 1982** [link]

Lunchtime at Bramfield School is currently being taken up with a five-a-side soccer competition, in which five teams are playing in a league and will eventually play each other just once. Young James, who has shown himself to be more capable of tackling sums than footballers, is keeping a record of the results from the touchline, and has the table below as his latest check:

It is surprising, even with James’s keen eye for numbers, that he has spotted that the sum of all the numbers in this table is twice what it was earlier in the competition (when the league had no clear leader[*]).

What had been the results at that stage?[*] This phrase is intended to imply two or more teams had the same number of points at the top.

I don’t think there is a unique solution to this puzzle (as the problem statement implies).

[enigma161]

Advertisements

%d bloggers like this:

I always find these football puzzle fiddly to program, even using the

Football()class from theenigma.pylibrary to make things a bit less confusing.This Python program starts by find possible results that match the table given in the problem statement, and then examines subsets of those results that give a table where the numbers involved sum to half the sum of the number in the original table. It runs in 124ms.

Solution:The published solution is:But there is a second solution that satisfies the conditions of the puzzle:

Both these solutions have the same collection of results for the table given in the puzzle, namely:

There isn’t any condition given in the puzzle to exclude the second solution (even though one could fairly easily have been included, or we could have been asked, for example, for the results of Rovers matches (if any)), so I have marked the puzzle as flawed.