Office Applications and Entertainment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

9.5   More Solutions, Sudoku Comparable

9.5.1 Introduction


Any number m = 0 ... 80 can be written as m = b1 + 9 * b2 with bi = 0, 1, ... 8 for i = 1, 2.

Consequently any Magic Square M of order 9 with the numbers 1 ... 81 can be written as M = B1 + 9 * B2 + [1] where the matrices B1 and B2 contain only the integers 0, 1, ... 8.

9.5.2 Sudoku Comparable Squares

Rows, columns and 3th order sub squares of the matrices B1 and B2 containing the nine integers 0, 1, ... 8 will sum to the Magic Sum 36. Subject matrices will be further referred to as Sudoku Comparable Squares.

The well known Sudoku Puzzle, based on the integers 1, 2 ... 9, can be considered as a less strict defined 9th order Magic Square, for which only the rows, columns and sub squares sum to the Magic Sum 45, although other properties - as discussed in previous sections for 9th order Magic Squares - might occur.

Sudoku Comparable Squares can be generated by applying the deducted equations, however for a Magic Sum 36 and with the less strict restriction that only the elements of each row, column and sub square should be different.

Associated, Compact Pan Magic

An optimized guessing routine (SudSqr9a), based on the equations deducted in Section 9.4.2, produced 64 Sudoku Comparable Squares within 41,5 seconds, which are shown in Attachment 9.6.1.

Associated, regular sub squares summing to s1

Based on the 64 Sudoku Comparable Squares found above, 960 different Sudoku Comparable Associated Magic Squares with the 9 regular sub squares summing to s1, can be found by means of appropriate row and column permutations, which are shown in Attachment 9.6.12.

Associated, every third-row and third-column summing to s1/3

An optimized guessing routine (SudSqr9b), based on the equations deducted in Section 9.4.5, produced 720 Sudoku Comparable Squares within 520 seconds, which are shown in Attachment 9.6.10.

9.5.3 Ternary Squares

The number of independent variables (24) for the equations deducted in Section 9.4.3 is too high to obtain results within a reasonable time, even for the integers 0, 1 ... 8.

However if the number of integers is limited to 0, 1 and 2 under the restriction that rows, columns, main diagonals and applicable sub squares contain each of these integers 3 times, a controllable collection of solutions can be obtained within a reasonable time.

Any Sudoku Comparable Square of the 9th order with the numbers 0, 1 ... 8 can be written as G1 + 3 * G2, where the matrices G1 and G2 - further referred to as Ternary Squares - contain only the numbers 0, 1 and 2.

An optimized guessing routine (Ternary9a), based on the equations deducted in Section 9.4.3, produced 3456 Ternary Squares within 90 minutes.

Following cases have been considered (CnstrSqrs9b):

  • Based on the complete collection 9216 Sudoku Comparable Squares were counted in about 18 hours, which can be used for the generation of numerous 9th order Compact Pan Magic Squares;

  • The collection contains 96 Ternary Compact Associated Pan Magic Squares (ref. Attachment 9.6.8), which resulted in 1152 Sudoku Comparable Compact Associated Pan Magic Squares, which are shown in Attachment 9.6.11.

  • Under the limiting condition that all 45 sub squares, related to the Partly Compact property, contain each the integers 0, 1 ... 8, 144 Sudoku Comparable Compact Pan Magic Squares could be generated (ref. Attachment 9.6.4);

  • A collection of 24 Ternary Partly Compact Magic Squares could be constructed (ref. Attachment 9.6.6), which resulted under the same limiting condition in 144 Sudoku Comparable Partly Compact Magic Squares (ref. Attachment 9.6.7);

  • John Hendricks constructed 24 Ternary Squares (Attachment 9.6.2), which could be used for the construction of 9th order Bimagic squares. The 24 Ternary Squares result in 432 Sudoku Comparable Squares which are shown in Attachment 9.6.3.

9.5.4 Application and Results

Numerous (Pan) Magic Squares can be generated by selecting combinations of Sudoku Comparable Squares (B1, B2) while ensuring that the resulting square M contains all integers 1 thru 81 (CnstrSqrs9a):

  • Based on the collection of 1152 Sudoku Comparable Compact Associated Pan Magic Squares 58368 Compact Associated Pan Magic Squares of order 9 could be generated.

  • Based on the collection of 960 Sudoku Comparable Associated Magic Squares, with the regular sub squares summing to s1, 236544 (= 8 * 48 * 616) of subject Associated Magic Squares of order 9 could be generated.

  • Based on the collection of 720 Sudoku Comparable Associated Magic Squares, with third-row and third-column summing to s1/3, 27648 of subject Associated Magic Squares of order 9 could be generated.

  • Based on the collection of 64 Sudoku Comparable Compact Associated Pan Magic Squares (ref. Attachment 9.6.1) 1536 Compact Associated Pan Magic Squares of order 9 could be generated within 60 seconds;

  • Bimagic Compact and Partly Compact Magic Squares can be generated based on the Collections:

    41472 Compact and Partly Compact Magic Squares of order 9 could be generated within 42 minutes, of which 20736 Bimagic (Partly Compact).

  • Based on the collection of 432 Sudoku Comparable Magic Squares (ref. Attachment 9.6.3) 31104 Bimagic Squares of order 9 could be generated within 53 minutes.

Attachment 9.6.5 shows a few examples of four Ternary squares, two related Sudoku Comparable Squares, the resulting Magic Square and the corresponding Magic Square of squared elements.


Vorige Pagina Volgende Pagina Index About the Author