Place one of A, B, C or D into each of the 25 empty squares so that the number of letters in each row and column match the number indicated on that row and column for that letter.
Identical letters cannot be next to each other vertically or horizontally, but may be adjacent diagonally.
+---+---+---+---+---+
A | 2 | 0 | 2 | 2 | 2 |
+---+---+---+---+---+
B | 1 | 2 | 0 | 2 | 0 |
+---+---+---+---+---+
C | 1 | 2 | 1 | 0 | 1 |
+---+---+---+---+---+
A B C D | 1 | 1 | 2 | 1 | 2 |
+---+---+---+---++===+===+===+===+===+
| 2 | 1 | 1 | 1 || | | | | |
+---+---+---+---++---+---+---+---+---+
| 2 | 1 | 0 | 2 || | | | | |
+---+---+---+---++---+---+---+---+---+
| 2 | 2 | 1 | 0 || | | | | |
+---+---+---+---++---+---+---+---+---+
| 0 | 1 | 2 | 2 || | | | | |
+---+---+---+---++---+---+---+---+---+
| 2 | 0 | 1 | 2 || | | | | |
+---+---+---+---++---+---+---+---+---+
From Mensa Puzzle Calendar 2020 by Fraser Simpson, Workman Publishing, New York. Puzzle for December 30.
lord@rabbit-3 grid % gr
success!
CDABA
ABDAD
BCABA
DBCDC
ACDAD
First, I solved this with a brute force computer program, but then I had a second look and realized that it’s not very hard to do by hand. The non-adjacency constraint is very strong. For example, for any summary with two 2’s, like 0221, there are only 12 possible legal rows (or columns). Then, the 0’s in the perpendicular summaries will eliminate many of the 12. For example, the second column, top to bottom, can only be CBCBD or DBCBC to have the 0’s listed in the row summaries. Next, there are 12 possibilities for the 3rd column, and of these, only7 remain after the perpendicular 0’s are obeyed, and then avoiding side-by-side adjacencies, only three pairings for columns 2 and 3 are possible: (CBCBD, ADADC; DBCBC, ADACD; DBCBC, CDADA). The process is repeated to include column 4 etc., quickly leading to the result.
Edited on January 7, 2021, 10:16 am