1. ## An amazing discovery

MS = Magic Squares(s)

(As a warning, a computer won't help you out with this challenge)

I'll give you two months to figure out a normal 8 x 8 MS where each and every row and column, when dot multiplied by 1,2,3,4,5,6,7,8, will result in 1170.

(if no one can meet this challenge in one month, I'll give you a hint - btw I've independently arrived at this discovery).

There's only one 3 x 3 distinct MS.

There are 880 4 x 4 distinct MS.

With 5 x 5 MS, there are 275,305,224 of them. At a rate of one MS per second, it would take a computer over 8 years to generate all of the 5 x 5 MS.

Above 5 x 5 MS, nobody knows exactly how many MS exist. I think it's fair to say however, based on the explosive pattern with the 3 x 3 to the 5 x 5 MS, that even the most powerful computer in existence won't be able to generate all of the 8 x 8 MS in a lifetime, hence my warning.

3. Originally Posted by wonderboy1953

There's only one 3 x 3 distinct MS.

There are 880 4 x 4 distinct MS.

With 5 x 5 MS, there are 275,305,224 of them. At a rate of one MS per second, it would take a computer over 8 years to generate all of the 5 x 5 MS.

Above 5 x 5 MS, nobody knows exactly how many MS exist. I think it's fair to say however, based on the explosive pattern with the 3 x 3 to the 5 x 5 MS, that even the most powerful computer in existence won't be able to generate all of the 8 x 8 MS in a lifetime, hence my warning.
You don't always have to resort to brute force and test all possible combinations to find a magic square ... there exist many algorithms to do this in reasonable time, and I believe it should be relatively easy for a well-implemented algorithm to find one working 8x8 magic square.

However, before I try, can you explain further what you mean by dot multiplication ? I don't understand this part. Thanks.

4. ## I'm surprised Bacterius

This concept is taught in basic linear algebra so I thought nearly everyone would know.

An example of ordinary multiplication is (a + b)(c + d) = ac + ad + bc + bd

An example of dot multiplication is $\displaystyle (a + b)$ $\displaystyle \cdot(c + d)$ = ac + bd

An example of ordinary multiplication is (a + b + c)(d + e + f) = ad + ae +af + bd +be + bf + cd + ce +cf

An example of dot multiplication is $\displaystyle (a + b + c)$ $\displaystyle \cdot (d + e + f) = ad + be + cf$

The pattern should be evident and Wolfram's website would supply a formal definition.

Have fun.

5. This concept is taught in basic linear algebra so I thought nearly everyone would know.
Excuse me, I am not that advanced, but I still don't get it. Can you give a short example of a 3x3 magic square that has each row and column "dot multiplied" by 1, 2, 3 ? Thank you.

6. I think the reference is to a dot product.

7. Originally Posted by wonderboy1953
This concept is taught in basic linear algebra so I thought nearly everyone would know.

An example of ordinary multiplication is (a + b)(c + d) = ac + ad + bc + bd

An example of dot multiplication is $\displaystyle (a + b)$ $\displaystyle \cdot(c + d)$ = ac + bd

An example of ordinary multiplication is (a + b + c)(d + e + f) = ad + ae +af + bd +be + bf + cd + ce +cf

An example of dot multiplication is $\displaystyle (a + b + c)$ $\displaystyle \cdot (d + e + f) = ad + be + cf$

The pattern should be evident and Wolfram's website would supply a formal definition.

Have fun.
Don't be condescending. Whether or not that was your intention, you sounded brusque and dismissive!

8. Originally Posted by wonderboy1953
I'll give you two months to figure out a normal 8 x 8 MS where each and every row and column, when dot multiplied by 1,2,3,4,5,6,7,8, will result in 1170.
So, the 1st row and 1st column could both be 1170,0,0,0,0,0,0,0
the 5th row and 5th column could both be 0,0,0,0,234,0,0,0
(and a few other similars)
Yes?

Or, if 0's not allowed:
1st row and 1st column could be 967,2,3,4,5,6,7,8
Right?

9. Originally Posted by Wilmer
So, the 1st row and 1st column could both be 1170,0,0,0,0,0,0,0
the 5th row and 5th column could both be 0,0,0,0,234,0,0,0
(and a few other similars)
Yes?

Or, if 0's not allowed:
1st row and 1st column could be 967,2,3,4,5,6,7,8
Right?
An $\displaystyle N \times N$ magic square is an arrangement of the numbers $\displaystyle 1$ to $\displaystyle N^2$ into a $\displaystyle N\times N$ grid such that the sum of each column, row and the two main diagonals all have the same sum equal to:

$\displaystyle S_{N\times N}=\frac{N(N^2+1)}{2}$

As an example I give the MS from Durer's engraving Melencolia I:

$\displaystyle \begin{array}{|c|c|c|c|}\hline16&3&2&13\\ \hline5&10&11&8\\ \hline9&6&7&12\\ \hline 4&15&14&1\\ \hline \end{array}$

CB

10. So you think that's what WonderBoy means, CB?

So an 8by8 magic square containing integers from 1 to 64,
rows, columns AND DIAGONALS summing to 260,
the dot products of 1170 applicable to rows and columnn but
NOT necessarily to the diagonals.

So we can possibly have a column (or row) with these:
10,20,30,40,50,60,5,45 : sum = 260
the dot products being:
10,40,90,160,250,360,35,360 : sum = 1305 (but should be 1170)

S'that correct, WonderBoy?

11. ## Replying to Wilmer and Bacterius

That's why I specified a "normal" MS (which always starts from one and goes to the square of the order of the MS so, e.g., for a 6th order MS, it runs from 1 to 36) to stay away from trivialities like MS that's just has 0 members.

I know beforehand for an 8 x 8 normal MS, the only result from dot multiplying by 1 to 8 (which you like to call dot product - I like to focus on the process) which is the same for all rows and columns is 1170 (a little surprise for you out there, there are at least two 8 x 8 normal MS that meets this criteria).

Bacterius, yes, here's the dot multiplication for a 3 x 3 normal MS:

1 x 8 + 2 x 1 + 3 x 6 = 28
1 x 3 + 2 x 5 + 3 x 7 = 34
1 x 4 + 2 x 9 + 3 x 2 = 28

1 x 8 + 2 x 3 + 3 x 4 = 26
1 x 1 + 2 x 5 + 3 x 9 = 38
1 x 6 + 2 x 7 + 3 x 2 = 26

(but you knew this already so I'm just confirming).

12. ## 4by4 example

SO, if the puzzle was:
I'll give you two hours(!) to figure out a normal 4 x 4 MS where each and every row and column, when dot multiplied by 1,2,3,4, will result in 85.

This would be a solution:
06 12 09 07 : 1*6 + 2*12 + 3*9 + 4*7 = 85 (similarly for others)
15 01 04 14
03 13 16 02
10 08 05 11

Common sum being 34, INCLUDING the diagonals.

13. ## very good

I figured that one out back in July (but didn't post it as it was too easy).

Now that you have that one Wilmer, can you go ahead to figure out what the 8 x 8 MS look like (at least two of them that are semimagic - meaning that the rows and columns will produce 1170 with dot multiplication from 1 to 8; it's an open question if there's a full MS which includes the diagonals to produce 1170 too).

BTW: If a MS has two magic sums - the regular one from summing up the rows, columns and diagonals and another one from from at least having contribution from rows and columns - i.e. semimagic - then I refer to such a MS as being doubly magic.

14. ## Commentary

If you check this out further, you will find that dot multiplying by 1 to 4 and 4 to 1 yields the same 85 results for the rows and columns on the 4 x 4 (the only one in the 880 distinct MS, there's a separate one for the diagonals with no coinciding with the rows and columns that I've manually confirmed).

Also dot multiplying the 8 x 8 MS by 1 to 8 and 8 to 1 will yield 1170 for the rows and columns (I'm expecting Wilmer or someone else to come up with those MS today).

What Wilmer did was to simplify a problem by reducing it from the 8 x 8 MS to a 4 X 4 MS and hopefully someone will use that information to produce the 8 x 8 MS that will dot multiply to yield 1170 on the rows and columns (otherwise I'll do that for this thread later). Wilmer didn't use an algorithm to come up with the 4 x 4, rather a math procedure of simplification which has brought us closer to a solution.

For more I'm posting into the puzzle section.

15. ## I've changed my mind

"You don't always have to resort to brute force and test all possible combinations to find a magic square." You're right Bacterius, but it appears that's all the computer lovers want to do is resort to brute force to find the answer which will never succeed.

For that and the fact there are some true math lovers who have the brain skills to figure out my puzzle, I've decided to ensure my credit by posting the answers to my puzzle today.

46 20 17 47 42 24 21 43
27 37 40 26 31 33 36 30
03 61 64 02 07 57 60 06
54 12 09 55 50 16 13 51
14 52 49 15 10 56 53 11
59 05 08 58 63 01 04 62
35 29 32 34 39 25 28 38
22 44 41 23 18 48 45 19

55 09 12 54 51 13 16 50
02 64 61 03 06 60 57 07
26 40 37 27 30 36 33 31
47 17 20 46 43 21 24 42
23 41 44 22 19 45 48 18
34 32 29 35 38 28 25 39
58 08 05 59 62 04 01 63
15 49 52 14 11 53 56 10

The smaller 4 x 4 MS is easily derived by reversing the diagonals in

01 02 03 04
05 06 07 08
09 10 11 12
13 14 15 16

to get

16 02 03 13
05 11 10 08
09 07 06 12
04 14 15 01

Later after first switching out row with row and column with column and then learning I can get the same MS by rotating quadrants (by 180 degrees) led me to

11 05 08 10
02 16 13 03
14 04 01 15
07 09 12 06

which is doubly magic: the regular magic sum of 34 and the second magic number of 85 after dot multiplying, forwards and backwards, by 1 to 4 on the rows and columns.

The 8 x 8 MS above were obtained by similar rotation. The difference is I found out by that after doing a 180 degree quadrant rotation, then doing a second rotation on the second MS (on 4 numbers at a time starting at any corner) would produce an 8 x 8 MS that's doubly magic (the two magic numbers of 260 and 1170); the top MS was done with one 180 degree rotation on four numbers at a time starting at a corner.

It's interesting to note that these aren't the only type of MS that are doubly magic. E.g. Walter Horner, a retried math teacher, has produced the following type of square:

046 081 117 102 015 076 200 203
019 060 232 175 054 069 153 078
216 161 017 052 171 090 058 075
135 114 050 087 184 189 013 068
150 261 045 038 091 136 092 027
119 104 108 023 174 225 057 030
116 025 133 120 051 026 162 207
039 034 138 243 100 029 105 152

The first magic number is 840; the second magic number is the product of
2,058,068,231,856,000, both magic numbers valid for all rows, columns and
diagonals.

One final note to this post. It would be interesting to find a MS where the diagonals also participate in the second magic number.

Page 1 of 2 12 Last