Math Puzzle Solving

519 Views Asked by At

Using each of the digits 1,2,3,4,5,6,7,8 exactly once fill in the boxes so that no consecutive number is adjacent or cross to that number.

Example 1:

          -----
         |  1  |
 ----------------------
|   2(x) |     | 3(v)  |
 ----------------------
|        |     |       |
 ----------------------
         |     |
          -----

In the above example 1, 2 is invalid as 1 is cross to 2 also 1 & 3 are valid as the are not consecutive.

Example 2:

         -----
        |     |
 --------------------
|       |     |      |
 --------------------
|       | 6(x)|      |
 --------------------
        |  5  |
         -----

In the above example 2, 5 & 6 are invalid,instead of 6 ,the valid ones are 1,2,3,7,8.

1

There are 1 best solutions below

0
On BEST ANSWER

A number placed in one of the two center squares is adjacent to all but one of the other squares. That means the number can be consecutive with at most one other allowed number, which must go in the far square. This forces us to put 1 and 8 in the center squares:

 ?
?1?
?8?
 ?

and 2 and 7 must go in the top and bottom:

 7
?1?
?8?
 2

From here, a bit of trying stuff out gets us one of the 8 possible solutions:

 7
413
685
 2

The other solutions are

 7
315
684
 2

and the 6 solutions obtained by mirroring the above solutions across the puzzle's horizontal and vertical lines of symmetry.