Minimal sum of numbers in the uncolored squares

51 Views Asked by At

A natural number has been written in each cell of the $10$ x $10$ square. One highlights every square, for which the number written in that cell is less than one of its neighbour cells, but greater than another neighbour cell(by the word neighbour cell I mean a cell that has a common side with our cell). As a result only two remained uncolored, and moreover, neither of the uncolored squares are located at the angles of the squares. How can I find the minimal sum of numbers in these two uncolored squares?

If neither of the uncolored cells are angular cells, then as we have only two neighbours of the neighbour cells, the neighbour cells must not be equal. I am stuck at this moment. What should I do next?

3

There are 3 best solutions below

4
On BEST ANSWER

We know that there are at least 2 uncolored squares, because the extremal blocks are uncolored. We claim that the minimal block must be at least 1, and the maximal block must be at least $2n - 1$, so the answer is $2n$.

Let the number on the $ij$-th block be $a_{ij}$, where $1 \leq i, j \leq n$. Suppose that the minimal block is $a_{m_x m_y}$ and the maximal block is $a_{M_x M_y}$, both of them are not in a corner.

For any colored square $a_{ij}$, we can always find a neighboring block greater than it, and on the new block we can still find a block greater than it, and we can continue this process until we hit a uncolored block, this is only possible if the terminal block is $a_{M_x M_y}$. So we got an increasing path of length at least $|M_x - i| + |M_y - j| + 1$.

Similarly starting from $a_{ij}$ we can find a decreasing sequence until we hit $a_{m_xm_y}$, the length of the decreasing path is at least $|m_x - i| + |m_y - j| + 1$. Concatenating these two sequences we get a strictly increasing sequence of length at least $|M_x - i| + |M_y - j| + |m_x - i| + |m_y - j| + 1$.

So we get a sequence from each starting block. Let us look at the four sequences which is generating by taking the corner as the starting block (start with $a_{11}, a_{1n}, a_{n1}$ and $a_{nn}$). The sum of the length of these four resulting increasing sequences are thus at least

$$ \begin{aligned} 2&(|M_x - 1| + |M_y - 1| + |M_x - n| + |M_y - n|\\ &+ |m_x - 1| + |m_y - 1| + |m_x - n| + |m_y - n|) + 4 \\ &= 8(n-1) + 4 = 8n - 4. \end{aligned} $$

By pigeon-hole at least one out of the four sequences has length at least $2n - 1$, so $a_{M_xM_y} - a_{n_xn_y}\geq 2n-2$.

Now to complete the proof you need an actual block with $a_{M_xM_y} = 2n-1$ and $a_{m_xm_y} = 1$. I do not like this construction too much but an example is

$$ a_{ij} = \begin{cases} j+1, &\mbox{if $i=1$}\\ j+n-2, &\mbox{if $i=n$}\\ |i-1|+1, &\mbox{if $j=1$}\\ 2n-1-|i-n+1|, &\mbox{if $j = n$}\\ i+j-1, &\mbox{if $2 \leq i, j \leq n-1$}. \end{cases} $$

0
On

For each corner, there has to be a path from the highest, to the corner, to the lowest.
Since some of these will intersect, I think there must be a path from the highest via two corners to the least.
I think the highest is on an edge, and the lowest at the symmetrically opposite square.

0
On

Hw Chu has shown the the answer is at least $2n-1$. Here's an example that shows how to construct the array for odd $n$.

$$ \begin{matrix} 3 & 2 & 1 & 2 & 3 \\ 4 & 3 & 2 & 3 & 4 \\ 5 & 4 & 5 & 4 & 5 \\ 6 & 5 & 6 & 5 & 6 \\ 7 & 8 & 9 & 8 & 7 \end{matrix} $$

Here's the same trick for an even $n$. $$ \begin{matrix} 3 & 2 & 1 & 2 \\ 4 & 3 & 2 & 3 \\ 5 & 4 & 3 & 4 \\ 6 & 7 & 6 & 5 \end{matrix} $$

When I tried this for $n=10,$ it didn't work, but I may well have made a mistake. I'm going to write a python script to check the $n=10$ case.

I posted this before I realized that Hw Chu has posted a concrete, general construction.