## Task A-2.5.

Let $n>1$ be a natural number. In how many ways can the numbers $1,2, \ldots, 2 n$ be written into the cells of a $2 \times n$ board so that consecutive numbers are in cells with a common side?
## Solution.

Let's color the fields of the chessboard with black and white such that adjacent fields are of different colors. (If 1 is on a white field, then $2n$ is on a black field and vice versa.)

1 point

Instead of sequencing numbers, let's think about drawing a line that passes through each field exactly once. We will see that the line is actually determined by its starting field (1) and its ending field $(2n)$.

If both ends of the line are in the first or the last column, then there is exactly one line.

![](https://cdn.mathpix.com/cropped/2024_05_30_14eaa2cf500c23a22c24g-09.jpg?height=163&width=317&top_left_y=701&top_left_x=798)

There is no line whose start and end are in the same column that is not on the edge of the board. Otherwise, the line would have to cross itself, i.e., we would write two different numbers in one field of the board.

Let the ends of the line be in different columns, say in column $a$ and in column $b$, where $1 < a < b < n$. Given that the line must pass through the fields of the first column, it is determined how it passes through the columns from 1 to $a$: from the end point in column $a$ straight in the same row to the first column, and then in the other row to column $a$. Similarly, this applies to the part of the line that passes through the columns from $b$ to $n$.

The part between columns $a$ and $b$ must pass through both fields of column $a+1$, then both fields of column $a+2$, and so on up to column $b-1$. Thus, for each choice of numbers $a$ and $b$, we have two lines whose ends are in those columns.

## 4 points

![](https://cdn.mathpix.com/cropped/2024_05_30_14eaa2cf500c23a22c24g-09.jpg?height=200&width=1302&top_left_y=1568&top_left_x=306)

$1 \quad a-1 \quad a \quad a+1$

$b$

The first field can be chosen in $2n$ ways, and the last field can be any of the $n-1$ fields of the opposite color except the one in the same column as the first field.

Thus, we get $2n \cdot (n-1)$ lines.

To this number, we need to add the possibilities where the end fields are in the same column, either the first or the last. For the first field, there are 4 possibilities, and the last field is then either above or below it. Therefore, the final solution is $2n(n-1) + 4$.

Note: A student who does not consider the possibility that the start and end of the line can be in the same column at the edge of the board loses 2 points.

Note: It is not necessary to mention the coloring of the board. It is sufficient to observe that even and odd numbers have certain positions on it.

## COUNTY COMPETITION IN MATHEMATICS

## 3rd grade - high school - A variant

March 4, 2020.

## IF A STUDENT HAS A DIFFERENT APPROACH TO SOLVING THE TASK, THE COMMITTEE IS OBLIGED TO GRADE AND EVALUATE THAT APPROACH APPROPRIATELY.