Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Magic square
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===A method of constructing a magic square of doubly even order=== [[Doubly even]] means that ''n'' is an even multiple of an even integer; or 4''p'' (e.g. 4, 8, 12), where ''p'' is an integer. '''Generic pattern''' All the numbers are written in order from left to right across each row in turn, starting from the top left hand corner. Numbers are then either retained in the same place or interchanged with their diametrically opposite numbers in a certain regular pattern. In the magic square of order four, the numbers in the four central squares and one square at each corner are retained in the same place and the others are interchanged with their diametrically opposite numbers. '''A construction of a magic square of order 4''' Starting from top left, go left to right through each row of the square, counting each cell from 1 to 16 and filling the cells along the diagonals with its corresponding number. Once the bottom right cell is reached, continue by going right to left, starting from the bottom right of the table through each row, and fill in the non-diagonal cells counting up from 1 to 16 with its corresponding number. As shown below: {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | style="background-color: silver;"|1 || || || style="background-color: silver;"|4 |- | || style="background-color: silver;"|6 || style="background-color: silver;"|7 || |- | || style="background-color: silver;"|10 || style="background-color: silver;"|11 || |- | style="background-color: silver;"|13 || || || style="background-color: silver;"|16 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | style="background-color: silver;"|1 ||15 ||14 || style="background-color: silver;"|4 |- |12 || style="background-color: silver;"|6 || style="background-color: silver;"|7 ||9 |- | 8 || style="background-color: silver;"|10 || style="background-color: silver;"|11 ||5 |- | style="background-color: silver;"|13 || 3 || 2 || style="background-color: silver;"|16 |} {{col-end}} '''An extension of the above example for Orders 8 and 12''' First generate a pattern table, where a '1' indicates selecting from the square where the numbers are written in order 1 to n<sup>2</sup> (left-to-right, top-to-bottom), and a '0' indicates selecting from the square where the numbers are written in reverse order ''n''<sup>2</sup> to 1. For ''M'' = 4, the pattern table is as shown below (third matrix from left). With the unaltered cells (cells with '1') shaded, a criss-cross pattern is obtained. {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | 1 || 2 || 3 || 4 |- | 5 || 6 || 7 || 8 |- | 9 ||10 || 11 || 12 |- | 13 || 14 || 15 || 16 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | 16 ||15 ||14 || 13 |- |12 || 11 || 10 ||9 |- | 8 || 7 || 6 ||5 |- | 4 || 3 || 2 || 1 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 |- | 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 |- | 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 |- | style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:8em;height:8em;table-layout:fixed;" |- |+ ''M'' = Order 4 |- | style="background-color: silver;"|1 ||15 ||14 || style="background-color: silver;"|4 |- |12 || style="background-color: silver;"|6 || style="background-color: silver;"|7 ||9 |- | 8 || style="background-color: silver;"|10 || style="background-color: silver;"|11 ||5 |- | style="background-color: silver;"|13 || 3 || 2 || style="background-color: silver;"|16 |} {{col-end}} The patterns are a) there are equal number of '1's and '0's in each row and column; b) each row and each column are "palindromic"; c) the left- and right-halves are mirror images; and d) the top- and bottom-halves are mirror images (c and d imply b). The pattern table can be denoted using [[hexadecimals]] as (9, 6, 6, 9) for simplicity (1-nibble per row, 4 rows). The simplest method of generating the required pattern for higher ordered doubly even squares is to copy the generic pattern for the fourth-order square in each four-by-four sub-squares. For M = 8, possible choices for the pattern are (99, 66, 66, 99, 99, 66, 66, 99); (3C, 3C, C3, C3, C3, C3, 3C, 3C); (A5, 5A, A5, 5A, 5A, A5, 5A, A5) (2-nibbles per row, 8 rows). {{col-begin|width=auto;margin:0.5em auto}} {{col-break|valign=bottom}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:16em;height:16em;table-layout:fixed;" |- |+ ''M'' = Order 8 |- | style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 |- | 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 |- | 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 |- | style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 |- | style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 |- | 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 |- | 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 |- | style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 || style="background-color: silver;"|1 || 0 || 0 || style="background-color: silver;"|1 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:16em;height:16em;table-layout:fixed;" |- |+ ''M'' = Order 8 |- | style="background-color: silver;"|1 || || || style="background-color: silver;"|4 || style="background-color: silver;"|5 || || || style="background-color: silver;"|8 |- | || style="background-color: silver;"|10 || style="background-color: silver;"|11 || || || style="background-color: silver;"|14 || style="background-color: silver;"|15 || |- | || style="background-color: silver;"|18 || style="background-color: silver;"|19 || || || style="background-color: silver;"|22 || style="background-color: silver;"|23 || |- | style="background-color: silver;"|25 || || || style="background-color: silver;"|28 || style="background-color: silver;"|29 || || || style="background-color: silver;"|32 |- | style="background-color: silver;"|33 || || || style="background-color: silver;"|36 || style="background-color: silver;"|37 || || || style="background-color: silver;"|40 |- | || style="background-color: silver;"|42 || style="background-color: silver;"|43 || || || style="background-color: silver;"|46 || style="background-color: silver;"|47 || |- | || style="background-color: silver;"|50 || style="background-color: silver;"|51 || || || style="background-color: silver;"|54 || style="background-color: silver;"|55 || |- | style="background-color: silver;"|57 || || || style="background-color: silver;"|60 || style="background-color: silver;"|61 || || || style="background-color: silver;"|64 |} {{col-break|valign=bottom|gap=1em}} {| class="wikitable" style="margin-left:auto;margin-right:auto;text-align:center;width:16em;height:16em;table-layout:fixed;" |- |+ ''M'' = Order 8 |- | style="background-color: silver;"|1 || 63 || 62 || style="background-color: silver;"|4 || style="background-color: silver;"|5 || 59 || 58 || style="background-color: silver;"|8 |- | 56 || style="background-color: silver;"|10 || style="background-color: silver;"|11 || 53 || 52 || style="background-color: silver;"|14 || style="background-color: silver;"|15 || 49 |- | 48 || style="background-color: silver;"|18 || style="background-color: silver;"|19 || 45 || 44 || style="background-color: silver;"|22 || style="background-color: silver;"|23 || 41 |- | style="background-color: silver;"|25 || 39 || 38 || style="background-color: silver;"|28 || style="background-color: silver;"|29 || 35 || 34 || style="background-color: silver;"|32 |- | style="background-color: silver;"|33 || 31 || 30 || style="background-color: silver;"|36 || style="background-color: silver;"|37 || 27 || 26 || style="background-color: silver;"|40 |- | 24 || style="background-color: silver;"|42 || style="background-color: silver;"|43 || 21 || 20 || style="background-color: silver;"|46 || style="background-color: silver;"|47 || 17 |- | 16 || style="background-color: silver;"|50 || style="background-color: silver;"|51 || 13 || 12 || style="background-color: silver;"|54 || style="background-color: silver;"|55 || 9 |- | style="background-color: silver;"|57 || 7 || 6 || style="background-color: silver;"|60 || style="background-color: silver;"|61 || 3 || 2 || style="background-color: silver;"|64 |} {{col-end}} For M = 12, the pattern table (E07, E07, E07, 1F8, 1F8, 1F8, 1F8, 1F8, 1F8, E07, E07, E07) yields a magic square (3-nibbles per row, 12 rows.) It is possible to count the number of choices one has based on the pattern table, taking rotational symmetries into account.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Magic square
(section)
Add topic