Saturday, May 10, 2014

Putting numbers in 3X3 matrix - s.t. Rows OR columns or diagonals add till 15

How can you place the numbers 1 through 9 in a 3x3 grid such that every row, column, and the two diagonals all add up to 15?

Solution

It first seems logical to put the 5 in the middle square becuase it is the median and mean of the numbers from 1 to 9 (and also the average of any 3 numbers adding up to 15).
The next thing to do is place the 1 since it's the smallest and will thus be likely to quickly constrain what we can do afterward. We can try to place the 1 in either a side square or a corner square, but once we place it, it forces us to place the 9 on the opposite side. At this point, we just play around with the remaining numbers to see if we can work out a solution.

Though this is all about magic square. Read more here.

0 comments:

Post a Comment