(noch nicht übersetzt)
Problem 913
The numbers from 1 to 12 can be arranged into a 3×4 matrix in either row-major or column-major order: R=(123456789101112),C=(147102581136912) By swapping two entries at a time, at least 8 swaps are needed to transform R to C.
Let S(n,m) be the minimal number of swaps needed to transform an n×m matrix of 1 to nm from row-major order to column-major order. Thus S(3,4)=8.
You are given that the sum of S(n,m) for 2≤n≤m≤100 is 12578833.
Find the sum of S(n4,m4) for 2≤n≤m≤100.