[math-fun] 6x6 pandiag. multiplic. squares ARE NOT impossible!
In his http://www.maa.org/editorial/mathgames/mathgames_11_07_05.html column, our friend Ed Pegg Jr. wrote: "The latin squares method, used for 4×4 and 5×5 squares, does not work for the 6×6 square due to the famous "36-officers problem" of Euler. Because of this, a 6×6 pandiagonal multiplicative magic square may be impossible. Can anyone prove that, or find an example?" Here is an example! 7776 3 3888 96 243 48 2 46656 4 1458 64 2916 2592 9 1296 288 81 144 486 192 972 6 15552 12 32 729 16 23328 1 11664 162 576 324 18 5184 36 All the rows, columns, diagonals AND broken diagonals give the same product: 101,559,956,668,416 And best, it is a "most-perfect" pandiagonal magic square, à la Kathleen Ollerenshaw. All 2x2 sub-squares have always the same product: 2,176,782,336 My feeling was the same than Ed, I thought that such a square was impossible... I wrote the same "Impossible?" than Ed in my recapitulative table at www.multimagie.com/English/Multiplicative.htm A new update will be necessary! And I have also first examples of pandiagonal multiplicative squares of orders 8, 9, 12, 15, 16. Best regards. Christian.
Christian Boyer wrote:
Here is an example!
7776 3 3888 96 243 48 2 46656 4 1458 64 2916 2592 9 1296 288 81 144 486 192 972 6 15552 12 32 729 16 23328 1 11664 162 576 324 18 5184 36
All the rows, columns, diagonals AND broken diagonals give the same product:[...] And best, it is a "most-perfect" pandiagonal magic square, à la Kathleen Ollerenshaw. All 2x2 sub-squares have always the same product:[...]
This is a very pretty construction! I think in the same way you can generate pandiagonal multiplictive magic squares of any size not a prime power (and various sub-square sizes of most-perfect-ness). Here's my interpretation of your example: --------- a) Take the 2x3 matrix [ 5 0 4 ] [ 1 6 2 ] This has relatively prime side lengths, distinct positive integer entries, a constant row sum, and a (different, of course!) constant column sum. Call this building-block matrix B. b) Form a 6x6 matrix by tiling with 6 copies of B. Now you have a square with constant row and col sum (equal to 18, the sum of the entries in B) and the same constant sum along all broken diagonals, because each diagonal traces a (2,3)-torus knot on B. Also, any 2x2 subsquare is exactly 2 columns of B, so will sum to 2/3 the other sums. Call this tiled matrix T. c) Make a multiplicative magic square M = 2^T 3^transpose(T). (This is pointwise exponentiation and multiplication.) --------- It is vital that the sides of the building block B are relatively prime (this ensures the pandiagonality and the fact that M's entries are all distinct). Oh, and the most-magic-ness is that all squares of side length the smaller side of B will have the same product. So to make a 10x10 square with all those desirable properties, you could start with the 2x5 rectangle [ 0 11 2 9 8 ] [ 12 1 10 3 4 ] and perform the same construction, to get 1, 725594112, 9, 80621568, 6561, 4096, 177147, 36864, 19683, 26873856 1088391168, 6, 120932352, 54, 165888, 1062882, 6144, 118098, 55296, 162 4, 181398528, 36, 20155392, 26244, 1024, 708588, 9216, 78732, 6718464 272097792, 24, 30233088, 216, 41472, 4251528, 1536, 472392, 13824, 648 256, 2834352, 2304, 314928, 1679616, 16, 45349632, 144, 5038848, 104976 531441, 12288, 59049, 110592, 81, 2176782336, 3, 241864704, 27, 331776 2048, 354294, 18432, 39366, 13436928, 2, 362797056, 18, 40310784, 13122 2125764, 3072, 236196, 27648, 324, 544195584, 12, 60466176, 108, 82944 512, 1417176, 4608, 157464, 3359232, 8, 90699264, 72, 10077696, 52488 136048896, 48, 15116544, 432, 20736, 8503056, 768, 944784, 6912, 1296 Every row/col/diag multiplies to 2^60 3^60 = 48873677980689257489322752273774603865660850176 and every 2x2 square multiplies to 2^24 3^24 = 4738381338321616896. For a 20x20 example you'd need a 4x5 B and every 4x4 block in the final square would have the same product. For an example of size pqr, like 30, you could start with a B of sizes 2x15, 3x10, or 5x6, and you'd get different most-magic subsquare sizes for each. --Michael Kleber -- It is very dark and after 2000. If you continue you are likely to be eaten by a bleen.
Excellent analysis, Michael! And you will be credited of this nice 10x10 pandiag. multiplic. square in my future website update. Our 6x6 and 10x10 examples have a magic product 2^a * 3^b. I mentioned in my previous email some other squares. Here is for example my 8x8 square having a magic product 2^a * 3^b * 5^c * 7^d, allowing the use of smaller integers than a 8x8 square using only 2^a * 3^b integers: 1 3780 4 945 24 630 6 2520 216 70 54 280 9 420 36 105 5 756 20 189 120 126 30 504 1080 14 270 56 45 84 180 21 315 12 1260 3 7560 2 1890 8 840 18 210 72 35 108 140 27 63 60 252 15 1512 10 378 40 168 90 42 360 7 540 28 135 And it is also a most-perfect pandiagonal square, with same product for all 2x2 sub-squares. Unfortunately it seems difficult to construct 6x6 and 10x10 squares with smaller integers allowed by this other technique used for 8x8. Am I right? But it is possible for 9x9: my example (with 3x3 sub-squares) is a 2^a * 3^b * 5^c * 7^d construction. Christian. -----Message d'origine----- De : math-fun-bounces+cboyer=club-internet.fr@mailman.xmission.com [mailto:math-fun-bounces+cboyer=club-internet.fr@mailman.xmission.com] De la part de Michael Kleber Envoyé : vendredi 21 avril 2006 20:58 À : math-fun Objet : Re: [math-fun] 6x6 pandiag. multiplic. squares ARE NOT impossible! Christian Boyer wrote:
Here is an example!
7776 3 3888 96 243 48 2 46656 4 1458 64 2916 2592 9 1296 288 81 144 486 192 972 6 15552 12 32 729 16 23328 1 11664 162 576 324 18 5184 36
All the rows, columns, diagonals AND broken diagonals give the same product:[...] And best, it is a "most-perfect" pandiagonal magic square, à la Kathleen Ollerenshaw. All 2x2 sub-squares have always the same product:[...]
This is a very pretty construction! I think in the same way you can generate pandiagonal multiplictive magic squares of any size not a prime power (and various sub-square sizes of most-perfect-ness). Here's my interpretation of your example: --------- a) Take the 2x3 matrix [ 5 0 4 ] [ 1 6 2 ] This has relatively prime side lengths, distinct positive integer entries, a constant row sum, and a (different, of course!) constant column sum. Call this building-block matrix B. b) Form a 6x6 matrix by tiling with 6 copies of B. Now you have a square with constant row and col sum (equal to 18, the sum of the entries in B) and the same constant sum along all broken diagonals, because each diagonal traces a (2,3)-torus knot on B. Also, any 2x2 subsquare is exactly 2 columns of B, so will sum to 2/3 the other sums. Call this tiled matrix T. c) Make a multiplicative magic square M = 2^T 3^transpose(T). (This is pointwise exponentiation and multiplication.) --------- It is vital that the sides of the building block B are relatively prime (this ensures the pandiagonality and the fact that M's entries are all distinct). Oh, and the most-magic-ness is that all squares of side length the smaller side of B will have the same product. So to make a 10x10 square with all those desirable properties, you could start with the 2x5 rectangle [ 0 11 2 9 8 ] [ 12 1 10 3 4 ] and perform the same construction, to get 1, 725594112, 9, 80621568, 6561, 4096, 177147, 36864, 19683, 26873856 1088391168, 6, 120932352, 54, 165888, 1062882, 6144, 118098, 55296, 162 4, 181398528, 36, 20155392, 26244, 1024, 708588, 9216, 78732, 6718464 272097792, 24, 30233088, 216, 41472, 4251528, 1536, 472392, 13824, 648 256, 2834352, 2304, 314928, 1679616, 16, 45349632, 144, 5038848, 104976 531441, 12288, 59049, 110592, 81, 2176782336, 3, 241864704, 27, 331776 2048, 354294, 18432, 39366, 13436928, 2, 362797056, 18, 40310784, 13122 2125764, 3072, 236196, 27648, 324, 544195584, 12, 60466176, 108, 82944 512, 1417176, 4608, 157464, 3359232, 8, 90699264, 72, 10077696, 52488 136048896, 48, 15116544, 432, 20736, 8503056, 768, 944784, 6912, 1296 Every row/col/diag multiplies to 2^60 3^60 = 48873677980689257489322752273774603865660850176 and every 2x2 square multiplies to 2^24 3^24 = 4738381338321616896. For a 20x20 example you'd need a 4x5 B and every 4x4 block in the final square would have the same product. For an example of size pqr, like 30, you could start with a B of sizes 2x15, 3x10, or 5x6, and you'd get different most-magic subsquare sizes for each. --Michael Kleber -- It is very dark and after 2000. If you continue you are likely to be eaten by a bleen. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Christian Boyer wrote:
Excellent analysis, Michael! And you will be credited of this nice 10x10 pandiag. multiplic. square in my future website update.
Glad you like it. Was the construction related to how you found the 6x6 that you mailed out earlier, or did you come across it through some more general search? Since the construction is so straightforward, here is a packaged-up version of it for Mathematica. (I don't speak mma fluently; experts, feel free to improve on my code.) Copy[n_][x_List] := Join @@ Table[x,{n}] B[B0_] := B0 - Min[B0] T[B_] := Copy[ Length[B[[1]]] ][ Map[ Copy[Length[B]], B ] ] M[T_] := Table[2^T[[i,j]] 3^T[[j,i]], {i,Length[T]}, {j,Length[T]}] The operation B0 -> B is in there because it seems nicer to express the building block as a matrix B0 with distinct integer entries, possibly negative, and constant row and col sums (which might be the same, if you're lucky enough that they are both zero). These B0s are more symmetric-looking and their construction more transparent, I think. For example, you mentioned a 12x12 in your earlier email, which I'll guess is most-perfect in the usual 2x2 sense. Here's a 12x12 most-perfect in that all 3x3s have the same product: b0 = {{-6,3,-3,6},{2,1,-2,-1},{4,-4,5,-5}} M[T[B[b0]]] = {{1, 3359232, 472392, 4096, 6561, 30233088, 8, 26873856, 59049, 512, 52488, 241864704}, {5038848, 279936, 144, 629856, 559872, 1152, 314928, 69984, 2304, 2519424, 34992, 288}, {27648, 324, 362797056, 54, 82944, 708588, 55296, 162, 181398528, 108, 165888, 354294}, {531441, 124416, 24, 2176782336, 243, 1536, 4251528, 995328, 3, 272097792, 1944, 12288}, {256, 839808, 944784, 32, 1679616, 7558272, 16, 209952, 15116544, 128, 104976, 1889568}, {20155392, 8748, 18432, 39366, 2239488, 36, 40310784, 4374, 9216, 78732, 4478976, 18}, {27, 41472, 1417176, 110592, 81, 90699264, 216, 331776, 177147, 13824, 648, 725594112}, {136048896, 31104, 48, 17006112, 62208, 384, 8503056, 7776, 768, 68024448, 3888, 96}, {1024, 26244, 120932352, 2, 6718464, 236196, 2048, 13122, 60466176, 4, 13436928, 118098}, {19683, 1119744, 72, 80621568, 2187, 4608, 157464, 8957952, 9, 10077696, 17496, 36864}, {6912, 10368, 2834352, 864, 20736, 22674816, 432, 2592, 45349632, 3456, 1296, 5668704}, {544195584, 972, 6144, 1062882, 248832, 12, 1088391168, 486, 3072, 2125764, 497664, 6}} The magic product is 2^72 3^72, while each 3x3 multiplies to 2^54 3^54. I haven't looked at your 8x8 example; did you find it via some general 2/3/5/7-based construction? From the results last time we talked about multiplicative magic squares, I'm not at all surprised that this generally gives smaller values than a 2/3-based construction alone. --Michael Kleber -- It is very dark and after 2000. If you continue you are likely to be eaten by a bleen.
Christian Boyer wrote:
Here is for example my 8x8 square having a magic product 2^a * 3^b * 5^c * 7^d, allowing the use of smaller integers than a 8x8 square using only 2^a * 3^b integers:
1 3780 4 945 24 630 6 2520 216 70 54 280 9 420 36 105 5 756 20 189 120 126 30 504 1080 14 270 56 45 84 180 21 315 12 1260 3 7560 2 1890 8 840 18 210 72 35 108 140 27 63 60 252 15 1512 10 378 40 168 90 42 360 7 540 28 135
Here's what I can make of this. The end result is that I can improve on this square a little -- decrease both the magic product and the maximum entry -- but only in a sort of shallow way. As usual, look at the matrix through "log_p"-colored glasses for the various p which appear. If you write down the highest powers of 2, 3, 5, 7 in each entry -- that is, take the prime factorization, and spread the exponents of each p out into separate matrices -- here is the result: 02203113 03031212 01010101 01010101 31130220 30302121 01010101 01010101 02203113 03031212 10101010 01010101 31130220 30302121 10101010 01010101 02203113 21213030 10101010 10101010 31130220 12120303 10101010 10101010 02203113 21213030 01010101 10101010 31130220 12120303 01010101 10101010 The powers of 5 and 7 make clear what's going on here: you've overlayed a bunch of pandiagonal magic bit planes with the property that every 2x2 box contains precisely two 1's, and you've managed to arrange things so that you get all distinct entries at the end. The matrices for powers of 2 and 3 are showing exactly the same thing, but those each have two bits worth of information. We should separate them out into the 2-plane and the 4-plane. Likewise the 3s should be separated into 3s and 9s bit-planes. 02203113 00001111 01101001 03031212 01011010 01010101 31130220 11110000 10010110 30302121 10100101 10101010 02203113 00001111 01101001 03031212 01011010 01010101 31130220 11110000 10010110 30302121 10100101 10101010 02203113 00001111 01101001 21213030 01011010 10101010 31130220 11110000 10010110 12120303 10100101 01010101 02203113 00001111 01101001 21213030 01011010 10101010 31130220 11110000 10010110 12120303 10100101 01010101 So all in all, you have six bit planes, all of which exhibit very regular patterns, and your matrix is the result of considering them as the exponents of 2,4, 3,9, 5, 7. This now gives us an easy way to lower the magic product and max entry in your square: your use of 9 as the base for one plane is inefficient, since a smaller prime power, 8, is still available. Taking your matrix and replacing every multiple of 9 with 8/9 of itself, you get 1 3360 4 840 24 560 6 2240 192 70 48 280 8 420 32 105 5 672 20 168 120 112 30 448 960 14 240 56 40 84 160 21 280 12 1120 3 6720 2 1680 8 840 16 210 64 35 96 140 24 56 60 224 15 1344 10 336 40 168 80 42 320 7 480 28 120 with max entry 6720 (= 8/9 of your 7560) and magic product 2039281090560000 (=(8/9)^4 of yours, since each bit plane had four 1's in each row). So there is a natural path for generalizing this construction, where you first need to understand all magic bit planes, and how many of them you need to get all entries distinct (as bit strings), then you pack them into exponents as tightly as possible. In this case you've managed to find 6 bit planes which do the job, and this is clearly best possible, because your matrix has 8^2 = 2^6 = 64 entries. It makes one hope that you can always attain this natural bound -- now that would be a nice construction! (Does your 9x9 matrix similarly break apart into four trit-planes, with exponents 2,3,5,7?) Note that this means your multiplicative magic could also be expressed as a regular magic square, thinking of the same six bit-planes as the binary expansion of numbers 0-63. But this would hide some of the niceness; your magic works if you add the numbers in base two column-by-column, while I suppose a normal 8x8 magic square might fail this test and only be magic after you do the carrying in the base 2 addition. --Michael Kleber -- It is very dark and after 2000. If you continue you are likely to be eaten by a bleen.
This does not work. You have duplicated values: e.g., the 8 in the middle of the 2nd line and the end of the 5th line. In general, you need to use numbers of the form p^(2^n) in this kind of construction. Franklin T. Adams-Watters -----Original Message----- From: Michael Kleber <michael.kleber@gmail.com> This now gives us an easy way to lower the magic product and max entry in your square: your use of 9 as the base for one plane is inefficient, since a smaller prime power, 8, is still available. Taking your matrix and replacing every multiple of 9 with 8/9 of itself, you get 1 3360 4 840 24 560 6 2240 192 70 48 280 8 420 32 105 5 672 20 168 120 112 30 448 960 14 240 56 40 84 160 21 280 12 1120 3 6720 2 1680 8 840 16 210 64 35 96 140 24 56 60 224 15 1344 10 336 40 168 80 42 320 7 480 28 120 ___________________________________________________ Try the New Netscape Mail Today! Virtually Spam-Free | More Storage | Import Your Contact List http://mail.netscape.com
Franklin T. Adams-Watters wrote:
This does not work. You have duplicated values: e.g., the 8 in the middle of the 2nd line and the end of the 5th line.
Oof, that was dumb. Quite right, I'd need to use 16 as the base, which is clearly worse than 9... --Michael Kleber -- It is very dark and after 2000. If you continue you are likely to be eaten by a bleen.
Back after a sunny week-end. Some remarks on the orders 6, 8, 9 and 12: ----------------- 6 As you know, my pandiagonal example has all its 2x2 sub-squares with the same product. I had forgotten to mention that it has also all its 3x3 sub-squares with the same product!! Both 2x2 and 3x3, a very pretty square. ----------------- 8 Your analysis of bit planes is interesting, Michael. Unfortunately, as remarked by Franklin, your square does not use distinct integers. However, you are right, I am not sure that my 8x8 square uses the smallest possible integers and product: it is currently my best possible, but I will be happy if somebody can succeed to use smaller characteristics. About "Franklin", and using the same set of integers than my previous example, here is a new pandiagonal square with a supplemental nice property: all its bent diagonals are magic. Here is the first Benjamin FRANKLIN's multiplicative square: 1 1080 42 1260 3 360 14 3780 378 140 9 120 126 420 27 40 180 6 7560 7 540 2 2520 21 840 63 20 54 280 189 60 18 36 30 1512 35 108 10 504 105 168 315 4 270 56 945 12 90 5 216 210 252 15 72 70 756 1890 28 45 24 630 84 135 8 ----------------- 9 Michael, here is my pandiagonal example that you can analyse with bit planes. Again 2^ * 3^ * 5^ * 7^ integers: 28 350 35 1764 22050 2205 12 150 15 45 36 450 105 84 1050 245 196 2450 7350 735 588 50 5 4 3150 315 252 70 7 700 4410 441 44100 30 3 300 900 90 9 2100 210 21 4900 490 49 147 14700 1470 1 100 10 63 6300 630 175 140 14 11025 8820 882 75 60 6 18 225 180 42 525 420 98 1225 980 2940 294 3675 20 2 25 1260 126 1575 All its 3x3 sub-squares have the same product. As all my examples, I have tried to use the smallest entries and the smallest product. Of course, not sure that they are the smallest possible! Again, I will be happy if somebody can improve it. ----------------- 12 Michael, your example has a magic product 1.06 E+56, with 2^ * 3^ integers. My best square has a better magic product 1.86 E+30, with 2^ * 3^ * 5^ * 7^ * 11^ integers. I send you a direct message with this sample. I do not want to bother all [math-fun] people with too big squares... But if somebody else is interested by this 12x12 sample, send me a direct message. Christian.
participants (3)
-
Christian Boyer -
franktaw@netscape.net -
Michael Kleber