Baltic Way 2025 · Problem 8
Combinatorics
A sequence of non-negative integers is called self-descriptive if
for each , i.e. equals the number of elements of the sequence that are greater than or equal to , for each . For each positive integer , determine the number of self-descriptive sequences of length .
When you’re ready
Review material becomes available with the next Daily.
Review
Topics
Pigeonhole and extremal arguments
Solutions
Solution
The answer is .
All elements of a self-descriptive sequence are integers between and , inclusive, since they are sizes of sets with at most elements. A self-descriptive sequence is also non-increasing: all numbers that are at least are also at least , so .
Take any self-descriptive sequence and draw an grid. Number the columns from left to right and the rows from bottom to top. In column , colour the bottom cells gray and leave the rest white (Figure 1).

Figure 1. Grid representing the self-descriptive sequence . The grid is symmetric across the main diagonal.
Consider any column with exactly gray cells. Then . Since , exactly terms of the sequence are at least . As the sequence is non-increasing, these are the first terms. Thus the first columns have their bottom cells gray, while the remaining columns do not. Equivalently, row has exactly its leftmost cells gray. Since this holds for every , the grid is symmetric across the main diagonal.
Every self-descriptive sequence gives a unique grid with these properties. Conversely, every grid symmetric across the main diagonal in which each column has all its gray cells below its white cells gives a unique sequence by taking to be the number of gray cells in column . Such a sequence is self-descriptive, because if row has exactly gray cells, then exactly terms of the sequence are at least . Hence self-descriptive sequences are in bijection with these grids.
Now draw the boundary between the gray and white cells and connect it to the top-left and bottom-right corners along the boundary of the grid (Figure 2). Since each row and column switches from gray to white at most once, this boundary is a down-right path from the top-left corner to the bottom-right corner. The grid is symmetric across the main diagonal, so the boundary is also symmetric. Thus choosing one half of the boundary determines the other half.

Figure 2. The boundary between the gray and white cells. By symmetry, only one half can be chosen freely.
Conversely, every right-down path from the top-left to the bottom-right that is symmetric across the main diagonal determines one of the admissible grids. It remains to count such paths. We may freely choose the half of the path from the top-left corner to the main diagonal. In an grid this half consists of steps, each either right or down. Hence there are such paths, and therefore self-descriptive sequences of length .
Contest context
Results from Baltic Way 2025
11 teams
- Mean score
- 4.1 / 5
- Scores of 4 or 5
- 9 / 11
- Estonia
- 5 / 5
Score distribution
All team scores
| Team | Score |
|---|---|
| Germany | 5 / 5 |
| Estonia | 5 / 5 |
| Poland | 5 / 5 |
| Lithuania | 5 / 5 |
| Norway | 5 / 5 |
| Latvia | 5 / 5 |
| Finland | 5 / 5 |
| Denmark | 5 / 5 |
| Sweden | 5 / 5 |
| Ukraine | 0 / 5 |
| Iceland | 0 / 5 |