Office Applications and Entertainment, Latin Squares

Vorige Pagina Volgende Pagina Index About the Author

17.0   Latin Squares (17 x 17)

A Latin Square of order 17 is a 17 x 17 square filled with 17 different symbols, each occurring only once in each row and only once in each column.

17.1   Latin Diagonal Squares (17 x 17)

Latin Diagonal Squares are Latin Squares for which the 17 different symbols occur also only once in each of the main diagonals.

17.2   Magic Squares, Natural Numbers

17.2.1 Pan Magic Squares

Pan Magic Square M of order 17 with the integers 1 ... 289 can be written as M = A + 17 * B + 1 where the squares A and B contain only the integers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ... 16.

Consequently order 17 Pan Magic Squares can be based on pairs of Orthogonal Latin Diagonal Squares (A, B).

The required Orthogonal Latin Diagonal Squares (A, B) for Pan Magic Squares can be constructed as follows:

  1. Fill the first row of square A and square B with the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ... 16.
    While starting with 0 there are 16! = 2,09228 1013 possible combinations for each square.

  2. Complete square A and B by copying the first row into the following rows of the applicable square,
    according to one of the following 91 schemes:

    A/B L2 R2 L3 R3 L4 R4 L5 R5 L6 R6 L7 R7 L8 R8
    L2 - y y y y y y y y y y y y y
    L3 y y - y y y y y y y y y y y
    L4 y y y y - y y y y y y y y y
    L5 y y y y y y - y y y y y y y
    L6 y y y y y y y y - y y y y y
    L7 y y y y y y y y y y - y y y
    L8 y y y y y y y y y y y y - y

    Ln = shift n columns to the left  (n = 2, 3, 4, 5, 6, 7, 8)
    Rn = shift n columns to the right (n = 2, 3, 4, 5, 6, 7, 8)

Attachment 17.2.1 shows the 14 types Latin Diagonal Squares based on the construction method described above.

An example of such a pair (A, B) and the resulting Pan Magic Square M is shown below:

A(L2)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 1
4 5 6 7 8 9 10 11 12 13 14 15 16 0 1 2 3
6 7 8 9 10 11 12 13 14 15 16 0 1 2 3 4 5
8 9 10 11 12 13 14 15 16 0 1 2 3 4 5 6 7
10 11 12 13 14 15 16 0 1 2 3 4 5 6 7 8 9
12 13 14 15 16 0 1 2 3 4 5 6 7 8 9 10 11
14 15 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13
16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0
3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 1 2
5 6 7 8 9 10 11 12 13 14 15 16 0 1 2 3 4
7 8 9 10 11 12 13 14 15 16 0 1 2 3 4 5 6
9 10 11 12 13 14 15 16 0 1 2 3 4 5 6 7 8
11 12 13 14 15 16 0 1 2 3 4 5 6 7 8 9 10
13 14 15 16 0 1 2 3 4 5 6 7 8 9 10 11 12
15 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
B(R2)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
15 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
13 14 15 16 0 1 2 3 4 5 6 7 8 9 10 11 12
11 12 13 14 15 16 0 1 2 3 4 5 6 7 8 9 10
9 10 11 12 13 14 15 16 0 1 2 3 4 5 6 7 8
7 8 9 10 11 12 13 14 15 16 0 1 2 3 4 5 6
5 6 7 8 9 10 11 12 13 14 15 16 0 1 2 3 4
3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 1 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0
16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
14 15 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13
12 13 14 15 16 0 1 2 3 4 5 6 7 8 9 10 11
10 11 12 13 14 15 16 0 1 2 3 4 5 6 7 8 9
8 9 10 11 12 13 14 15 16 0 1 2 3 4 5 6 7
6 7 8 9 10 11 12 13 14 15 16 0 1 2 3 4 5
4 5 6 7 8 9 10 11 12 13 14 15 16 0 1 2 3
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 1
M = A + 17 * B + 1
1 19 37 55 73 91 109 127 145 163 181 199 217 235 253 271 289
258 276 5 23 41 59 77 95 113 131 149 167 185 203 221 222 240
226 244 262 280 9 27 45 63 81 99 117 135 153 154 172 190 208
194 212 230 248 266 284 13 31 49 67 85 86 104 122 140 158 176
162 180 198 216 234 252 270 288 17 18 36 54 72 90 108 126 144
130 148 166 184 202 220 238 239 257 275 4 22 40 58 76 94 112
98 116 134 152 170 171 189 207 225 243 261 279 8 26 44 62 80
66 84 102 103 121 139 157 175 193 211 229 247 265 283 12 30 48
34 35 53 71 89 107 125 143 161 179 197 215 233 251 269 287 16
274 3 21 39 57 75 93 111 129 147 165 183 201 219 237 255 256
242 260 278 7 25 43 61 79 97 115 133 151 169 187 188 206 224
210 228 246 264 282 11 29 47 65 83 101 119 120 138 156 174 192
178 196 214 232 250 268 286 15 33 51 52 70 88 106 124 142 160
146 164 182 200 218 236 254 272 273 2 20 38 56 74 92 110 128
114 132 150 168 186 204 205 223 241 259 277 6 24 42 60 78 96
82 100 118 136 137 155 173 191 209 227 245 263 281 10 28 46 64
50 68 69 87 105 123 141 159 177 195 213 231 249 267 285 14 32

