### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,115)
- misc (2)
- project euler (2)
- puzzle (29)
- site news (43)
- tantalizer (29)
- teaser (3)

### Site Stats

- 166,357 hits

Programming Enigma Puzzles

19 August 2015

Posted by on **From New Scientist #2365, 19th October 2002** [link]

Lloyd and Owen have a new game. They imagine there is a football league with four teams, A, B, C and D. Each team plays every other team once, scoring 1 point for a draw and 2 for a win. The teams are ordered in their league by points and, where there are equal points, by goal difference.

At the start of their game, Lloyd has six cards in his hand, each with a different match on it, A v B, A v C, etc. The game consists of six rounds, numbered 1 to 6 in order. In each round Lloyd chooses one of the cards in his hand and lays it on the table. Owen writes a score on it, for example if the card was A v B, he might write A2 v B1. They then work out the league table for the matches played so far and see who is top. They also work out if it is certain that the team will be top after all the six matches have been played, whatever the scores of the remaining matches. If it is certain and it was not certain in the previous round then that round is called the “Decisive” round. That completes the round.

Lloyd plays so as to make the Decisive round as late as possible and Owen aims to make it as early as possible.

Question 1:If they both play as well as possible, what is the number of the Decisive round?

Question 2:If they change the rules so that a team gets 3 points for a win, what then is the number of the Decisive round?

[enigma1209]

Advertisements

%d bloggers like this:

I didn’t particularly like this puzzle. I’m not usually a fan of the “football league table”-type puzzle, and I found this one quite a tricky one to write a program for, and while it looks OK I’m not completely confident in it.

This Python program examines the possible game play. It runs in 5.6s. The number of points for a win can be specified on the command line (default = 2).

Solution:Q1. With 2 points for a win the decisive round is round 6; Q2. With 3 points for a win the decisive round is round 5.