Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
10-07-2005 15:52
So my child was introduced to magic squares in math class and was doing some homework about them and asked me a question that I cannot answer nor find an answer to. Magic squares are N x N arrays where the sum of the numbers in each row, colum, and diagonal each sum to X. Here's a little example: a b c d e f g h i Where a+b+c = x and a+d+g = x and a+e+i = x and so on. There is one definition of magic square that says for an order N square, you can use only the numbers 1..N^2 and must use all of those numbers. I have found "semi-magical" squares where there diagonals don't add to X only for this constrained definition. But I'm stuck on the more general case where a..i can be any natural number. If I had gone to linear algebra class instead of trying to get laid back when, I might have the tools to solve this but I had to resort to proof from the converse, that is: a + b + c =x d + e + f = x g + h + i = x a + d + g = x b + e + h = x c + f + i = x a + e + i + 1 = x and deriving a contradiction, but I can't reduce this below 4 free variables. Any answer or pointers would be appreciated. Note, this is *not* her homework, but I can't uphold my super-dad reputation unless I can get a solution to this general case. Thanks.
|
Martin Magpie
Catherine Cotton
Join date: 13 Nov 2004
Posts: 1,826
|
10-07-2005 16:04
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
10-07-2005 16:04
not sure, if i understand what u are looking for (i skimmed it  ) the formula for "magic squares" though is m(n)=(n(n^2 + 1))/2 Hope that helps
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
10-07-2005 16:05
Simu-post! Wee! 
|
Martin Magpie
Catherine Cotton
Join date: 13 Nov 2004
Posts: 1,826
|
10-07-2005 16:11
LOL weee!
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
10-07-2005 17:26
From: Malachi Petunia If I had gone to linear algebra class instead of trying to get laid back when, I might have the tools to solve this but I had to resort to proof from the converse, that is: a + b + c =x d + e + f = x g + h + i = x a + d + g = x b + e + h = x c + f + i = x a + e + i + 1 = x and deriving a contradiction, but I can't reduce this below 4 free variables. Any answer or pointers would be appreciated. Note, this is *not* her homework, but I can't uphold my super-dad reputation unless I can get a solution to this general case. I *think* what you're trying to do is get a square that has all the rows and columns adding to the same value, and a diagonal adding to one less than that number? (allowing a through i to be any natural numbers) Without thinking too hard, I can see a solution for the diagonal adding to 2 less: 1 2 2 2 1 2 2 2 1 Here all of the rows and columns, and one of the diagonals add to 5, but the other diagonal adds to 3. I'm not sure if this is the kind of thing you're after though.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
Ricky Zamboni
Private citizen
Join date: 4 Jun 2004
Posts: 1,080
|
10-07-2005 22:33
From: Malachi Petunia So my child was introduced to magic squares in math class and was doing some homework about them and asked me a question that I cannot answer nor find an answer to. Magic squares are N x N arrays where the sum of the numbers in each row, colum, and diagonal each sum to X. Here's a little example: a b c d e f g h i Where a+b+c = x and a+d+g = x and a+e+i = x and so on. There is one definition of magic square that says for an order N square, you can use only the numbers 1..N^2 and must use all of those numbers. I have found "semi-magical" squares where there diagonals don't add to X only for this constrained definition. But I'm stuck on the more general case where a..i can be any natural number. If I had gone to linear algebra class instead of trying to get laid back when, I might have the tools to solve this but I had to resort to proof from the converse, that is: a + b + c =x d + e + f = x g + h + i = x a + d + g = x b + e + h = x c + f + i = x a + e + i + 1 = x and deriving a contradiction, but I can't reduce this below 4 free variables. Any answer or pointers would be appreciated. Note, this is *not* her homework, but I can't uphold my super-dad reputation unless I can get a solution to this general case. Thanks. For the 3x3 case, I think you're missing the fact that each diagonal will sum to x, and the sum of all elements will sum to n(n-1)/2. That should give you enough equations to solve for all 9 unknowns (let's see....3 rows, 3 columns, 2 diagonals, and total sum....yup, that's enough). For a general NxN square.....hmmmm...I bet you need to add in row and column permutations to the diagonal sums as additional symmetries. I just thought that up, and it's 1:30 in the morning, so I'll leave it as an exercise to the reader. 
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
10-07-2005 22:55
Thanks for all the replies; there is enough here for me to either obtain the proof I was seeking or at least re-state my question more comprehensibly.
|