### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,149)
- misc (2)
- project euler (2)
- puzzle (38)
- site news (44)
- tantalizer (40)
- teaser (3)

### Site Stats

- 175,242 hits

Advertisements

Programming Enigma Puzzles

1 July 2014

Posted by on **From New Scientist #1349, 17th March 1983** [link]

The plan shows the layout of paths in our local park. At each of the six junctions of paths there is a statue. The shortest route (on the paths) from Disraeli to Victoria is bound to take you past George V only. From Disraeli it is the same distance to Eros as it is to the Unknown Warrior.

I usually choose a walk which starts and finishes at Churchill and passes each of the other statues only once, but I choose it so that the is no other shorter “round walk”.

Last week one stretch of path was closed for repair. This meant that the shortest distance (on paths) from George V to Disraeli was over twice what it was previously. Also, I could not go on any of my usual “round walks” so I chose a new shortest route in the circumstances. As usual it visited each statue just once except for starting and finishing at Churchill. Also I chose the walk and the direction which ensured I passed Eros as soon as possible.

What was the order in which I passed the statues? (

C– – – – –C)

[enigma203]

Advertisements

%d bloggers like this:

This Python 3 program runs in 103ms.

Solution:The order in which the statues were passed was: Churchill, Eros, Disraeli, the Unknown Warrior, George V, Victoria, and back to Churchill (C E D U G V C).There must be a path between G and D as the the shortest route from D to V takes you only past G, hence must be D → G → V. So the only way that removing a path would increase the distance between G and D is if the path removed is between G and D.

I assumed the circles intersected such that the longer curved paths all have length 2 and the shorter curved paths have length 1. Which means the longer straight paths have length of slightly more than 1 (≈ 1.03) and the shorter straight path has length less than 1 (≈ 0.88). If you don’t trust Python’s floats to be accurate enough you can import

piandcosfromSymPyto make all the distances symbolic. It runs a bit slower, but comes up with the same answer.Is the diagram to scale, or does each circle pass through the centre of the other?

Which statue is at which node?

I don’t think the diagram needs to be exactly to scale.

Revisiting my code it didn’t make sense to me, so I’ve changed it to suppose that the circles have a circumference of 6 units. Then the curved paths are all of length 1 (in the middle) or 2 (around the outside), and the middle straight path is a bit less than 1 and the other two straight paths are a bit more than 1 (

d1andd2in the program).If you change the program such that

d1andd2are both exactly 1 then the program still produces the same output, suggesting that if the diagram was drawn out on a equilateral triangular grid with all paths of length 1 unit or 2 units then the answer is the same.The crux of the puzzle is working out which statues are at which nodes, in order to satisfy the conditions in the text. But I’ll add a diagram to my solution that shows the arrangement.

Here’s a diagram that shows the layout of the statues found by my program:

Thanks Jim: one picture is worth a thousand words.

I’d been wondering whether the clue to it was to have all the straight segments the same length, or the central one the same length as the adjacent curved segments. Evidently not.

I’m gradually catching up with these older puzzles. I’d collected many of them even before you started this web site, but was often not able to see how the published solution was arrived at. Your insights and explanations are much appreciated.