Getting most non-zero values near diagonal of matrix

  • Context: Undergrad 
  • Thread starter Thread starter Nask
  • Start date Start date
  • Tags Tags
    Matrix
Click For Summary

Discussion Overview

The discussion revolves around optimizing the arrangement of non-zero values in a matrix to position them closer to the diagonal. It includes considerations for both row and column rearrangements and explores potential algorithms suitable for large matrices in practical applications.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents a specific matrix example and suggests that rearranging rows can increase the concentration of non-zero values near the center.
  • The same participant hypothesizes that simultaneous rearrangement of rows and columns could yield even better results.
  • Another participant proposes the Jordan Normal form as a potential method for optimization.
  • A different participant notes that finding an absolutely optimal ordering for large matrices is an unsolved problem and mentions various approximate methods, including matrix bandwidth and profile reduction algorithms.
  • This participant also points out that standard methods typically apply to square matrices and questions the interpretation of "diagonal" in the context of rectangular matrices.
  • The original poster acknowledges the usefulness of the term "bandwidth reduction" for further research and clarifies their definition of the diagonal for non-square matrices.

Areas of Agreement / Disagreement

Participants express differing views on the methods available for optimizing matrix arrangements, with no consensus on a single best approach or algorithm. The discussion remains unresolved regarding the optimal solution for the problem presented.

Contextual Notes

Limitations include the complexity of finding an optimal ordering in a reasonable time frame for large matrices, as well as the ambiguity surrounding the definition of "diagonal" in non-square matrices.

Nask
Messages
2
Reaction score
0
When I have a matrix like this:

0 0 1 0
0 1 0 0
1 0 0 1
0 0 1 1
0 0 0 1

I can get most non zero values in the centre changing only the order of rows

1 0 0 1
0 1 0 0
0 0 1 0
0 0 1 1
0 0 0 1

Probably when I am allowed to change the order of columns and rows at the same time I will even get a better result, getting rid of the 1 in the top-right corner.

Is there an algorithm that can be used to optimise a n by m matrix, having most of its non zero values near its diagonal?

Background:
The columns are the different client orders, the rows the different articles. I like to divide the clients that require a simular set of articles in different groups. The real amount of clients is about 500, articles about 2500, so I need an algorithm that also works for larger matrices (calculation has to be made each day upfront).




Thanks,

Nasko
 
Physics news on Phys.org
The problem of how to find the absolutely "optimal" ordering for a large matrix, in a short enough time to be useful, is an unsolved problem.

There are many approximate methods that will produce "good" but not "perfect" orderings, ranging from quick single-pass methods to complex iterative algorithms. Search for matrix bandwith or profile reduction algorithms used in solving sparse linear equations.

Which method works best depends very much on the "shape" of the matrix. Often several different methods are tried, and the best result is used.

Note: the standard methods only work with square matrices. It is not quite clear what you mean by the "diagonal" of a rectangular matrix. But you should be able to use the basic ideas behind the methods to get what you want.
 
Thanks for both answers. Knowing the term bandwidth reduction helps a lot finding information on internet!


And for the diagonal of a non-square matix.. just the line from the top left to the bottem right... :-)
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
2
Views
2K