# A 4x4 grid of numbers with unique row, column and diagonal ranges

Can you place every number from 1 to 16 into a 4x4 grid such that the range of every row, column and two main diagonals is a unique value? The range of a row is the difference between its maximum and minimum values (similarly for columns and diagonals).

Here is a similar question for 3x3: A 3x3 grid of numbers with unique row and column ranges

Good luck!

Here is one way to do it

General Strategy

I tried to put in the extreme values first (1,16,15,2,etc) as they will determine most of the values. Having some of these numbers on the main diagonals is especially useful since they will appear in three range calculations. After the first few values have been filled in, it is not too difficult to fill in the rest of the grid to obtain a list of distinct ranges.

• Correct! Well done. Dec 31, 2019 at 1:57

I constructed an example of this:
------------------------- 12
( 1 ) ( 2 ) (13) (16) |15
(10) ( 9 ) (11) ( 3 ) | 8
( 8 ) ( 6 ) ( 7 ) ( 5 ) | 3
( 4) (12) (14) (15) |11
------------------------ 14
9 10 7 13
My strategy was the same as other answers on both this question and the 3x3 version of it. Starting with largest gap is a good idea, as well as starting with a "central" sequence (ie. 5 6 7 8).

• Great work! The other diagonal should be 12 instead of 14. Dec 31, 2019 at 1:56
• @DmitryKamenetsky Ooops! Dec 31, 2019 at 2:01
• @DmitryKamenetsky I suppose this will hold for any nxn square. But I bet it is impossible to place numbers from 1 to 27 in a 3x3x3 cube :) What do you think? Dec 31, 2019 at 2:08
• You could make it every 3x3 slice of a 3x3x3, but then i think it's too easy... Dec 31, 2019 at 2:33