### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,183)
- misc (2)
- project euler (2)
- puzzle (46)
- site news (46)
- tantalizer (49)
- teaser (3)

### Site Stats

- 184,820 hits

Advertisements

Programming Enigma Puzzles

15 September 2013

Posted by on **From New Scientist #2552, 20th May 2006**

That great artist Pussicato has just held an exhibition of 512 different paintings. Each painting consists of a three-by-three array of small squares and each square is coloured red or green. Pussicato gives each painting a value which he calculates as follows. He writes down the three horizontal rows, reading each from left to right, and the three vertical rows, reading each from top to bottom. This gives him six 3-sequences. He counts how many of the six are different and that is the value of the painting. For example, the diagramÂ has 3-sequences RRG, GRG, GGG, RGG, RRG, GGG and value 4.

How many paintings in the exhibition had (a) value 1, (b) value 2, (c) value 6?

[enigma1392]

Advertisements

%d bloggers like this:

It’s straightforward to generate all the paintings and record the value for each one. This Python program runs in 35ms.

Solution:(a) 2 paintings have value 1; (b) 18 paintings have value 2; (c) 24 paintings have value 6.