Constructing Magic Square Using Parity Map

By: Contreras, Mattheus Marcus B
Publisher: Cebu City ; CIT-U ; 2017DDC classification: T C7683 2017 Summary: Since the discovery of the Lo Shu square around 2700 B.C. in China, the pursuit of constructing magic squares has been a fascination in recreational mathematics. Although there are many studies available, few of them could actually provide a unique and efficient solution for constructing magic squares of different order. In this paper, we define a normal magic square as a NxN square matrix whose entries are distinct positive integers from 1 to N^2 such that every row, column, and two main diagonals sums up to the same number, the magic constant. As a basis for constructing magic square of order N, we formulate constraints of normal magic square of order 3 by a collection of linear equations. We provide a well-known but computationally infeasible algorithm that uses exhaustive search method and produce eight normal magic square of 3. The we propose an efficient algorithm for constructing all normal magic squares of order 3. The algorithm makes use of parity map, Z={1,...,N}-Z={0,1} and define f(x)=0 if x is even, 1 if x is odd. Using this and other properties of an odd-ordered normal magic square, we prove that there exist only one parity magic square, a magic square with entries of 0 or 1, that satisfies the said constraints. From this f, we demonstrate that normal magic square of order 3 has four rotations and four reflections which show that normal magic square of order 3 is isomorphic to D. Using this fact, we proposed another algorithm which is more efficient and flexible than the other two, using also the parity map method to construct magic squares of order 3.
Tags from this library: No tags from this library for this title. Log in to add tags.
    Average rating: 0.0 (0 votes)

Since the discovery of the Lo Shu square around 2700 B.C. in China, the pursuit of constructing magic squares has been a fascination in recreational mathematics. Although there are many studies available, few of them could actually provide a unique and efficient solution for constructing magic squares of different order.

In this paper, we define a normal magic square as a NxN square matrix whose entries are distinct positive integers from 1 to N^2 such that every row, column, and two main diagonals sums up to the same number, the magic constant. As a basis for constructing magic square of order N, we formulate constraints of normal magic square of order 3 by a collection of linear equations. We provide a well-known but computationally infeasible algorithm that uses exhaustive search method and produce eight normal magic square of 3. The we propose an efficient algorithm for constructing all normal magic squares of order 3. The algorithm makes use of parity map, Z={1,...,N}-Z={0,1} and define f(x)=0 if x is even, 1 if x is odd. Using this and other properties of an odd-ordered normal magic square, we prove that there exist only one parity magic square, a magic square with entries of 0 or 1, that satisfies the said constraints. From this f, we demonstrate that normal magic square of order 3 has four rotations and four reflections which show that normal magic square of order 3 is isomorphic to D. Using this fact, we proposed another algorithm which is more efficient and flexible than the other two, using also the parity map method to construct magic squares of order 3.

000-099

There are no comments for this item.

to post a comment.