How to solve the magic square

Author: William Ramirez
Date Of Creation: 18 September 2021
Update Date: 1 July 2024
Anonim
SOLVE The 3x3 Magic Square Completely - There Can Only Be One!
Video: SOLVE The 3x3 Magic Square Completely - There Can Only Be One!

Content

Magic squares gained popularity along with the rise of math games such as Sudoku. A magic square is a table filled with integers in such a way that the sum of the numbers horizontally, vertically and diagonally is the same (the so-called magic constant). This article will show you how to construct an odd-order square, a single-parity square, and a double-parity square.

Steps

Method 1 of 3: Odd order square

  1. 1 Calculate the magic constant. This can be done using the simple mathematical formula [n * (n2 + 1)] / 2, where n is the number of rows or columns squared.For example, squared 3x3 n = 3, and its magic constant:
    • Magic constant = [3 * (32 + 1)] / 2
    • Magic constant = [3 * (9 + 1)] / 2
    • Magic constant = (3 * 10) / 2
    • Magic constant = 30/2
    • The magic constant for a 3x3 square is 15.
    • The sum of the numbers in any row, column and diagonal must equal the magic constant.
  2. 2 Write 1 in the center cell of the top row. It is necessary to build any odd square from this cell. For example, in a 3x3 square, write 1 in the second cell of the top row, and in a 15x15 square, write 1 in the eighth cell of the top row.
  3. 3 Write the following numbers (2,3,4 and so on in ascending order) in the cells according to the rule: one row up, one column to the right. But, for example, to write 2, you need to "go" outside the square, so there are three exceptions to this rule:
    • If you have gone beyond the upper limit of the square, write the number in the lowest cell of the corresponding column.
    • If you have crawled out of the right limit of the square, write a number in the farthest (left) cell of the corresponding line.
    • If you find yourself in a cell that is occupied by another digit, write the digit directly below the previous recorded digit.

Method 2 of 3: Single Parity Square

  1. 1 There are various techniques for constructing single parity and double parity squares.
    • The number of rows or columns in the single parity square is divisible by 2, not 4.
    • The smallest single parity square is a 6x6 square (you cannot build a 2x2 square).
  2. 2 Calculate the magic constant. This can be done using the simple mathematical formula [n * (n2 + 1)] / 2, where n is the number of rows or columns squared. For example, squared 6x6 n = 6, and its magic constant:
    • Magic constant = [6 * (62 + 1)] / 2
    • Magic constant = [6 * (36 + 1)] / 2
    • Magic constant = (6 * 37) / 2
    • Magic constant = 222/2
    • The magic constant for a 6x6 square is 111.
    • The sum of the numbers in any row, column and diagonal must equal the magic constant.
  3. 3 Divide the magic square into four equal-sized quadrants. Label the quadrants A (top left), C (top right), D (bottom left), and B (bottom right). Divide n by 2 to find the size of each quadrant.
    • So, in a 6x6 square, each quadrant is 3x3.
  4. 4 In quadrant A, write the fourth of all numbers; in quadrant B, write the next quarter of all numbers; in the C quadrant, write the next quarter of all numbers; in the D quadrant, write the final quarter of all numbers.
    • For our example of a 6x6 square in quadrant A, write the numbers 1-9; in quadrant B - numbers 10-18; in quadrant C - numbers 19-27; in quadrant D - numbers 28-36.
  5. 5 Write the numbers in each quadrant as you built the odd square. In our example, start filling quadrant A with numbers from 1, and quadrants C, B, D with 10, 19, 28, respectively.
    • Always write the number you start with in each quadrant in the center cell of the top row of a particular quadrant.
    • Fill each quadrant with numbers as if it were a separate magic square. If, when filling in a quadrant, an empty cell from another quadrant is available, ignore this fact and use the exceptions to the rule for filling in odd squares.
  6. 6 Highlight specific numbers in the A and D quadrants. At this stage, the sum of the numbers in columns, rows and on the diagonal will not equal the magic constant. Therefore, you must swap the numbers in specific cells in the upper left and lower left quadrants.
    • Starting at the first cell in the top row of Quadrant A, select the number of cells equal to the median of the number of cells in the entire row. Thus, in a 6x6 square, select only the first cell in the top row of quadrant A (this cell contains the number 8); in a 10x10 square, you need to select the first two cells of the top row of quadrant A (in these cells the numbers 17 and 24 are written).
    • Form an intermediate square from the selected cells. Since you have selected only one cell in a 6x6 square, the intermediate square will consist of one cell. Let's call this intermediate square A-1.
    • In a 10x10 square, you have selected two cells in the top row, so you need to select the first two cells of the second row to form an intermediate 2x2 square, consisting of four cells.
    • On the next line, skip the number in the first cell, and then select as many numbers as you highlighted in the intermediate square A-1. The resulting intermediate square will be called A-2.
    • Making the intermediate square A-3 is the same as making the intermediate square A-1.
    • Intermediate squares A-1, A-2, A-3 form the selected area A.
    • Repeat this process in the D quadrant: create intermediate squares that form the selected area D.
  7. 7 Swap the numbers from the highlighted areas A and D (numbers from the first row of the A quadrant with the numbers from the first row of the D quadrant, and so on). Now the sum of the numbers in any row, column and diagonal should be equal to the magic constant.

