Puzzle: Each entry in a number grid is the average of its neighbors I'm trying to solve the following puzzle:

Each number should be the average of its four neighbors. For example, $x$ should be equal to $\frac{1}{4}(4+10+y+z)$.
I don't know how to make a formula out of it. What's the trick? Can anyone give me a clue ?

This is a Laplace equation with Dirichlet boundary condition, you can construct a matrix and solve it using Matlab, or you can use Jacobi iteration to solve it manually as the number of unknowns is very small.
You start with all unknowns set to zero. Then starting from the boundary, replace each unknown with the average of its four neighbors. Since this is a puzzle, the answer is likely to be integers so you can round the result safely. After two or three iterations you get the answer. Mine is:
$$
6, 5, 3, 2, 1 \\
5, 4, 4, 2, 1
$$
