Moving numbers in a square
Source: Iranian 3rd-Round MO 2019 ; mid-term Combinatorics Exam P3
August 23, 2019
rectanglecombinatorics
Problem Statement
Cells of a square are filled with positive integers in the way that in the intersection of the th column and th row, the number is written. In every step, we can choose two non-intersecting equal rectangles with one dimension equal to and swap all the numbers inside these two rectangles with one another. ( without reflection or rotation ) Find the minimum number of moves one should do to reach the position where the intersection of the th column and row is written .