# Create a 3x3 table with a specific rule

Take 9 distinct numbers from [0 to 9], then put the numbers to a 3x3 table, so:

Each cell = Last digit of (sum of 2 numbers in the same row of the cell + sum of 2 numbers in the same column of the cell).

If the numbers are a, b, c, d, e, f, g, h, and i, so :

[a,b,c]
[d,e,f]
[g,h,i]

a = last digit of sum (b, c, d, g)
b = last digit of sum (a, c, e, h)
c = last digit of sum (a, b, f, i)
d = last digit of sum (a, g, e, f)
e = last digit of sum (b, h, d, f)
f = last digit of sum (c, i, d, e)
g = last digit of sum (a, d, h, i)
h = last digit of sum (b, e, g, i)
i = last digit of sum (c, f, g, h)

Note: There is only 1 answer if we ignore answers that are only permutations of columns, permutations of rows, or reflections along the diagonals: total 72 solutions (6x6x2).

• Any motivation behind asking this question? Oct 14, 2016 at 11:36
• @Matsmath : Motivations? For reputations and fun. Why do you asking this? Oct 14, 2016 at 15:15

The numbers could be

a=0, b=1, c=9, d=3, e=4, f=2, g=7, h=8 and i=6

So the matrix looks like

[0,1,9]
[3,4,2]
[7,8,6]

Reasoning

I started with the "0" as it is the lowest number - the sum of b,c,d,g would have to be either 10 or 20 - 10=1+2+3+4 (0 taken already), but it was impossible to complete the table, so there's the 20. Then I took the lowest and highest to complete the row. Tried the same with the column, but 2 and 8 didn't work, so next try was 3 and 7. The rest was just inserting values that didn't break the first steps. :)