[Example 5.1.1] This is a game called "Naval Battle": An enemy ship is lurking in a $7 \times 7$ grid of sea area. The enemy ship consists of four square decks connected, but these four decks do not form a square. Instead, they form one of the following four shapes:

A shore-based artillery platform can hit only one grid with each shell. To ensure hitting the enemy ship, what is the minimum number of shots required?
Due to the enemy ship's position being mobile on a $7 \times 7$ grid, a direct frontal attack is not easy to execute. We can change our approach: suppose there are not just one but many enemy ships, distributed in the shapes (A), (B), (C), (D) on the $7 \times 7$ grid. What vulnerabilities would this create? One obvious situation is that the four decks of the enemy ship cannot form a square, so when firing from the shore, we can leave out squares. This way, one of the "×" marks will definitely hit the enemy ship, as shown in Figure 5-2.

Firing at the "×" positions in Figure 5-2, leaving out four squares, ensures that one "×" will definitely hit the enemy ship. Therefore, at least 20 shots are needed to guarantee a hit.

The second obvious situation is that the enemy ship's four decks are connected. Therefore, we can fire at the "×" positions in Figure 5-3, which disrupt every four-connected square, leaving the enemy ship with no place to hide. In this case, at least 20 shots are also needed to guarantee a hit.

From the above two examples, it is clear that at least 20 shots are required to guarantee a hit. The next question is, if 19 shots are fired, can the enemy ship escape? If 19 shots are not enough, then the firing positions similar to those in Figures 5-2 and 5-3 form a vast and deadly net for the enemy ship. Therefore, the next task is to prove that 19 shots are not enough.

We divide the $7 \times 7$ grid into 4 non-overlapping $3 \times 4$ rectangles, as indicated by the thick lines in Figures 5-2 and 5-3. Our problem is that if we can hit the enemy ship, each $3 \times 4$ rectangle must be shot at least 5 times, meaning at least 20 shots are required.

Assume that one $3 \times 4$ rectangle is not shot at least 5 times but at most 4 times. We will study the $3 \times 4$ rectangle in Figure 5-4. Since at most 4 shots are fired, each column should have one shot, but no row can have 3 shots, otherwise, the other two rows together would have at most one shot, allowing enemy ships shaped like (A), (B), (C) to escape. Therefore, no row can have more than 2 shots.

Now consider the $3 \times 3$ square on the left of Figure 5-4 (see Figure 5-5). If $a$ is not shot, since no row can have more than 2 shots and each column must have one shot, the "×" positions in Figure 5-5 should be the firing configuration. However, this still allows an enemy ship shaped like (D) to escape, so $a$ and $b$ must be shot. According to the rule that no row (or column) can have 3 shots, the squares 1, 3, 4, 5, 6, 7 are not shot. In the 4 corners of Figure 5-4, one corner must also be left unshot, for example, square 2. In this case, an enemy ship can be placed in squares 1, 2, 3, 4 and not be hit.

From the above, it is clear that in each $3 \times 4$ rectangle, at least 5 shots are required. If one $3 \times 4$ rectangle is shot at most 4 times, it will definitely give the enemy ship a chance to escape. Therefore, the minimum number of shots required to guarantee hitting the enemy ship is 20.

From the problem-solving process, we can see that instead of a direct attack on the enemy ship, we changed our perspective, considering all possible positions of the enemy ship and how many shots are needed in each $3 \times 4$ rectangle to ensure no enemy ship escapes. This strategy of changing the perspective when a direct approach is difficult is called the transfer mapping strategy.
The transfer mapping strategy for solving problems generally includes the following aspects:
1. Reversing the roles
2. Proposition transformation
3. Combining numbers and shapes
4. If direct is difficult, then reverse
5. Establishing correspondence
The main idea of using the transfer mapping strategy to solve problems is as follows: