mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   - -| (https://www.mersenneforum.org/showthread.php?t=11344)

mwxdbcr 2009-01-15 09:54

- -|
 
.......1
.....4....2
...7...5...3
.....8....6
.......9

.......1
.....4....2
[COLOR=red][COLOR=black]...[/COLOR][B]3[/B][/COLOR][COLOR=black]...5...[/COLOR][B][COLOR=red]7[/B][/COLOR]
.....8....6
.......9

[COLOR=red][COLOR=black]........[/COLOR][B]9[/B][/COLOR]
.....4....2
[COLOR=red][COLOR=black]...[/COLOR][B]3[/B][/COLOR][COLOR=black]...5...[/COLOR][COLOR=red][B]7[/B][/COLOR]
.....8....6
[COLOR=red][COLOR=black]........[/COLOR][B]1[/B][/COLOR]


[COLOR=red][B] 4[/B][/COLOR] [B][COLOR=red]9 2[/COLOR][/B]
[COLOR=red][B] 3[/B][/COLOR] 5 [COLOR=red][B]7[/B][/COLOR]
[COLOR=red][B] 8[/B][/COLOR] [B][COLOR=red]1 6[/COLOR][/B]


[COLOR=#ff0000][COLOR=red][B] 4[/B][/COLOR][B] [COLOR=red]9 2[/COLOR][/B][/COLOR]
[COLOR=#ff0000][COLOR=red][B] 3[/B][/COLOR][B] 5 [COLOR=red]7[/COLOR][/B]
[COLOR=red][B] 8[/B][/COLOR][B] [COLOR=red]1 6[/COLOR][/B]
[/COLOR]

axn 2009-01-15 10:12

use [ code ] [ / code ] tags for fixed width text.
[code]
1
2 3
4 5
6 7
8
[/code]

lavalamp 2009-01-15 14:09

OK, now what's the actual puzzle?

Orgasmic Troll 2009-01-15 15:13

I'm sorry, I can't understand what's going on unless you start posting schizophrenic musings in broken Italian, mwxdbcr-ux

petrw1 2009-01-15 17:57

I see a quick algorithm to generate a 3X3 magic square.

10metreh 2009-01-15 18:08

[quote=petrw1;158838]I see a quick algorithm to generate a 3X3 magic square.[/quote]

So it's strictly not a puzzle. Could a mod delete this thread or move it to Misc. Math?

Mr. P-1 2009-01-16 13:26

[QUOTE=petrw1;158838]I see a quick algorithm to generate a 3X3 magic square.[/QUOTE]

It's well-known. I also recall one for generating an N*N magic square for odd N. Starting with 1, write successive integers in a in row running diagonally downward from the centre cell of the top row, wrapping from side to side and bottom to top as necessary. When you reach a cell you've already filled it, continue from the cell immediately below it.

10metreh 2009-01-16 17:57

[quote=Mr. P-1;158945]Starting with 1, write successive integers in a in row running diagonally downward from the centre cell of the top row, wrapping from side to side and bottom to top as necessary.[/quote]

Don't you mean diagonally upward? Downward doesn't work.

I also know methods for 4n and 4n+2.

Mr. P-1 2009-01-19 17:35

[QUOTE=10metreh;158992]Don't you mean diagonally upward? Downward doesn't work.[/QUOTE]

It's been a long time.

fivemack 2009-01-19 17:40

I remember seeing the odd-magic-square recipe in a children's book long, long ago, and not being able to get it to work.

Well, I am older and more foolish now, and I still can't get it to work: I get

[code]
19 25 1 7 13
24 5 6 12 18
4 10 11 17 23
9 15 16 22 3
14 20 21 2 8
[/code]

which has rows summing to 65, diagonals summing to 65, but columns are wrong

mart_r 2009-01-19 18:56

I've learned it this way (odd n):
Start at the cell just above the center cell, move to top-left and, after each set, two cells upwards. For 5x5 this gives

15 02 19 06 23
22 14 01 18 10
09 21 13 05 17
16 08 25 12 04
03 20 07 24 11

Always works. Of course there are various ways.
Use google for finding out about the even ones. They're a bit more complicated.

In 1997, long before I knew about the internet (okay, not too long before that), I worked hard to find a magic 6x6 square. After about 100 trials and 99 errors, I found
01 35 34 33 02 06
25 08 28 09 11 30
24 23 15 16 20 13
18 14 21 22 17 19
12 26 10 27 29 07
31 05 03 04 32 36

petrw1 2009-01-19 21:19

[QUOTE=fivemack;159395]I remember seeing the odd-magic-square recipe in a children's book long, long ago, and not being able to get it to work.

Well, I am older and more foolish now, and I still can't get it to work: I get

[code]
19 25 1 7 13
24 5 6 12 18
4 10 11 17 23
9 15 16 22 3
14 20 21 2 8
[/code]

which has rows summing to 65, diagonals summing to 65, but columns are wrong[/QUOTE]

When your '5' ran into '1' you need to drop below the '5' NOT below the '1'.

The process for any ODD magic square of any size is simply.
1. Start at top center.
2. Every move is diagonal up-right.
3. If you:
a. Hit a filled square drop below the current number (Your 6 should have been below your 5)
b. Exit at the right (excluding Top-right corner) go to the far left in the next row up (i.e. Your 3 - 4)
c. Exit Top (excluding Top-Right Corner), go to the bottom row, next column over (i.e Your 7-8)
d. Exit Top-Right corner. Drop below as in a. (14 should have been right below 13)

10metreh 2009-01-20 12:50

[quote=petrw1;159423]2. Every move is diagonal up-right.[/quote]

Or diagonally up-left - it is symmetrical so doesn't matter.


All times are UTC. The time now is 19:18.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.