We need to move a pawn from the bottom left corner of a chessboard to the opposite corner, moving one step to the right or up at a time. How many such paths pass through any of the four center squares?
I. solution. The fact that we must pass through one of the middle squares precisely means that we cannot step on the dark squares on the diagram, because this way we would bypass the middle four squares, since we can only step to the right or upwards.

|  |  |  | 35 | 175 | 525 | 1225 | 2450 |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|  |  |  | 35 | 140 | 350 | 700 | 1225 |
|  |  |  | 35 | 105 | 210 | 350 | 525 |
| 1 | 5 | 15 | 35 | 70 | 105 | 140 | 175 |
| 1 | 4 | 10 | 20 | 35 | 35 | 35 | 35 |
| 1 | 3 | 6 | 10 | 15 |  |  |  |
| 1 | 2 | 3 | 4 | 5 |  |  |  |
| 1 | 1 | 1 | 1 | 1 |  |  |  |

All other paths, however, do pass through the middle $2 \times 2$ area, so we only need to sum these paths.

We can step onto the starting square in one way. For the other squares, the number of ways to step onto them is the sum of the number of ways to step onto the square to the left and the square below, since we can only step from these.

Thus, we can write down how many ways we can step onto each square. We can reach the top right corner in 2450 ways. This is the number of paths we are looking for.

II. solution. The number of paths from the bottom left corner to the top right corner on an $a \times b$ "chessboard" is:

$$
S(a ; b)=\binom{a+b-2}{a-1}
$$

since we take $(a+b-2)$ steps, and we can choose $(a-1)$ steps to the right from these.

![](https://cdn.mathpix.com/cropped/2024_05_02_c4e0735d9e3ba993800dg-1.jpg?height=437&width=426&top_left_y=1473&top_left_x=836)

We can step onto the middle four squares from the $A, C$, or $B$ squares. The latter two paths are symmetrical, so it is sufficient to examine one and then multiply the number of steps obtained by two.

We can reach the $A$ square in $S(4 ; 4)$ ways. From the $A$ square, we can continue our path on a $5 \times 5$ board in $S(5 ; 5)$ ways.

We can only step onto the $C$ square from the $P$ square, in such a way that we do not touch $A$. We can reach the $P$ square in $S(3 ; 5)$ ways. From the $C$ square, we can continue to the top right corner in $S(5 ; 4)$ ways.

The number of appropriate paths is:

$$
S(4 ; 4) \cdot S(5 ; 5)+2 \cdot S(3 ; 5) \cdot S(5 ; 4)=\binom{6}{3} \cdot\binom{8}{4}+2\binom{6}{2} \cdot\binom{7}{4}=2450
$$