### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,183)
- misc (2)
- project euler (2)
- puzzle (46)
- site news (46)
- tantalizer (49)
- teaser (3)

### Site Stats

- 184,820 hits

Advertisements

Programming Enigma Puzzles

27 December 2013

Posted by on **From New Scientist #2519, 1st October 2005**

Joe reckons that the latest popular puzzle is based on a much older puzzle in which the same set of letters were placed in each row, each column and each diagonal of a grid. This is part of Joe’s attempt at a 6-by-6-grid, which he has dedicated to his parents.

What 6 letters are missing from the second row (left to right)?

[enigma1360]

Advertisements

%d bloggers like this:

You can solve this puzzle using a simple recursive program (see Enigma 1780), or with a more strategic based solver (see Enigma 1657), but here’s a program that uses PyMathProg to solve the puzzle using ILP. It runs in 69ms.

Solution:The letters in the second row are G E M N A I.There are two possible arrangements of the grid, but the PyMathProg solution stops when it finds a solution.