There are $n \geq 1$ notebooks, numbered from $1$ to $n$, stacked in a pile. Zahar repeats the following operation: he randomly chooses a notebook whose number $k$ does not correspond to its location in this stack, counting from top to bottom, and returns it to the $k$th position, counting from the top, without changing the location of the other notebooks. If there is no such notebook, he stops. Is it guaranteed that Zahar will arrange all the notebooks in ascending order of numbers in a finite number of operations? Proposed by Zahar Naumets
Problem
Source: Kyiv City MO 2024 Round 2, Problem 10.4
Tags: combinatorics, permutations
07.02.2024 23:46
nice problem. yes , zahar can guarantir a win . just find the monivarient
21.02.2024 13:22
Can someone solve this problem?I have no idea with it.
22.02.2024 19:28
The process always ends. We do it by induction. Suppose it's proven for numbers less than $n$ and we have $n$ notebooks. Assume that the process is infinite. If the laptop labeled with $1$ comes into the first place, we are done since we would apply the induction hypothesis. Let $k_i, i=1,2,\dots$ be the positions where the 1-st laptop (labeled with $1$) is placed at the $i$-th step. $i=1,2,\dots$. Let $k:=\liminf k_i$, that is, $k$ is the smallest number that occurs infinitely many times in $k_i$. As said, $k>1$. Let's consider first the case when $k_i=k$ from some place on, say, $k_i=k, \forall i, i\ge N$. So, the first laptop stays still when $i\ge N$. This means that the laptops below the $k$-th position will circulate below it, and those ones that are above that position will stay there. But this is virtually as if we do the process with $k-1$ laptops labeled from $1$ to $k-1$ above the $k$-th position and $n-k-1$ ones labeled from $1$ to $n-k-1$ below the $k$-th position. But then, the process would end by the induction hypothesis, contradiction. Consider now the case that $k_i$ is not a constant from some place on. Observe that the first laptop only moves when some laptop above or below it jumps over it. Suppose the first laptop is at its highest position ($k$-th). At some moment after that, it drops down, which means that a laptop with a label $\ell, \ell<k$, which is below the $k$-th position, jumps over the 1-st notebook and sits at $\ell$-th position. Observe that the $\ell$-th laptop will always be above the $1$-st one from this moment on. Indeed, there are only two possibilities $1$-st and $\ell$-th notebooks to exchange their order - either the $1$-st jumps on its place or the $\ell$-th jumps on its place over the 1-st one. The former case is impossible, the latter is also ruled out, since the 1-st laptop is always at the positions greater or equal to $k$ and $\ell<k$. Therefore, new and new laptops with labels less than $k$ will jump to their positions and will never leave the segment above the 1-st laptop, contradiction. Thus, the process ends after some finite number of steps.
23.02.2024 04:07
thewizard369 wrote: nice problem. yes , zahar can guarantir a win . just find the monivarient what is the monivarient
23.02.2024 20:55
@above, The first thing that comes to mind when one sees a problem like that is to find a monovariant. I did it but no luck. You can see here more comments on this problem, and also some links on invariant/monovariant technique.
08.05.2024 20:11
Solved with erkosfobiladol. Assume that the process continues indefinitely. We will say that a book is processed iff we place the book in its "original" location. Lemma: If a book is processed finitely many times, then it remains constant at some place. Proof: Suppose contrary. Let such book's number be $m$. Let $k$ be the lowest location where $m.$ book comes infinitely many times. For the sake of contradiction, the book has to move upwards infinitely many times after it comes to $k.$ place. This is only possible when a book with number $\geq k$ turns to its original location coming from an upper region. However, if such a book moves this way, it can never be in the upper region of $m.$ book. Hence, $m.$ book remains fixed at $k$ eventually.$\square$ Thus, after finite number of moves, the books which are processed finitely many times will remain fixed in their positions. We also know that $n$ cannot be processed because of induction arguments. So, between fixed books there are some intervals where each book is processed infinitely many times. And these books must remain in their intervals (otherwise a fixed book's position would change). By induction, the books in the intervals will be eventually at their "original" locations which results in a contradiction.$\blacksquare$