Can you place the numbers 1 to 8 on the outer squares of a 3x3 grid, so on every side the middle number is the sum of the corners next to it?
Can you manage to place the same numbers so the middle number of each side is the average of the corners next to it?
Call the 4 numbers in the corners A,B,C,D.
For the first part, the sum of all 8 numbers must be 3*(A+B+C+D) = Sum 1 ... 8 = 36.
Thus A+B+C+D = 12.
There are only 2 ways to make the sum of 12:
{1,2,3,6} and {1,2,4,5}
but of these, only the first way solves the problem, and only when 1 and 2 are in opposite corners, the same solution found by others.

For the second part, since the other numbers are averages rather than sums, the total sum is 2*(A+B+C+D) =36.
So A+B+C+D = 18.
But in order to have the mid number averages be integers, all 4 corner numbers would have to be all evens or all odds.
But since we are only dealing with positive integers up to 8, there is only one way each of choosing "all odds" (which sums to 16) or "all evens (which sums to 20). So there is no way to do the second part.
Although it is an unnecessary step, it turns out, there are 7 ways to chose four numbers from {1,...,8} whose sum is 18, but in each case, there are 2 even numbers and 2 odd numbers. And this is not surprising since 18 is 2mod4.

Posted by Larry
on 20171031 11:25:57 