Problem 7. (12 points) Around a round table sit $N$ knights. Every morning, the wizard Merlin arranges them. From the second day onwards, after arranging them, Merlin allows the knights a certain number of swaps: two knights sitting next to each other can swap places if they did not sit next to each other on the first day. The knights aim to sit in the same order as they were on one of the previous days; then the meetings will end. What is the maximum number of meetings that Merlin can definitely hold? (Arrangements that are obtained by rotation are considered the same. Merlin does not sit at the table.)
Solution. We will prove that Merlin can conduct $N$ meetings with certainty. Let us number the knights according to their order on the first day from 1 to $N$ in a clockwise direction. The arrangement of the knights around the table will be described by a permutation of these numbers, with the direction being clockwise.

We will call the basic arrangements of the form

$$
k, k-1, \ldots, 2,1, k+1, k+2, \ldots, N
$$

for $k=1,2,3, \ldots, N-1$ (the $N$-th basic arrangement coincides with the $(N-1)$-th) and we will prove that from any arrangement, one can move to a basic one. For this purpose, we will make a move in which the group on the left $k, k-1, \ldots, 2,1$ is the largest possible. We will show that the remaining knights sit in the required order $k+1, k+2, \ldots, N$. Suppose this is not the case; then we move $k+1$ clockwise. If $k+1$ reaches $k+2$, we will move them as a pair; if this pair reaches $k+3$, we will move the resulting triplet, and so on. As a result of this move, a group of the form $k+1, k+2, \ldots, k+m$ will be arranged to the left of $k$. Here, $k+m < N$ (otherwise, there would be no move). All numbers in this group, except $k+1$, can pass through the group on the left. Then $k+1$ can join the group on the left, leading to a contradiction with its maximality.

Thus, by proposing a new basic arrangement to the knights each day, Merlin will conduct at least $N$ meetings. This is because one cannot move from one basic arrangement to another with the allowed moves. The characteristic of an arbitrary arrangement will be the number of laps around the table that Merlin will make if he goes around the knights in the order of their numbers $1 \rightarrow 2 \rightarrow 3 \rightarrow \cdots \rightarrow N$. It is easy to see that the characteristic of the arrangement is preserved during the allowed moves. On the other hand, the characteristic of the $k$-th basic arrangement is equal to $k$, i.e., the basic arrangements have different characteristics. Therefore, in this way, Merlin will get the first repetition no earlier than on the $N$-th day.