Sparse Matrix Article Index for
Sparse
Website Links For
Sparse
 

Information About

Sparse Matrix




Sparsity is a concept, useful in Combinatorics and application areas such as Network Theory , of a low density of significant data or connections. This concept is amenable to quantitative reasoning. It is also noticeable in everyday life.

Huge sparse matrices often appear in Science or Engineering when solving problems for linear models.

When storing and manipulating sparse matrices on the Computer , it is often necessary to modify the standard algorithms and take advantage of the sparse structure of the matrix. Sparse data is by its nature easily Compressed , which can yield enormous savings in Memory usage. And more importantly, manipulating huge sparse matrices with the standard algorithms may be impossible due to their sheer size.
The definition of huge depends on the hardware and the Computer Program s available to manipulate the matrix.


DEFINITIONS


Given a sparse ''N''×''M'' matrix ''A'' the row bandwidth for the ''n''-th row is defined as
:b_n(\mathbf{A}) := \mathrm{min}_{1 \le m \le M} \lbrace m \mid a_{n, m}
eq 0 brace

The bandwidth for the matrix is defined as
:B(\mathbf{A}) := \mathrm{max}_{1 \le n \le N} b_n(\mathbf{A})


EXAMPLE


A Bitmap image having only 2 colors, with one of them dominant (say a file that stores a handwritten Signature ) can be encoded as a sparse matrix that contains only row and column numbers for Pixels with the non-dominant color.


STORING A SPARSE MATRIX


  • ''m'') / 8 bytes to represent the matrix when assuming 1 bit for each entry.


A sparse matrix contains many (often mostly) zero entries. The basic idea when storing sparse matrices is to only store the non-zero entries as opposed to storing all entries. Depending on the number and distribution of the non-zero entries, different Data Structure s can be used and yield huge savings in Memory when compared to a naive approach.

One example of such a sparse matrix format is the (old) Yale Sparse Matrix Format {Link without Title} . It stores an initial sparse ''N''×''N'' matrix ''M'' in row form using three arrays, ''A'', ''IA'', ''JA''. ''NZ'' denotes the number of nonzero entries in matrix ''M''.
The array ''A'' then is of length ''NZ'' and holds all nonzero entries of ''M''. The array ''IA'' stores at ''IA(i)'' the position of the first element of row ''i'' in the sparse array ''A''. The length of row ''i'' is determined by ''IA(i+1) - IA(i)''. Therefore ''IA'' needs to be of length ''N'' + 1. In array ''JA'', the column index of the element ''A(j)'' is stored. ''JA'' is of length ''NZ''.


Diagonal matrix

A very efficient structure for a Diagonal Matrix is to store just the entries in the main diagonal as a one dimensional array. For ''n''×''n'' matrix we need only ''n'' / 8 bytes when assuming 1 bit for each entry.


REDUCING THE BANDWIDTH


The Cuthill-McKee Algorithm can be used to reduce the bandwidth of a sparse Symmetric Matrix . There are however matrices for which the Reverse Cuthill-McKee algorithm performs better.

The National Geodetic Survey (NGS) uses Dr. Richard Snay's "Banker's" algorithm because on realistic sparse matrices used in Geodesy work it has better performance.

There are many other methods in use.


REDUCING THE FILL-IN


The fill-in of a matrix are those entries which change from an initial zero to a non-zero value during the execution of an algorithm. To reduce the memory requirements and the number of arithmetic operations used during an algorithm it is useful to minimize the fill-in by switching rows and columns in the matrix. The Symbolic Cholesky Decomposition can be used to calculate the worst possible fill-in before doing the actual Cholesky Decomposition .

There are other methods than the Cholesky Decomposition in use. Orthogonalization methods (such as QR factorization) are common, for example, when solving problems by least squares methods. While the theoretical fill-in is still the same, in practical terms the "false non-zeros" can be different for different methods. And symbolic versions of those algorithms can be used in the same manner as the symbolic Cholesky to compute worst case fill-in.


SEE ALSO




REFERENCES

  • Sparse Matrix Multiplication Package, Randolph E. Bank, Craig C. Douglas {Link without Title}

  • Pissanetzky, Sergio 1984, "Sparse Matrix Technology", Academic Press



FURTHER READING