### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,314)
- misc (3)
- project euler (2)
- puzzle (78)
- puzzle# (21)
- site news (54)
- tantalizer (80)
- teaser (7)

### Site Stats

- 217,165 hits

Programming Enigma Puzzles

3 April 2019

Posted by on **From New Scientist #983, 15th January 1976** [link]

The Rätselgarten in Vienna is famous for its twenty goddesses, whos statues stand at the junctions of its paths. The task of keeping them spick and span belongs to Stephan Schnitzel. Once a month he dusts and polishes them, following a route of his own design which, without leaving the paths show, takes him to each goddess exactly twice.

Each goddess has a different letters on the plan in his office and his order of visiting is, he tells me:

P A D M O I C T F K G B J R H N L Q E S P A L Q J R H N D M O I C T S F E K G B.

But, as you will no doubt spot without even being told which letter to put at which junction, he has made a small error in the telling. He has inadvertently put two consecutive letters in the wrong order somewhere.

Can you work out which they are?

[tantalizer432]

%d bloggers like this:

We have solved a similar puzzle to this one before. See

Enigma 56(also by Martin Hollis).If we colour the nodes of the graph as follows:

We see that we can only proceed to a green node from a red node, and vice versa. So any path will alternate between visiting red and green nodes.

We can therefore partition the given route into those nodes in an odd position and those in an even position.

For a valid route each node will appear either in only odd positions, or only even positions.

So we can find the transposed nodes by looking for those that appear in both partitions.

This Python program runs in 95ms.

Run:[ @repl.it ]Solution:F and S have been transposed.F and S only appear in adjacent positions towards the end, so the correct route should end: