+++++
    
+++++
    
+++++
    
+++++
    
+++++
In each cell of the above matrix, place 1, 1 or 0 in such a way that each row and column has a different total.
The solution I have posted is not unique.
Can you make one more larger matrix with the same conditions?
The inspiration for this puzzle came from Anand Rao at
Puzzleteasers.
First off for an nxn matrix this is impossible for 1, 3, probably 5 and maybe even for all odd.
I've found a way of extending a particular even sized solution to any even size:
2x2
+1 +1
0 1
4x4
+1 +1 +1 +1
+1 +1 +1 1
+1 0 1 1
0 1 1 1 Note the center is just the 2x2
6x6
+1 +1 +1 +1 +1 +1  6
+1 +1 +1 +1 +1 0  5
+1 +1 +1 +1 1 1  2
+1 +1 0 1 1 1 1
0 0 1 1 1 1 4
0 1 1 1 1 1 5

4 3 1 0 2 3
Note the center is just the 4x4. Also the row totals sum to 3 as do the column totals. This number is half of 6 because the missing number is 6.
To build this recursively to the nxn from the (n2)x(n2) add a row of all +1's to the top, down the left there will be n/2+1 +1's followed by n/21 0's, down the right there will be a 1, n/22 0's and n/2+1 1's and across the bottom a 0 and n1 1's.
The row totals are n, n1, ..., n/2+2, 2, 1, n/21, n/22, ..., n+1
The column totals are n/2+1, n/2, ..., 3, 1, 0, 2, 3, ..., n/2
And the missing number is n
Part of what makes this more difficult for and odd n is that the missing number cannot be n because the grand total needs to be half of the missing number.

Posted by Jer
on 20070614 14:22:27 