MathLabs

Problem 5

Two squirrels, Bushy and Jumpy, have collected 20212021 walnuts for the winter. Jumpy numbers the walnuts from 11 through 20212021 and digs 20212021 little holes in a circular pattern in the ground around their favourite tree. The next morning Jumpy notices that Bushy had placed one walnut into each hole, but had paid no attention to the numbering. Unhappy, Jumpy decides to reorder the walnuts by performing a sequence of 20212021 moves. In the kk-th move, Jumpy swaps the positions of the two walnuts adjacent to walnut kk. Prove that there exists a value of kk such that, on the kk-th move, Jumpy swaps some walnuts aa and bb with a<k<ba<k<b.
Step 2 of 5: Colour walnuts red as they are processed
In plain words

Recording which walnuts have already been "used" as a colour turns the swapping process into a purely combinatorial colouring problem.

colour walnut k red right after move k\text{colour walnut } k \text{ red right after move } k
Detailed analysis

Right after move kk is performed, colour walnut kk red; all other walnuts keep their previous colour (initially all black). By the assumption of the first step, the walnut that turns red at move kk always has two same-coloured neighbours at that moment — both black, or both already red — never one of each.