Obviously, the numbers to the left of 1 are in descending order, and those to the right are in ascending order. Therefore, the string is uniquely determined by the choice of a subset of numbers that will stand to the left of one. There are such subsets in the set $\{2, \ldots, 10\}$ of 9 elements, as is known, $2^{9}$.

## Answer

512 ways.

Send a comment
Shen A.X.

A strip of $1 \times 10$ is divided into unit squares. The numbers $1, 2, \ldots, 10$ are written in the squares. First, the number 1 is written in one of the squares, then the number 2 is written in one of the adjacent squares, then the number 3 is written in one of the adjacent squares to the already occupied ones, and so on (arbitrary are the choice of the first square and the choice of the neighbor at each step). In how many ways can this be done?