3.27 In an $n \times n(n \geqslant 3)$ square grid, fill each cell with $\pm 1$ according to the following rules:
(1) All cells on the edges of the grid are filled with -1;
(2) For any empty cell, fill it with the product of the two nearest filled cells in its row or column.
Continue this process until all empty cells are filled. Find
(i) the maximum number of +1 that can appear in the grid;
(ii) the minimum number of +1 that can appear in the grid.
[Solution] (i) First, fill the 3 cells marked with $a$ in the right figure with +1 in sequence, then fill the cells marked with $b$ with +1 in sequence, and then fill the cells marked with $c$ with +1 in sequence. Thus, all the $(n-4) \times (n-4)$ cells in the middle can be filled with +1. Therefore, the figure contains a total of $(n-2)^{2}-1$ +1s. When $n=3$, the figure contains exactly one +1.

On the other hand, consider the 4 corner cells of the $(n-2) \times (n-2)$ grid after removing the edge cells. If 3 of these corner cells are already filled with +1, and the row and column of the last empty corner cell are all filled with +1, then this corner cell can only be filled with -1. Therefore, there is at least one -1 in the grid except for the edge cells. So, when $n=3$, the grid contains exactly one +1; when $n \geqslant 4$, the grid can contain at most $(n-2)^{2}-1$ +1s.
(ii) Fill the empty cells on the main diagonal, except for the two corner cells, with +1. Then, fill the other cells with -1 in sequence. At this point, the grid contains a total of $n-2$ +1s.

On the other hand, for any empty cell in the grid, to fill it with -1, at least one cell in its row or column must be filled with +1. Therefore, the grid must contain at least $n-2$ +1s. Hence, the grid contains at least $n-2$ +1s.