I've got a big fat similarity matrix. The rows and columns represent people, and the values represent some positive measure of their closeness (0 meaning no connection at all). The n-th row and n-th colum corresponds to the same person - thus the matrix is square.
I'm looking for an algorithm to find some permutation of rows/columns such that the resulting matrix has as much "mass" aligned towards the diagonal as possible. The goal is find a matrix so that average closeness of neighbors (neighboring rows/columns) is maximized.
The ultimate goal is to use this as a sort of clustering algorithm.