Chapter 104 (1/2)

Magic square matrix, also known as magic square, vertical and horizontal diagram.

It refers to an n-order matrix with the same number of rows and columns arranged by 1 ~ n ^ 2, and the sum of each row, column and diagonal is equal.

In shooting sculpture, Guo and Huang are chased by Qiu Qianren to the black dragon pool and hide in yinggu's hut. Yinggu put forward a question: the numbers 1-9 should be filled in the form of three rows and three columns, and the sum of each row, each column and two diagonal lines should be equal. This question has puzzled yinggu for more than ten years, and Huang Rong immediately answers it.

492

357

816

this is the simplest cubic plane magic square matrix.

Today's problem by Lao Tang is a more difficult five order magic square plane matrix.

The difficulty of calculation, I don't know how much higher than the third order magic square matrix.

However, since Rubik's cube matrix has been defined by mathematicians, it naturally has a set of unique operation rules.

According to the value of N, it can be divided into three cases.

When n is odd, when n is a multiple of 4, when n is any other even number!

The problem of Old Tang is to find a 5-order plane magic square. Obviously, we can apply the operation law of n as odd number.

Cheng Nuo quietly recalled in his mind when n is an odd number, the law of filling in the plane Rubik's cube.

”When n is an odd number,

① place 1 in the middle of the first row;

② store the numbers from 2 to n × n according to the following rules:

walk along 45 ° direction, for example,

to the right,

the number of rows stored in each number is 1 less than that of the previous number, and the number of columns is reduced by 1

③ if the range of rows and columns exceeds the range of matrix, it will be wrapped.

For example, if 1 is in the first row, then 2 should be placed in the bottom row, and the number of columns should also be reduced by 1;

④ if there is a number in the position determined according to the above rules, or if the previous number is the nth column in the first row,

then the next number will be placed under the previous number. ” (Note 1)

”therefore, the correct answer should be...”

Cheng Nuo builds a grid model in his mind. Soon, 25 numbers were filled in.

Shua Shua Shua ~ ~

in the eyes of the students, Cheng Nuo did not have any hesitation. He took the chalk and wrote away the dragon and snake on the blackboard, and the dust was flying. There is no pause in the middle!

Raising hands and feet, revealing a very strong confidence.

”Well, teacher, I'm done.” Cheng Nuo turns and throws the chalk head on the desk and says to Old Tang with a smile.

”Well, let me see. Are you right?” With a curiosity, old Tang looked at the filled Palace on the blackboard.

15812417

16147523

22201364

321191210

92251811

all correct!!

The position of 25 numbers is exactly the same as the correct answer.

The sum of every row, every column, every diagonal is 65! ~

Old Tang took a surprised look at Cheng Nuo. Then, under the expectant eyes of the whole class, he announced, ”the answer of Cheng Nuo It's right! ”

Whoa ~ ~

the whole class was in a state of uproar.

Sure enough, Cheng Nuo is as tough as ever!

It can't be compared. It can't be compared.

Their brain configuration with Cheng Nuo is not on the same level.

Xueba is only worthy of being looked up to by Xueba!

Old Tang looked at Cheng Nuo and said, ”since Cheng Nuo is the first student to solve this problem, my” special ”reward will go back to Cheng Nuo. Cheng Nuo, can you tell us how you solved this problem? ”

”No problem.” Cheng Nuo nodded, turned to point to the problem and said, ”in fact, this problem is very simple.”