In the picture below, a white square is surrounded by four black squares and three white squares. They are surrounded by seven black squares. What is the maximum number of white squares that can be surrounded by $ n $ black squares?
Problem
Source: Brazil National Olympiad 2019 - level 2 - #5
Tags: combinatorics, Brazilian Math Olympiad
19.12.2019 18:11
A good *guess* would be that for square numbers $n^2$ of white squares with $n \geq 2$, the minimal number of black squares is $4 \cdot n$. All of this is postulate; you'd have to prove that this is the optimal method. Between squares, replace the black border squares with white squares and complete the border in this order: Sample replacement for $4 \text{x} 4$ square 1. Start with replacing the green squares with white squares; this doesn't change the amount of black squares you need to complete the boundary. 2. Replace the orange squares; the first one adds one black square to the boundary (indicated in red), the second one doesn't. 3. Replace the blue squares; both add one black square to the boundary. 4. Replace the red square; this adds one black square to the boundary. So by 'extending' the boundary from a $n \times n$ square to a $n + 1 \times n + 1$ square, you're up net $4$ black squares, which fits with the formula I postulated. You can derive a formula from the four steps.
17.09.2020 21:00
if you move green cells you increase the number of white cells but fixes the number of black cells, so there can be more than $n^2$ white with 4*$n$ black
15.02.2022 04:56
Solution(Part 1): Answer(s): For $n=4t\rightarrow 2t^2-2t+1$, $n=4t+1\rightarrow 2t^2-t$, $n=4t+2\rightarrow 2t^2$, $n=4t+3\rightarrow 2t^2+2t$ The first claim is the configuration can not have three consecutive black squares(horizontal or vertical), otherwise we can achieve a configuration with more white squares. It can be proven by the Figure $1$. The second claim is the polygon obtained by the union of the center(s) of the black squares must bound a convex region, otherwise we can achieve a configuration with more white squares. It can be seen by the Figure $2$. The third claim is the sides of the polygon can have four directions(horizontal, vertical, two diagonal(s)), then the polygon will have at most $8$ sides. Let $a,b,c,d$ be the orange sides $AB,CD,EF,GH$ by the Figure $3$, respectively.
Attachments:



15.02.2022 05:19
Solution(Part 2:) By the claims above, none of the numbers $a,b,c,d$ can be greater than $2$. If $a=c=2$, it is possible find a configuration with more white squares by the Figure $4$(The blue path has more white squares). So in the best scenario the polygon does not have two opposite sides of size $2$. The fouth claim is we can not have three of the four numbers $a,b,c,d$ be equal to $1$, and the remaining one equal to $2$. The quantity of white squares in each line(horizontal or vertical) have the same parity(two consecutive differ by two or have the same amount). Hence, there are two remaining cases: Case 1: $a=b=c=d=1$. We will have a parallelogram by the Figure $5$. The quantity of black squares is $n=4+2(x+y)$ (I), it is only possible for $n$ even. The quantity of white squares is $xy+(x+1)(y+1)=2xy+x+y+1$ (II), replacing (I) in (II), we have $2x(\frac{n-4}{2}-x)+x+\frac{n-4}{2}-x+1=-2x^2+(n-4)x+\frac{n-4}{2}+1$ this quadratic function has the maximum point in $x=\frac{n-4}{4}$. If $n=4k$, then $\frac{n-4}{4}=k-1$ and the number of white squares is $2k^2-2k+1$. If $n=4k+2$, then $\frac{n-4}{4}=k-\frac{1}{2}$, is not an integer, so looking to the nearest integer(s) $\{k,k+1\}$ the number of white squares is $2k^2$. Case 2: Wlog $a=d=2$ and $b=c=1$. The number of white squares surrounded is $x+1+(x+1)y+(x+2)(y+1)=(2x+3)(y+1)$ and $n=6+2x+1+2y=7+2(x+y)$ so $n$ is odd. Again, looking to the quadratic function $(2x+3)(\frac{n-7}{2}-x+1)=-2(x+\frac{3}{2})(x-\frac{n-5}{2})$ is a quadratic function with maximum point in $x=\frac{n-8}{4}$. if $n=4k+1\rightarrow \frac{n-8}{4}=k-\frac{7}{4}$, so looking to the nearest integers $\{k-2,k-1\}$ the number of white squares is $2k^2-k$. If $n=4k+3\rightarrow \frac{n-8}{4}=k-\frac{5}{4}$, so looking to the nearest integers $\{k-2,k-1\}$ the number of white squares is $2k^2+k$.
Attachments:

