Tuesday 25 August 2015

mathematics - Curios observation about a special grid - Why?



[0,1,6,4,3]
[4,5,6,0,9]
[9,9,0,1,1]
[1,0,4,5,6]
[7,6,4,9,0]

This 5x5 table has unique properties.
Each number in a cell means :



The cell = last digit of (sum of its neighbour (including diagonals))




or



The cell = The remainder of the sum of its neighbour divided by 10



Here is another example


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

[2,1,4,4,0] [8,7,9,8,9] [4,5,1,5,4]

What surprised me is, every table like this will follow this :




  • The middle cell is always 0.

  • Any other cell $(i,j)$ and $(6-i, 6-j)$ adds upto 0 modulo 5
    That means, $(i,j) + (6-i, 6-j)$ is completely divisible by 5.




I have checked this with my computer.


Why this happens ?



Answer



Here is an almost-insight-free but perfectly straightforward proof. It involves computer calculation, but there's nothing here that couldn't be done unaided by a human with a reasonably high boredom threshold.


First of all, we're just working modulo 5 here. Your condition on each cell's relation to its neighbours is a mod-10 condition, which is equivalent to one mod 2 and one mod 5. The mod 2 one is irrelevant to the puzzle.


Now, think of possible grids as 25-element vectors. Our condition on each cell gives a linear constraint on these vectors. We have 25 constraints and a 25-dimensional space of vectors.


"In general" this setup will leave us with a 0-dimensional space of solutions, in other words no solutions but the trivial one where (when we're working mod 5) all cells' entries are multiples of 5. But in this case it happens that the conditions are not quite independent, and in fact there are two linearly independent solutions; every solution is a linear combination of these (mod 5), so there are $5^2=25$ solutions mod 5. (One of them is the trivial one.)


How do we determine that there are two linear solutions and find what they are? We ask a computer. In my case, I asked Mathematica. The code is boring and ugly:


m = ConstantArray[0, {25, 25}]
For[i = 0, i <= 4, i++,

For[j = 0, j <= 4, j++,
For[di = -1, di <= 1, di++,
For[dj = -1, dj <= 1, dj++,
ii = i + di; jj = j + dj;
If[0 <= ii <= 4 && 0 <= jj <= 4,
m[[5 i + j + 1, 5 ii + jj + 1]] =
If[di == 0 && dj == 0, 4, 1]]
]]]]
NullSpace[m, Modulus -> 5]


(here the cleverness, such as there is, lies inside the invocation of NullSpace; as mentioned above, doing by hand what this does by machine is boring but not difficult) and the answer is


{{4, 0, 1, 0, 4, 4, 0, 1, 0, 4, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 1, 0, 4, 0, 1}, {0, 4, 4, 1, 2, 1, 0, 4, 0, 1, 1, 1, 0, 4, 4, 4, 0, 1, 0, 4, 3, 4, 1, 1, 0}}

meaning that the solutions mod 5 are the linear combinations of these grids


4 0 1 0 4
4 0 1 0 4
0 0 0 0 0
1 0 4 0 1
1 0 4 0 1


and


0 4 4 1 2
1 0 4 0 1
1 1 0 4 4
4 0 1 0 4
3 4 1 1 0

and since each of these satisfies the given anti-symmetry condition, so does any linear combination of them, QED.


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...