There is a row of $100$ cells each containing a token. For $1$ dollar it is allowed to interchange two neighbouring tokens. Also it is allowed to interchange with no charge any two tokens such that there are exactly $3$ tokens between them. What is the minimum price for arranging all the tokens in the reverse order? (Egor Bakaev)
Problem
Source: Tournament of Towns, Junior O-Level , Fall 2019 p3
Tags: combinatorics
03.06.2024 18:59
Answer: $50$. Let's prove that the answer is $2m$ for $4m$ where $m\geq 2$. Lower Bound: There are two types of moves. $i)$ Changing places of $k$ and $k+4$ which is free. $ii)$ Changing places of $k$ and $k+1$ which costs $1$ dollar. Enumerate places from left to right with numbers $1,2,...,4m$.The place of token $k$ doesnot change in $(mod 4)$ during move $i$. The numbers in $0,1,2,3(mod \ 4)$ must get in places $1,0,3,2(mod \ 4)$. Thus, every number must be used in $ii$, which gives that we need at least $2m$ dollars. Upper Bound: We will give examples by induction. \[\text{For k=2}: (1,2,3,4,5,6,7,8)\overset{\text{free}}{\rightarrow} (5,2,3,8,1,6,7,4)\overset{1}{\rightarrow} (5,2,3,1,8,6,7,4)\overset{\text{free}}{\rightarrow} (8,2,3,4,5,6,7,1)\overset{1}{\rightarrow} (8,2,3,5,4,6,7,1)\overset{2}{\rightarrow}(8,7,6,5,4,3,2,1)\]Let it be true for $k$. Let's prove it for $k+1$. \[\text{For k+1}: (1,2,...,4k+4)\overset{2k}{\rightarrow}(4k,...,1,4k+1,4k+2,4k+3,4k+4)\overset{\text{free}}{\rightarrow}(4k+1,4k+2,4k+3,4k+4,4k,...,1)\]\[\overset{\text{free}}{\rightarrow}(4k,4k+2,4k+3,4k+4,4k+1,...,1)\overset{1}{\rightarrow}(4k,4k+2,4k+3,4k+1,4k+4,...,2,1)\overset{1}{\rightarrow}(4k+4,4k+3,...,2,1)\]As desired.$\blacksquare$