Method 3 of 3: Double Parity Square

  1. 1 The number of rows or columns in the parity order square is divisible by 4.
    • The smallest square of the order of double parity is the 4x4 square.
  2. 2 Calculate the magic constant. This can be done using the simple mathematical formula [n * (n2 + 1)] / 2, where n is the number of rows or columns squared. For example, squared 4x4 n = 4, and its magic constant:
    • Magic constant = [4 * (42 + 1)] / 2
    • Magic constant = [4 * (16 + 1)] / 2
    • Magic constant = (4 * 17) / 2
    • Magic constant = 68/2
    • The magic constant for a 4x4 square is 34.
    • The sum of the numbers in any row, column and diagonal must equal the magic constant.
  3. 3 Create intermediate squares A-D. In each corner of the magic square, select an intermediate square of size n / 4, where n is the number of rows or columns in the magic square. Label the intermediate squares as A, B, C, D (counterclockwise direction).
    • In a 4x4 square, the intermediate squares will consist of corner cells (one in each intermediate square).
    • In an 8x8 square, the intermediate squares will be 2x2.
    • In a 12x12 square, the intermediate squares will be 3x3 (and so on).
  4. 4 Create a central intermediate square. In the center of the magic square, select an intermediate square of size n / 2, where n is the number of rows or columns in the magic square. The central intermediate square must not intersect with the corner intermediate squares, but must touch their corners.
    • In a 4x4 square, the central intermediate square is 2x2.
    • In an 8x8 square, the central intermediate square is 4x4 in size (and so on).
  5. 5 Start building the magic square (from left to right), but write the numbers only in the cells located in the selected intermediate squares. For example, you fill a 4x4 square like this:
    • Write 1 in the first line of the first column; write 4 on the first line of the fourth column.
    • Write 6 and 7 in the center of the second line.
    • Write 10 and 11 in the center of the third line.
    • Write 13 on the fourth line of the first column; write 16 on the fourth line of the fourth column.
  6. 6 The remaining cells of the square are filled in the same way (from left to right), but the numbers must be written in descending order and only in the cells located outside the selected intermediate squares. For example, you fill a 4x4 square like this:
    • Write 15 and 14 in the center of the first line.
    • Write 12 on the second line of the first column; write 9 on the second line of the fourth column.
    • Write 8 on the third line of the first column; write 5 on the third line of the fourth column.
    • Write 3 and 2 in the center of the fourth line.
    • Now the sum of the numbers in any row, column and diagonal should be equal to the magic constant.

Tips

  • Use the described methods and find your own way to solve magic squares.

What do you need

  • Pencil
  • Paper
  • Eraser

Similar articles

  • How to solve Sudoku
  • How to solve an equation in one unknown
  • How to calculate the diagonal of a square