Suppose we are given a finite square matrix . We would like to factorize
into
(where
is finite) matrices
,
where factors are required to have a certain sparsity pattern, i.e., a subset of their
entries must be zero.
Definition: Let and
. A sparsity pattern
is a set of ordered pairs
that indicate which entries of a
matrix are constrained to be zero.
Note that . If there are no sparsity constraints, then
is an empty set. Set
contains the indices of the entries of a
matrix which are unconstrained, i.e., “free”.
__________
Problem: Given a matrix and a particular sparsity pattern
, how can we find if it is possible to factorize
into
factor matrices (where
is finite) whose sparsity pattern is the specified one? If such factorization is possible, how can we compute each factor
and
?
__________
This problem is easy to pose, but I have found it very hard to attack. I have tried various approaches… and none worked. Does anyone have any ideas?
__________
Example: suppose we are given a real matrix
.
We would like to factorize matrix into
factors
whose sparsity pattern is represented pictorially by
,
where a “” in the
entry means that the
entry is unconstrained, i.e., it is allowed to take any value in
. If you are familiar with numerical PDE’s, you certainly encountered matrices with this sparsity pattern when solving diffusion or wave equations in one spatial dimension using finite difference methods.
__________
Even though this example seems fairly “simple” (it’s only a matrix after all!), I have not yet found an approach that works.
Tags: Mathematics, Matrix Decompositions, Matrix Theory, Sparsity
December 13, 2008 at 13:31 |
Note that the constraint that
must be finite is critical.
For example, the
matrix in the example above
can easily be factored into an infinite number of matrices with the specified sparsity pattern. Consider the following
symmetric, non-negative matrix
Let
be a column vector whose all five entries are ones. Note that
and therefore we can conclude that
is a right eigenvector of matrix
, and that its corresponding eigenvalue is
. It can be shown that
has spectral radius
. Since
is real and symmetric, we have that its eigenvalues are real. Therefore, the largest eigenvalue in absolute value is
, whose corresponding (normalized) eigenvector is
. Since the algebraic multiplicity of
is
, the Jordan block associated with
is
and therefore the limit
should be finite
thus, we could choose factor matrices
,
for all
, such that
We have have thus factored
into an infinite number of factor matrices with the specified sparsity pattern. However, this is not what we are after. We want
to be finite.
December 14, 2008 at 21:24 |
Your example can be factored:
It is easy to generalize to bigger matrices, but I don’t know how to solve the general problem of factoring a general matrix into matrices with a given sparsity pattern.
December 14, 2008 at 22:40 |
Sune,
Tak!! I appreciate you took the time to write a solution. MATLAB says you’re right!
W_3 = [0 1 0 0 0; 0 1 0 0 0; 0 0 1 0 0; 0 0 0 1 0; 0 0 0 1 0]; W_2 = [0 0 0 0 0; 0 0 1 0 0; 0 0 1 0 0; 0 0 1 0 0; 0 0 0 0 0]; W_1 = [0 0 0 0 0; 0 0 0 0 0; 0 1 1 1 0; 0 0 0 0 0; 0 0 0 0 0]; W_0 = [0 0 0 0 0; 1 1 0 0 0; 0 0 1 0 0; 0 0 0 1 1; 0 0 0 0 0]; disp(' W_3 W_2 W_1 W_0 = '); disp(W_3 * W_2 * W_1 * W_0);Would you mind sharing how you got to this solution?
December 15, 2008 at 00:15 |
Det var så lidt!
I used some trial & error to find the example, but I understand why it works: If you multiply
and
you will get:
If you multiply a matrix by
from the left, it will simply copy the 2nd row to the first, and the 4th to the 5th. So
Similarly, if you multiply a matrix from the right by
, it will copy the 2nd column to the first and the 4th to the 5th.
If you want to solve the similar problem for a
matrix, a solution would be:
December 15, 2008 at 04:01 |
I’ve just found out that every
matrix can be factorized into matrices with the above sparsity pattern: To prove this, you only have to prove that every matrix can be reduced to a diagonal matrix using elementary row and column operation, and that the matrices corresponding to the operations can be written as products of matrices with the given sparsity pattern (and of cause that diagonal matrices have the given sparsity pattern). Of cause this generalize to
matrices with a similar sparsity pattern.
However, I do not know how many factors you need. Can any
matrix be factorized into 4 matrices of the above form? And can any nxn matrix be factored into n-1 factors of this form?
December 15, 2008 at 10:32 |
Sune,
A-ha! Row and column operations! How come I didn’t think of it?!
Your solution to my
is very elegant indeed. I really like the symmetry of it, i.e.,
and
, and thus
. The same operations performed on rows are also performed on columns. Beautiful!
Reducing a general
matrix
to a diagonal matrix using elementary row and column operations sounds like a good idea. If I understand that right, what you are saying is that one can perform gaussian elimination on matrix
and reduce it to a diagonal matrix
. In matrix form, these row and column operations are the same as multiplying
on the left and right by elementary gaussian matrices
, i.e.
where the
matrices perform operations on the rows of
, and the
matrices perform operations on the columns of
. Since the elementary gaussian matrices are invertible, we have
Like you wrote, the elementary gaussian matrices
can be written as products of matrices with the given sparsity pattern. Thus, one has factorized
into a finite number of matrices whose sparsity pattern is the desired one.
December 15, 2008 at 11:18 |
Sune,
What if we use elementary row and column operations to reduce matrix
to a matrix which has the desired sparsity pattern, but which is NOT diagonal? I believe that would allow us to obtain a factorization of
with a minimum number of factors
(a sort of “minimal factorization”). Do you agree?
You wrote:
I was not surprised that the solution you proposed had
factors. The reason is that the diameter of this 1-dimensional linear chain with 5 nodes (an undirected graph) is
.
The desired sparsity pattern is “encoded” in the topology of the graph linked above, i.e., if the
entry of a factor matrix is constrained to be zero, then there will be no edge linking nodes
and
. The sparsity pattern in the example is “symmetric”, and thus it’s encoded in the topology of an undirected graph. In general, the desired sparsity pattern is “non-symmetric” and, hence, it is encoded in the topology of a directed graph. The edges have no weights, as all they tell us is whether certain entries of a matrix are free or constrained.
In fact, the adjacency and Laplacian matrices of the 1-dimensional linear chain linked above have the desired sparsity pattern. Note that the graph is connected, and thus, “information” from each node can reach any other node in, at most,
steps (the diameter of the graph).
Suppose we now consider another sparsity pattern, one whose corresponding graph is not connected. Then, I believe that we would never be able to factorize the matrix
in the example in a finite (or even infinite!) number of factors with the desired sparsity pattern. The only matrices we would be able to factorize into a finite number of matrices with the desired sparsity pattern would themselves have some sparsity pattern. This is based on intuition (I haven’t proved anything yet).
This graph-theoretic approach is quite interesting. For example, if there were no sparsity constraints at all, then the graph would be complete.
December 15, 2008 at 12:24 |
Rod,
Well, the product of two elementary matrices may be a sparse matrix: In the above example I copy the 2nd column to the first, and the 4th to the 5th in the same step. So the elementary matrices won’t be a minimal factorization. But I don’t know if you can get a minimal factorization if you multiply some of the elementary matrices.
December 21, 2008 at 01:23 |
Interesting problem. Given an arbitrary matrix and sparsity pattern, it sounds dauntingly NP. What motivates your interest?
December 21, 2008 at 01:43 |
Alex,
Indeed, the general problem sounds quite hard. I started to think of this problem in Spring 2006. At the time I was doing some work on sensor networks and distributed estimation. I remember reading this paper by Stephen Boyd:
Fast Linear Iterations for Distributed Averaging
and wonder if it would be possible to do distributed averaging with time-varying matrices (a sort of a “controlled diffusion” on a graph). This problem naturally leads to the problem of factorizing a matrix into a finite number of factor matrices which have a certain sparsity pattern.
June 10, 2009 at 19:42 |
It seems that a sparsity constraint
is universal (allows factoring of any matrix) if and only it it has the following two properties:
- There is a permutation matrix
that verifies the sparsity constraint.
- Some power of the matrix
with one at each entry allowed by the constraint and zero elsewhere has all entries strictly positive.
I could have a constructive proof…
We note that both conditions are rather easy to check.
The smallest factorization of a matrix can in some cases be quadratic in the size of the matrix. Take for example as constraint for odd size
, with free entries at
,
and
for
. The constraint is universal, but obtaining the matrix with ones at
and
and zero elsewhere demands a long factorization
.
In general, the number of elementary matrices you need to factorize a matrix is in
.