### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,393)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (61)
- site news (62)
- tantalizer (105)
- teaser (7)
- today (1)

### Site Stats

- 244,211 hits

Programming Enigma Puzzles

3 April 2020

Posted by on **From New Scientist #2121, 14th February 1998** [link]

At tennis a set is won by the first player to win 6 games, except that if it goes to 5 games all it is won either 7 games to 5 or 7 games to 6. (As far as this puzzle is concerned this applies even to the final set).

The match that we are considering went to 5 sets and no two sets contained the same number of games. At the end of each set the total number of games played up to that point was always a prime number. From this information the score in one or more of the five sets can be deduced with certainty.

Which sets had a score that can be deduced with certainty, and what was the score in each of the sets concerned?

[enigma966]

%d bloggers like this:

See also

Enigma 1005, also set by Richard England.I adapted the program I wrote for

Enigma 1005.The following Python 3 program runs in 95ms.

Run:[ @repl.it ]Solution:The outcomes of sets 1 and 4 are known. Set 1 is won 6-1. Set 4 is won 6-2.It turns out that in order for there to be a solution to the puzzle we have to report the scores in each set as an unordered pair. So, if a match went: 6-1, 0-6, 6-4, 2-6, 7-5, then we consider the scores 6-1, 6-0, 6-4, 6-2, 7-5.

So we cannot tell if the match winner or the opponent won sets 1 or 4.