8. A $9 \times 9$ grid of squares is colored in two colors, black and white, such that the number of black squares adjacent to each white square is greater than the number of white squares, and the number of white squares adjacent to each black square is greater than the number of black squares (squares sharing a common edge are considered adjacent). Find the maximum difference in the number of black and white squares.
(53rd Belarusian Mathematical Olympiad (Final D Class))
Solution: A coloring scheme of a square matrix that satisfies the problem's conditions is called a good scheme. For a good coloring scheme, it is easy to prove the following conclusions:
(1) If two adjacent cells have the same color and are in different rows (or columns), then any two adjacent cells in these two rows (columns) have the same color, and these colors alternate between black and white (as shown in Figure 2).
(2) Three consecutive cells cannot have the same color.
(3) If a corner cell is white (black), then the adjacent cell is black (white).
(4) If there are two adjacent cells of the same color in a certain column (row), then it is impossible to have two adjacent cells of the same color in any other row (column).

From these conclusions, we can deduce that if there are no two adjacent cells of the same color in a certain column (row), then the colors of the other cells in the matrix depend solely on the coloring of this column (row). Therefore, we only need to check the color distribution of the first column (row). It is easy to see that if the matrix is colored like a chessboard, the maximum difference between the number of black and white cells is 1.

Consider the case where there are two adjacent cells of the same color in the first row. From (1) to (4), we can deduce that the number of black and white cells in any two adjacent rows is the same, so the difference between the number of black and white cells is equal to the difference in the first row. It is easy to see that the difference in the number of black and white cells in the first row is 3 (as shown in Figure 3).

When there are two adjacent cells of the same color in the first column, we can draw the same conclusion. From (4), we know that any good coloring scheme cannot have two adjacent cells of the same color in both the first row and the first column simultaneously.
In summary, the maximum difference between the number of black and white cells is 3.