Each type Latin Diagonal Square described above, corresponds with 16! = 2,09228 1013 Latin Diagonal Squares.

The possible combinations of square A and B described above will result in 91 * (2,0922 1013)2 / 4 = 9,95911 1027 unique solutions.

Each unique Pan Magic Square results in a Class Cn and finally in 8 * 289 * 9,95911 1027 = 2,30255 1031 possible Pan Magic Squares of the 17th order.

Attachment 17.2.2 shows one Pan Magic Square for each valid type combination (A, B) as defined above.

17.2.2 Ultra Magic Squaress

A numerical example of the construction of an order 17 Ultra Magic Square M based on pairs of Orthogonal Latin Diagonal Squares (A, B), for the untegers {ai, i = 0 ... 16} and {bj, j = 0 ... 16} is shown below:

A
16 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
2 1 16 0 15 14 13 12 11 10 9 8 7 6 5 4 3
4 3 2 1 16 0 15 14 13 12 11 10 9 8 7 6 5
6 5 4 3 2 1 16 0 15 14 13 12 11 10 9 8 7
8 7 6 5 4 3 2 1 16 0 15 14 13 12 11 10 9
10 9 8 7 6 5 4 3 2 1 16 0 15 14 13 12 11
12 11 10 9 8 7 6 5 4 3 2 1 16 0 15 14 13
14 13 12 11 10 9 8 7 6 5 4 3 2 1 16 0 15
0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 16
1 16 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2
3 2 1 16 0 15 14 13 12 11 10 9 8 7 6 5 4
5 4 3 2 1 16 0 15 14 13 12 11 10 9 8 7 6
7 6 5 4 3 2 1 16 0 15 14 13 12 11 10 9 8
9 8 7 6 5 4 3 2 1 16 0 15 14 13 12 11 10
11 10 9 8 7 6 5 4 3 2 1 16 0 15 14 13 12
13 12 11 10 9 8 7 6 5 4 3 2 1 16 0 15 14
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 16 0
B = T(A)
16 2 4 6 8 10 12 14 0 1 3 5 7 9 11 13 15
0 1 3 5 7 9 11 13 15 16 2 4 6 8 10 12 14
15 16 2 4 6 8 10 12 14 0 1 3 5 7 9 11 13
14 0 1 3 5 7 9 11 13 15 16 2 4 6 8 10 12
13 15 16 2 4 6 8 10 12 14 0 1 3 5 7 9 11
12 14 0 1 3 5 7 9 11 13 15 16 2 4 6 8 10
11 13 15 16 2 4 6 8 10 12 14 0 1 3 5 7 9
10 12 14 0 1 3 5 7 9 11 13 15 16 2 4 6 8
9 11 13 15 16 2 4 6 8 10 12 14 0 1 3 5 7
8 10 12 14 0 1 3 5 7 9 11 13 15 16 2 4 6
7 9 11 13 15 16 2 4 6 8 10 12 14 0 1 3 5
6 8 10 12 14 0 1 3 5 7 9 11 13 15 16 2 4
5 7 9 11 13 15 16 2 4 6 8 10 12 14 0 1 3
4 6 8 10 12 14 0 1 3 5 7 9 11 13 15 16 2
3 5 7 9 11 13 15 16 2 4 6 8 10 12 14 0 1
2 4 6 8 10 12 14 0 1 3 5 7 9 11 13 15 16
1 3 5 7 9 11 13 15 16 2 4 6 8 10 12 14 0
M = A + 17 * B + 1
289 35 84 117 150 183 216 249 10 26 59 92 125 158 191 224 257
3 19 68 86 135 168 201 234 267 283 44 77 110 143 176 209 242
260 276 37 70 119 137 186 219 252 13 29 62 95 128 161 194 227
245 6 22 55 88 121 170 188 237 270 286 47 80 113 146 179 212
230 263 279 40 73 106 139 172 221 239 16 32 65 98 131 164 197
215 248 9 25 58 91 124 157 190 223 272 273 50 83 116 149 182
200 233 266 282 43 76 109 142 175 208 241 2 34 52 101 134 167
185 218 251 12 28 61 94 127 160 193 226 259 275 36 85 103 152
154 203 236 269 285 46 79 112 145 178 211 244 5 21 54 87 136
138 187 205 254 15 31 64 97 130 163 196 229 262 278 39 72 105
123 156 189 238 256 288 49 82 115 148 181 214 247 8 24 57 90
108 141 174 207 240 17 18 67 100 133 166 199 232 265 281 42 75
93 126 159 192 225 258 274 51 69 118 151 184 217 250 11 27 60
78 111 144 177 210 243 4 20 53 102 120 169 202 235 268 284 45
63 96 129 162 195 228 261 277 38 71 104 153 171 220 253 14 30
48 81 114 147 180 213 246 7 23 56 89 122 155 204 222 271 287
33 66 99 132 165 198 231 264 280 41 74 107 140 173 206 255 1

