MathLabs

Problem 5

Given a permutation (a0,a1,…,an)(a_0, a_1, \ldots, a_n) of the sequence 0,1,…,n0, 1, \ldots, n. A transposition of aia_i with aja_j is called legal if ai=0a_i = 0 for i>0i > 0, and ai−1+1=aja_{i-1} + 1 = a_j. The permutation (a0,a1,…,an)(a_0, a_1, \ldots, a_n) is called regular if after a number of legal transpositions it becomes (1,2,…,n,0)(1, 2, \ldots, n, 0). For which numbers nn is the permutation (1,n,n−1,…,3,2,0)(1, n, n-1, \ldots, 3, 2, 0) regular?
Step 2 of 5: Rule out all even n>2n > 2 after the first leftward pass
In plain words

In the first pass, 00 hops left by two steps at a time; when nn is even, those two-step hops land 00 directly behind a1=na_1 = n, trapping it prematurely.

n>2 even:(1,n,n−1,…,3,2,0)⟶(1,n,0,n−2,n−1,…,2,3)n > 2\text{ even}: (1, n, n-1, \ldots, 3, 2, 0) \longrightarrow (1, n, 0, n-2, n-1, \ldots, 2, 3)
Detailed analysis

Assume n≥3n \ge 3. Starting from (1,n,n−1,…,3,2,0)(1, n, n-1, \ldots, 3, 2, 0), 00 is preceded by 22 and swaps with 33 to jump two positions left; it is then preceded by 44 and swaps with 55, and so on, successively swapping with 3,5,…,n−13, 5, \ldots, n-1 when n>2n > 2 is even. Because n−1n - 1 sits at index 22 immediately after a1=na_1 = n, swapping 00 with n−1n - 1 places 00 right after nn in (1,n,0,n−2,n−1,…,2,3)(1, n, 0, n-2, n-1, \ldots, 2, 3). No further legal transposition is possible, and since n>2n > 2, this is not (1,2,…,n,0)(1, 2, \ldots, n, 0).