3
$\begingroup$

Can you place every number from 1 to 9 into a 3x3 grid such that the median of every row and column is a unique value? The median of a row is the number that is greater than one number and smaller than another number in that row (similarly for columns).

Bonus question: Can you find 4 different solutions, such that 2, 3, 4, or 5 are not used as medians?

Good luck!

$\endgroup$

3 Answers 3

4
$\begingroup$

The medians have values ranging from 2 to 8, so exactly one of these values does not appear as the median of one of the 6 rows/columns.

Here are three templates that allow you to choose any missing median value.

 1 a 5  a
 8 4 6  6
 9 7 b  7

 8 4 5
where {a,b}={2,3}

 1 2 a  2
 3 8 b  b
 c 9 7  7

 3 8 a
where {a,b,c}={4,5,6} with a>b

 1 3 b  3
 2 6 4  4
 9 a 5  a

 2 6 5
where {a,b}={7,8}

For completeness, here are the solutions this produces:

 No 2         No 3

 1 3 5  3     1 2 5  2
 8 4 6  6     8 4 6  6
 9 7 2  7     9 7 3  7

 8 4 5        8 4 5


 No 4         No 5         No 6

 1 2 6  2     1 2 6  2     1 2 5  2
 3 8 5  5     3 8 4  4     3 8 4  4
 4 9 7  7     5 9 7  7     6 9 7  7

 3 8 6        3 8 6        3 8 5


 No 7         No 8

 1 3 7  3     1 3 8  3
 2 6 4  4     2 6 4  4
 9 8 5  8     9 7 5  7

 2 6 5        2 6 5

$\endgroup$
3
  • $\begingroup$ Love your work as always! By the way No 6 can be obtained from No 4 by doing 9-x. $\endgroup$ Commented Jan 1, 2020 at 8:05
  • $\begingroup$ @DmitryKamenetsky Indeed, but you mean 10-x. That is actually how I got the 7/8 template from the 2/3 template, though I then reordered the rows to sort the first column, putting the 1 in the top left corner. $\endgroup$ Commented Jan 1, 2020 at 8:11
  • $\begingroup$ Ah yes sorry it's 10-x $\endgroup$ Commented Jan 1, 2020 at 8:44
4
$\begingroup$

Here is one solution:

1 2 9
3 5 8
7 4 6

$\endgroup$
2
$\begingroup$

No 2:

 2 8 9 - 8
 3 5 7 - 5
 4 6 1 - 4
 | | |
 3 6 7

No 3:

 3 1 2 - 2
 6 5 8 - 6
 4 7 9 - 7
 | | |
 4 5 8

No 4:

 1 8 9 - 8
 4 5 6 - 5
 2 7 3 - 3
 | | |
 2 7 6

No 5:

 5 2 1 - 2
 8 7 3 - 7
 9 4 6 - 6
 | | |
 8 4 3

$\endgroup$
2
  • $\begingroup$ Sorry but 3 is used as a median twice. $\endgroup$ Commented Jan 1, 2020 at 6:50
  • $\begingroup$ @DmitryKamenetsky; fixed $\endgroup$
    – JMP
    Commented Jan 1, 2020 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.