The ninety-ninth problem: Given an odd number , color each cell of an grid using two colors, black and white. Two cells with the same color that share a vertex are called "adjacent." For any two cells and , if there exists a sequence of cells such that , and is adjacent to , then and are said to be "connected." Find the largest positive integer such that there exists a coloring scheme where there are cells that are pairwise not connected.
Problem 950
Official solution
The 99th problem:
Solution: Consider the generalized problem.
For an grid, where and are both odd numbers not less than 3, color the grid in black and white. In a given coloring scheme, all cells can be divided into several connected components, such that cells within the same connected component are connected to each other, and cells in different connected components are not connected. The number of connected components is denoted as .
We will prove the following using mathematical induction:
(1) ;
(2) When , each cell at the four corners of the grid is not connected to any other cell.
When , the eight cells on the outermost perimeter can belong to at most four connected components of a different color from the central cell, so . The equality holds if and only if the cells at the four corners are of a different color from the other five cells.
Next, assume . Let the second row from left to right form alternating black and white segments: , with the number of cells in each segment being . Let be the number of connected components that contain cells from the first row but not from the second row.
We now estimate .
If , the last cell of is the same color as either the last cell of or the first cell of , thus it is connected to a cell in the second row; among the first cells, at most cells are of a different color from and are not connected to each other. Similarly, among the cells above , at most cells are of a different color from the second row and are not connected to each other.
For , among the cells in the middle of , at most cells are of a different color from and are not connected to each other.
Thus, .
If , then .
Let be the number of connected components that contain cells from the second row but not from the third row. Since and always have one segment connected to the third row (consider the last cell of and the first cell of , one of them must be connected to the third row), we have .
Let be the number of connected components that contain cells from the third to the -th row. According to the induction hypothesis (1), we have .
We now prove: If (for odd ) or (for even ), then .
In fact, when is odd and , if , then , all cells in the second row are the same color, and all cells in the third row are also the same color. By the induction hypothesis (2), we have .
If is an odd number and , let the cells below be . Since are not connected to the third row, are of a different color from , and thus are the same color as . Therefore, are all connected. By the induction hypothesis (2), we have .
When is even and , if , then by the induction hypothesis (2), the first cell in the third row is of a different color from the second cell. Thus, is connected to the third row. Similarly, is also connected to the third row. Therefore, among , at most segments are not connected to the third row. Hence, , which contradicts the assumption that .
Therefore, when , we have . Thus, we have:
When the equality holds, must be odd, and .
Considering the condition for the equality in the estimation of , we know that the first and last cells of the first row are each surrounded by three cells of a different color. By the symmetry of the grid, we know that each cell at the four corners is not connected to any other cell.
Finally, it is easy to verify that for the cell at the -th row and -th column, if is even, color it black; if is odd, color it white. In these two coloring schemes, we have .
In summary, the required .