## 10. Figure

The figure is located on the middle field of the bottom row of a $7 \times 7$ board. In each move, the figure can move one field up, up-left, or up-right, as shown in the figure. In how many different ways can we move the figure to the top row of the board in a sequence of six moves?

![](https://cdn.mathpix.com/cropped/2024_05_30_12924d306592e3a90c60g-09.jpg?height=288&width=377&top_left_y=2083&top_left_x=1525)

Result: $\quad 659$
## Solution.

We will write the number of ways the piece can reach each square. Consider the yellow-marked square. If the piece is on this square at some point, in the previous move it must have been on one of the three blue-marked squares in the row below it. Therefore, we will write the sum of the numbers in the blue squares in the yellow square.

We start with the middle square of the bottom row, i.e., the starting position of the piece, where we write the number 1. We fill in the table row by row, from the bottom up.

After filling in the table, we just need to sum all the numbers in the top row:

| 44 | 89 | 126 | 141 | 126 | 89 | 44 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 14 | 30 | 45 | 51 | 45 | 30 | 14 |
| 4 | 10 | 16 | 19 | 16 | 10 | 4 |
| 1 | 3 | 6 | 7 | 6 | 3 | 1 |
|  | 1 | 2 | 3 | 2 | 1 |  |
|  |  | 1 | 1 | 1 |  |  |
|  |  |  | 1 |  |  |  |

$44+89+126+141+126+89+44=659$.