Let n be a fixed positive integer. Let A=[a11a12⋯a1na21a22⋯a2n⋮⋮⋯⋮an1an2⋯ann]andB=[b11b12⋯b1nb21b22⋯b2n⋮⋮⋯⋮bn1bn2⋯bnn] be two n×n tables such that {aij∣1≤i,j≤n}={bij∣1≤i,j≤n}={k∈N∗∣1≤k≤n2} .
One can perform the following operation on table A : Choose 2 numbers in the same row or in the same column of A , interchange these 2 numbers, and leave the remaining n2−2 numbers unchanged. This operation is called a transposition of A .
Find, with proof, the smallest positive integer m such that for any tables A and B , one can perform at most m transpositions such that the resulting table of A is B .