### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,114)
- misc (2)
- project euler (2)
- puzzle (29)
- site news (43)
- tantalizer (29)
- teaser (3)

### Site Stats

- 166,224 hits

Programming Enigma Puzzles

15 June 2013

Posted by on **From New Scientist #2581, 9th December 2006**

Joe’s latest puzzle for Penny consists of nine consecutively numbered pegs and a disc with 10 holes, which is free to rotate on a small board. The problem is to insert all nine pegs in the disc.

A peg may only be inserted in the disc in an empty hole adjacent to the arrow. The disc is then rotated clockwise the number of holes equal to the number on that peg. So in the picture, if peg 6 is inserted, the disc is then rotated until the peg is in the position where peg 3 is shown.

The final position of the pegs in Penny’s solution are shown above, but she cannot remember the positions of the pegs numbered 4, 5 and 6.

In what order did Penny insert the nine pegs?

[enigma1421]

Advertisements

%d bloggers like this:

This Python program runs in 36ms.

Solution:The pegs were inserted in the following order: 6, 1, 4, 8, 3, 2, 9, 5, 7.