# Enigmatic Code

Programming Enigma Puzzles

## Puzzle #53: Painting by numbers

When the famous artist Pablo Picossa held his final exhibition at the Galleria del Pardo, he wanted the public to experience his works in the order in which he had created them. Paintings from his early “Green” period were in room 1. From there, visitors should go to room 2 to see his Mauve works and then to the adjacent rooms 3, 4, 5 and so on, until they reached the Black paintings (generally viewed as Picossa’s darkest period) in room 9.

Alas, no details remain to indicate which room was where. Yet his widow Bella does recall a curiosity about the numbering of the rooms: the three-digit number formed by the top row added to the the number formed by the middle row equals the number formed by the bottom row.

Can you recreate Picossa’s gallery tour?

This is a rewording of the puzzle previously published in New Scientist as Tantalizer 467 (September 1976) and Enigma 328 (October 1985).

[puzzle#53]

### One response to “Puzzle #53: Painting by numbers”

1. Jim Randell 4 April 2020 at 8:41 am

This puzzle has already appeared twice in New Scientist. See: Enigma 328, Tantalizer 467.

But here is another program to solve it that uses the [[ `SubstitutedSum()` ]] solver and the [[ `grid_adjacency()` ]] function from the enigma.py library.

```from enigma import grid_adjacency, SubstitutedSum, irange, printf

# adjacency matrix for a 3x3 grid