### 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

2 December 2016

Posted by on **From New Scientist #1522, 21st August 1986** [link]

(R = Red, B = Blue, G = Green, Y = Yellow)

You will no doubt have recognised this as the latest masterpiece by the artist Pussicato, which has just gone on display at the National Gallery. I visited Pussicato in his studio at the end of March, just before he began work on the picture. He showed me the canvas divided into 36 squares which were numbered 1 to 36. He planned to paint the squares in order, one per day starting with square 1 on 1 April, using the four colours in strict rotation. He had numbered the squares so that from one day to the next he always moved to an adjacent square either horizontally or vertically; also, squares 1 and 36 were similarly adjacent. As I looked at the canvas, I pointed to two horizontally adjacent squares and remarked that the right-hand one contained a number which was 8 times the number in the left-hand square. Pussicato had no reply.

On what date did Pussicato paint the top left hand square of the picture?

[enigma373]

Advertisements

%d bloggers like this:

This Python 3 program runs in 65ms.

Solution:The top left hand square was painted on Day 31, i.e. 1st May.The path that follows the painting order visits the colours in a strict repeating order and finishes in a square adjacent to its start. As there are 36 squares in the grid and 4 colours we must cycle through the colour sequence 9 times, and so we can close the path into a circuit.

By inspecting the corners (there is one of each colour) we can see that the order the colours are visited in is either …RBGY… or …RYGB…, one of these is the reverse of the other, so we only need to consider one of these possibilities as the visiting the colours in the other order would just amount to traversing the circuit in the opposite direction.

It turns out there is only one circuit on the grid that traverses the colours in strict rotation, as seen below:

When we number the squares along the circuit there must be two squares horizontally adjacent to each other where the number of the right-hand one is 8 times the number on the left-hand one (i.e. 1 | 8, 2 | 16, 3 | 24, 4 | 32), so we are looking for adjacent squares that have numbers different by 7, 14, 21 or 28 (multiples of 7).

Again there is only one way to number the squares to satisfy this:

and this arrangement has 1 next to 8.

The number in the top left-hand corner is 31, so this is coloured on the 31st day. If we start on 1st April that would be 1st May.