The Latin Square B is the transposed square of A (rows and columns exchanged).

The Latin Diagonal Squares A can be determined based on the defining equations of the top and bottom row, as provided below for Latin Diagonal Squares type R2:

a(288) = 2 * s1 / 17 - a(289)
a(280) = 3 * s1 / 17 - a(288) - a(289)
a(279) = 2 * s1 / 17 - a(281)
a(278) = 2 * s1 / 17 - a(282)
a(277) = 2 * s1 / 17 - a(283)
a(276) = 2 * s1 / 17 - a(284)
a(275) = 2 * s1 / 17 - a(285)
a(274) = 2 * s1 / 17 - a(286)
a(273) = 2 * s1 / 17 - a(287)

a(10) = 3 * s1 / 17 - a(288) - a(289)
a( 9) = 2 * s1 / 17 - a(281)
a( 8) = 2 * s1 / 17 - a(282)
a( 7) = 2 * s1 / 17 - a(283)
a( 6) = 2 * s1 / 17 - a(284)
a( 5) = 2 * s1 / 17 - a(285)
a( 4) = 2 * s1 / 17 - a(286)
a( 3) = 2 * s1 / 17 - a(287)

a(17) = a(287)
a(16) = a(286)
a(15) = a(285)
a(14) = a(284)
a(13) = a(283)
a(12) = a(282)
a(11) = a(281)
a( 2) = a(289)
a( 1) = a(288)

The solutions can be obtained by guessing the 8 parameters:

      a(i) for i = 281, 282, 283, 284, 285, 286, 287 and 289

filling out these guesses in the abovementioned equations, and completing the square by copying the first row into the following rows, while shifting 2 columns to the right.

With an appropriate guessing routine (UltraLat17) 16 * 14 * 46080 = 10321920 Ultra Magic Squares can be constructed based on Diagonal Latin Squares type R2.

Comparable results can be obtained for the other types of Diagonal Latin Squares defined above.

17.2.3 Composed Magic Squares

Overlapping Sub Squares

Order 17 Magic Squares, containing order 9 Overlapping Sub Squares with identical Magic Sum, based on Latin Diagonal Sub Squares, have been discussed in Section 25.7 and Section 25.8.

17.2.4 Concentric Magic Squares

A numerical example of the construction of an order 17 Concentric Magic Square M based on pairs of Orthogonal Concentric Semi-Latin Squares (A, B), for the untegers {ai, i = 0 ... 16} and {bj, j = 0 ... 16} is shown below:

