### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

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

### Site Stats

- 168,355 hits

Programming Enigma Puzzles

21 February 2012

Posted by on **From New Scientist #2728, 3rd October 2009** [link]

Joe’s puzzle was no rollover for Penny. Joe drew a mini-chess board on a card and made a dice with the letters ENIGMA in place of the numbers. Penny had to select a letter and then place the dice on the X with the selected letter on the top. Then she moved the dice, by rolling it (rotating it by 90 degrees), from square to square to the corresponding lettered square on the right of the board, finishing with the selected letter on top. For each letter the number of moves had to be a minimum. What are the minimum number of moves for each of the letters E, N, I, G, M and A?

[enigma1565]

Advertisements

%d bloggers like this:

The following Python program implements a depth first search and runs in 124ms.

Solution:The minimum number of moves for each letter are: E=10, N=9, I=8, G=7, M=8, A=7.