# Expected behavior of an algorithm to minimize rankings

Suppose $$n$$ students have preferences over $$n$$ different notebooks. Their preferences can be represented with a square matrix of size $$n$$ where each column is a different permutation of the vector $$[1:n]$$, where the first entry in the column represents the most desirable notebook for student 1, and so on. We are interested in the assignment of the notebooks to students that minimizes the sum of rankings.

For example, such allocation in the problem below

  1    2    2
2    1    3
3    3    1


would be the allocation (1,2,3) with a ranking sum of 1+1+2=4.

My two questions are the following. If the matrix with preferences is chosen uniformly at random, what is the expected sum of rankings in the assignment that minimizes the sum of rankings?

Second, I can answer this question by running a simulation, but is there a known algorithm that efficiently finds the allocation that minimizes the sum of rankings?

Idea: In the best-case scenario, this sum is $$n$$. In the worst-case scenario, where each column is identical, the sum is $$n(n+1)/2$$. The expectation over all possible cases must be somewhere in between.

• Doesn't the allocation 1,2,3 have value 1+1+1=3? – Yuval Filmus Apr 9 at 18:02
• @YuvalFilmus Each column, not row is the preference of one student. – John L. Apr 9 at 18:54
• But $1,2,3$ is the diagonal. – Yuval Filmus Apr 9 at 18:55
• – D.W. Apr 27 at 23:24

Your exact problem has been considered by Parviainen, Random assignment with integer costs — it's his "Case I". Parviainen showed that the expected value is between $$\frac{\pi^2}{6} n$$ and $$2n$$, and his simulation results suggest an intermediate value $$cn$$, where $$c \approx 1.830$$. See also the survey by Krochmal and Pardalos, Random assignment problems.