### 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

23 October 2013

Posted by on **From New Scientist #2940, 26th October 2013** [link]

Above is a cross-figure to complete. However, there are no across or down clues. Instead you have to ensure that:

a) if an answer uses one of the numbered squares then that answer must be divisible by the little number in that square (for example the five-figure number in 1 down must be divisible by 1, 4 and 7; similarly the five-figure number in 7 across must be divisible by 7);

b) in your answers, only two different digits can be used throughout, one of them odd and the other even;

c) the odd digit must be written at most once in any row or column of the grid.

What are the answers to 1 across, and 7 across?

Currently the online version of this puzzle seems to be missing a title. I shall update it if it is updated on the **New Scientist** site, or when I get my paper copy of the magazine (probably Friday).

**Enigma 1316** is also called “Clueless”.

[enigma1772]

Advertisements

%d bloggers like this:

This puzzle is fairly easy to solve with pencil and paper, but here’s a solution using the

CrossFigure()class from myenigma.pymodule. It considers the possible odd and even digits, and then tries to solve a cross figure puzzle for each combination (only one combination has possible solutions for each answer in the gird). This Python code runs in 43ms.Solution:The answer to 1 across is 44454. The answer to 7 across is 45444.Here’s the completed grid:

Here’s the manual solution:

Both 1A and 1D must end with the even digit, hence both 3D and 7A must start with it, so it cannot be 0. So 5A must have 5 as its final digit and the even digit as its first digit.

So 3D must be composed of four even digits with a 5 in the middle, and be divisible by 3. The only possible candidate is 44544.The rest of the grid then follows.

These ‘cross figure’ enigmas are very uninspiring in my view.

Agreed – it’s not a very inspiring puzzle.

I wrote the

CrossFigure()solver because it was more fun to write the general solver than solve another cross figure puzzle (Enigma 1755), but of course that makes subsequent puzzles even less of a challenge. (Except it’s nice to know that the code I wrote does work on them).And I don’t think you need even to consider the ‘o0’ pairs for 5A, because both 1A and 1D must end with the even digit, so 3D and 7A must start with it, hence it can’t be 0.

I agree that I could cut out the digit pairs including a zero as you suggest. When I started this, I added this restriction on digit pairs as I thought that a recursion depth of 20 might make it slow even though each step only involved two alternatives. But looking at all (even, odd) diigit pairs is still almost instantaneous so it was really not necessary. ..

25,45,65 and 85 are the only numbers divisible by 5 under the limitations given.

Then by trial and error one can reach the two digits , hence the solution.