A
8 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 0
0 8 2 3 4 5 6 7 9 10 11 12 13 14 15 1 16
0 1 8 3 4 5 6 7 9 10 11 12 13 14 2 15 16
0 15 2 8 4 5 6 7 9 10 11 12 13 3 14 1 16
0 15 2 3 12 5 6 4 7 9 10 11 8 13 14 1 16
16 15 14 13 4 11 5 6 7 9 10 8 12 3 2 1 0
16 1 14 13 4 11 10 6 7 9 8 5 12 3 2 15 0
16 15 2 3 12 5 6 9 7 8 10 11 4 13 14 1 0
16 15 2 3 12 5 10 7 8 9 6 11 4 13 14 1 0
16 1 2 3 12 11 6 8 9 7 10 5 4 13 14 15 0
16 1 14 3 4 5 8 10 9 7 6 11 12 13 2 15 0
0 1 14 13 4 8 11 10 9 7 6 5 12 3 2 15 16
0 1 2 13 8 11 10 12 9 7 6 5 4 3 14 15 16
0 1 14 13 12 11 10 9 7 6 5 4 3 8 2 15 16
0 15 14 13 12 11 10 9 7 6 5 4 3 2 8 1 16
16 15 14 13 12 11 10 9 7 6 5 4 3 2 1 8 0
16 15 14 13 12 11 10 9 7 6 5 4 3 2 1 0 8
B
0 0 0 0 16 16 16 16 16 16 16 16 0 0 0 0 8
1 1 1 1 15 15 15 1 1 15 15 15 1 1 15 8 15
2 2 2 2 2 14 14 14 14 14 14 2 2 2 8 14 14
3 7 3 3 3 3 13 13 13 13 3 3 13 8 13 9 13
4 3 9 13 8 12 12 4 4 4 12 12 4 3 7 13 12
5 9 4 12 11 8 11 5 11 11 5 5 5 4 12 7 11
6 4 10 11 10 10 8 6 10 10 6 6 6 5 6 12 10
7 6 5 10 9 9 7 8 7 9 9 7 7 6 11 10 9
9 10 7 9 7 7 6 9 8 7 10 9 9 7 9 6 7
10 5 11 7 4 6 9 7 9 8 7 10 12 9 5 11 6
11 11 6 6 6 5 10 10 6 6 8 11 10 10 10 5 5
12 14 12 5 5 11 5 11 5 5 11 8 11 11 4 2 4
13 12 13 4 12 4 4 12 12 12 4 4 8 12 3 4 3
14 15 14 8 13 13 3 3 3 3 13 13 3 13 2 1 2
15 13 8 14 14 2 2 2 2 2 2 14 14 14 14 3 1
16 8 15 15 1 1 1 15 15 1 1 1 15 15 1 15 0
8 16 16 16 0 0 0 0 0 0 0 0 16 16 16 16 16
M = A + 17 * B + 1
9 2 3 4 277 278 279 280 282 283 284 285 14 15 16 17 137
18 26 20 21 260 261 262 25 27 266 267 268 31 32 271 138 272
35 36 43 38 39 244 245 246 248 249 250 47 48 49 139 254 255
52 135 54 60 56 57 228 229 231 232 63 64 235 140 236 155 238
69 67 156 225 149 210 211 73 76 78 215 216 77 65 134 223 221
102 169 83 218 192 148 193 92 195 197 96 94 98 72 207 121 188
119 70 185 201 175 182 147 109 178 180 111 108 115 89 105 220 171
136 118 88 174 166 159 126 146 127 162 164 131 124 116 202 172 154
170 186 122 157 132 125 113 161 145 129 177 165 158 133 168 104 120
187 87 190 123 81 114 160 128 163 144 130 176 209 167 100 203 103
204 189 117 106 107 91 179 181 112 110 143 199 183 184 173 101 86
205 240 219 99 90 196 97 198 95 93 194 142 200 191 71 50 85
222 206 224 82 213 80 79 217 214 212 75 74 141 208 66 84 68
239 257 253 150 234 233 62 61 59 58 227 226 55 230 37 33 51
256 237 151 252 251 46 45 44 42 41 40 243 242 241 247 53 34
289 152 270 269 30 29 28 265 263 24 23 22 259 258 19 264 1
153 288 287 286 13 12 11 10 8 7 6 5 276 275 274 273 281

A pair of order 17 Orthogonal Semi-Latin Borders can be constructed for each pair of order 15 Orthogonal Concentric Semi-Latin Squares (A15, B15).

Each pair of order 17 Orthogonal Semi-Latin Borders corresponds with numerous pairs, which can be obtained by permutation of the border pairs.

17.3   Summary

The obtained results regarding the order 17 (Semi) Latin - and related Magic Squares, as deducted and discussed in previous sections, are summarized in following table:

Attachment

Subject

Subroutine

-

-

-

Attachment 17.2.1

Latin Diagonal Squares

-

Attachment 17.2.2

Pan Magic Squares

CnstrSqrs17a

-

-

-

Comparable methods as described above, can be used to construct higher order (Semi) Latin - and related (Pan) Magic Squares.


Vorige Pagina Volgende Pagina Index About the Author