Minimum number of moves
Source: Moldova JTST 2017, problem 8
May 3, 2017
combinatoricsgridsOperationoptimizationcombinatorics solvedSwapordering
Problem Statement
The bottom line of a rectangle is filled with tokens marked with the numbers and located in that order. An operation is a move of a token from its cell into a free adjacent cell (two cells are called adjacent if they have a common side). What is the minimum number of operations needed to rearrange the chips in reverse order in the bottom line of the rectangle?