Rearranging a matrix to get the minimum diagonal

  • Thread starter Dows
  • Start date
  • #1
3
0
Dear all,

I have the following problem: I have a symmetric (non sparse) matrix, and I want to find the permutation of columns and rows that lead to have the smaller numbers in the diagonal.

Anyone has a clue on how to solve efficiently this kind of problems?

Thanks!
 

Answers and Replies

  • #2
2,967
5
if you change rows and the corresponding columns, the same elements remain on the diagonal, don't they?
 
  • #3
3
0
One can change rows and columns independently.
 
  • #4
2,967
5
Define "smallest elements"!
 
  • #5
AlephZero
Science Advisor
Homework Helper
6,994
291
Define "smallest elements"!
It doesn't really matter what property the OP means, provided there is some way to identify the elements you want to put on the diagonal.

This has no solution in general. For example suppose you have a 4x4 matrix and the 4 smallest elements are in the the top left 2x2 submatrix. Any row or column interchange leaves exactly 2 rows and 2 columns containing the smallest values, so you can never separate them onto the diagonal elements of 4 separate rows.

So I conjecture there is no solution unless there is exactly one smallest element in each row and each column, in which case the solution is simple - just permute either the rows or the columns to put the smallest elements on the diagonal. This will destroy the symmetry of the matrix, but the OP said interchanging rows and columns independently was allowed.
 
  • #6
3
0
I tried to explain a smaller problem saying that the matrix is symmetric but maybe it's not helping too much.

So, my specific problem is:
- I have a distance matrix of two sets of elements. The two sets can have different number of elements, so the matrix is only square and symmetric when you are comparing a set with itself.

- I want to stablish a relation of similarity (pairings) between the elements in both sets, so I want to find the permutation of rows and columns that leads to have the smaller distances in the diagonal (minimum).
 
  • #7
2,967
5
My question is this: Which one of these sets is "smaller":
{1, 4, 6}, or {2, 3, 6}
 

Related Threads on Rearranging a matrix to get the minimum diagonal

Replies
1
Views
849
Replies
5
Views
229
Replies
2
Views
980
  • Last Post
Replies
3
Views
917
Replies
1
Views
3K
Replies
5
Views
1K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
1
Views
469
  • Last Post
Replies
2
Views
2K
Replies
3
Views
2K
Top