1. Determine the number of paths of length 14 that lead along the edges of the grid from point $A$ to point $B$. The length of each edge is one.

![](https://cdn.mathpix.com/cropped/2024_04_17_735d985af28408e5a3e8g-1.jpg?height=389&width=460&top_left_y=825&top_left_x=798)
Another solution. For easier expression, let's denote some points of the network as in Fig. 2. Each path from point $A$ to point $B$ of length 14 consists of seven edges to the right and seven edges upwards. The diagonal $X_{1} X_{6}$ must be crossed exactly once, and that is at one of the six points $X_{1}, \ldots, X_{6}$. For each of them, we will calculate how many paths pass through them. In the following text, we will refer to "paths" as routes composed of edges to the right and upwards.

![](https://cdn.mathpix.com/cropped/2024_04_17_735d985af28408e5a3e8g-2.jpg?height=580&width=623&top_left_y=1960&top_left_x=725)

Fig. 2

Given that the network is axially symmetric with respect to the line $X_{1} X_{6}$, the image of each path from $A$ to $X_{i}$ for each $i=1,2, \ldots, 6$ in this axial symmetry is a path from $X_{i}$ to $B$ and vice versa. Therefore, the number of paths from $A$ to $X_{i}$ is equal to the number of paths from $X_{i}$ to $B$. Since any path from $A$ to $X_{i}$ can be combined with any path from $X_{i}$ to $B$, the total number of paths from $A$ to $B$ passing through $X_{i}$ is equal to the square of the number of paths from $A$ to $X_{i}$. It is therefore sufficient to determine the number of paths from $A$ to $X_{i}$ for each $i=1,2, \ldots, 6$ and square these numbers and sum them up:

- There is only one path from $A$ to $X_{1}$, consisting of seven edges upwards.
- There are 7 paths from $A$ to $X_{2}$ — exactly one of the seven edges must go to the right and it can be any of them in their order on the path.
- There is only one way to get from $A$ to $X_{3}$ through one of the points $Y, Z, W$:

$\triangleright$ There is only one path through point $Y$.

$\triangleright$ There are four paths from $A$ to $Z$ (one of the four edges is to the right), and three paths from $Z$ to $X_{3}$ (one of the three edges is upwards). Therefore, there are $4 \cdot 3=12$ ways to pass through $Z$ to $X_{3}$.

$\triangleright$ There are four paths from $A$ to $W$ (one of the four edges is upwards), and only one path from $W$ to $X_{3}$. Therefore, there are four paths through $W$.

Thus, there are a total of $1+12+4=17$ paths from $A$ to $X_{3}$.

Since the network is also axially symmetric with respect to the line $A B$, the number of paths from $A$ to $X_{4}, X_{5}, X_{6}$ is the same as the number of paths from $A$ to $X_{3}, X_{2}, X_{1}$, respectively. Therefore, the total number of paths from $A$ to $B$ is

$$
1^{2}+7^{2}+17^{2}+17^{2}+7^{2}+1^{2}=(1+49+289) \cdot 2=678
$$