Example 7 Let $n$ be a fixed positive even number, and consider an $n \times n$ square chessboard. If two squares share at least one common edge, they are called adjacent.

Now, mark $N$ squares on the chessboard so that every square on the chessboard (marked and unmarked) is adjacent to at least one marked square.

Determine the minimum value of $N$. (Problem from the 40th IMO)
Solve: Color an $n \times n$ chessboard as follows: If $n$ is not divisible by 4, color it as shown in Figure 7-1; otherwise, color it as shown in Figure 7-2. Consider all the black squares. If $n=4k$, after coloring according to Figure 7-2, there are $4 \times 3 + 4 \times 7 + \cdots + 4 \times (4k-1) = 2k(4k+2)$ black squares; if $n=4k+2$, after coloring according to Figure 7-1, there are $4 \times 1 + 4 \times 5 + \cdots + 4 \times (4k+1) = 2(k+1)(4k+2)$ black squares. In either case, the number of black squares is $\frac{1}{2} n(n+2)$, and no three of them can be adjacent to the same square. By the condition, each of them should be adjacent to a marked square, so $N \geqslant \frac{1}{4} n(n+2)$.

On the other hand, we prove that it is possible to mark $N=\frac{1}{4} n(n+2)$ squares to meet the requirements of the problem. In fact, as shown in Figure 7-3, we number the $4(n-1)$ squares of the "first layer border" of the chessboard from the top left corner, in a clockwise direction, as $1, 2, \cdots, 4n-4$, and mark the squares whose numbers are congruent to $1$ or $2$ modulo 4 (the shaded part in Figure 7-3).

Remove the outer two layers of the border of the chessboard, and for the remaining chessboard, number the squares from the top left corner, in a clockwise direction, in a similar manner, and mark the squares whose numbers are congruent to $1$ or $2$ modulo 4. Continue this process until it can no longer be performed. This way, we mark exactly half of the black squares, so there are $\frac{1}{4} n(n+2)$ marked squares. We now prove that this marking method meets the requirements.

In fact, it is not difficult to see from Figure 7-3 that any two marked squares do not share a common "neighbor square". Suppose these marked squares are $A_{1}, \cdots, A_{N}$, where $N=\frac{1}{4} n(n+2)$, and the set of squares adjacent to $A_{i}$ is $M_{i}$. Then $M_{i} (i=1,2, \cdots, N)$ are pairwise disjoint. For the squares $A_{i}$ located at the corners of the chessboard, $\left|M_{i}\right|=2$ (there are 2 such squares); for the squares $A_{i}$ located on the edges of the chessboard, $\left|M_{i}\right|=3$ (there are $2n-4$ such squares); for the squares $A_{i}$ not on the edges of the chessboard, $\left|M_{i}\right|=4$ (there are $\frac{n^{2}-6n+8}{4}$ such squares). Thus, $\left|M_{1} \cup M_{2} \cup \cdots \cup M_{N}\right|=\frac{n^{2}-6n+8}{4} \times 4 + (2n-4) \times 3 + 2 \times 2 = n^{2}$, so $M_{1} \cup M_{2} \cup \cdots \cup M_{N}$ includes all the squares, meaning each square is adjacent to at least one marked square.

In summary, $N_{\min}=\frac{1}{4} n(n+2)$.