### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

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

### Site Stats

- 178,002 hits

Advertisements

Programming Enigma Puzzles

14 January 2013

Posted by on **From New Scientist #2635, 22nd December 2007**

Miss Amber is holding the dress rehearsal for the school Nativity play. The choir has 81 children, consisting of 9 each of angels, barn owls, chickens, dogs, ewes, farmhands, goats, horses and innkeepers. She marked out a 9×9 grid on the stage and some of the children are already in the grid (below).

Surprisingly, Miss Amber was able to add the other children to the grid, making sure each row, column and 3×3 box contains all the 9 characters. Find the 3×3 box in the bottom left-hand corner of the finished grid.

[enigma1474]

Advertisements

%d bloggers like this:

It quickly becomes apparent that this isn’t a standard “Sudoku” style puzzle. (For instance there is no possible letter to fit the empty square that is fourth from the left on the top row). And since the puzzle states “each row, column and 3×3 box contains all of the 9 characters”, the only Sudoku rule that is missing is “each square contains one of the characters A-I”, and since empty squares must be allowed it follows that some squares must contain more than one character.

There are rather a lot of squares already filled out and a strategy that looks through each group (row, column, box) to see where the remaining values must be placed completes after two iterations. The following Python program solve the puzzle in 43ms.

Solution:The 3×3 box in the bottom left hand corner of the completed puzzle is: empty, F, C; D, I, G; E & H, B, A.