Abstract
We present algorithms to determine the number of nonzeros in each row and column of the factors of a sparse matrix, for both the QR factorization and the LU factorization with partial pivoting. The algorithms use only the nonzero structure of the input matrix, and run in time nearly linear in the number of nonzeros in that matrix. They may be used to set up data structures or schedule parallel operations in advance of the numerical factorization.
The row and column counts we compute are upper bounds on the actual counts. If the input matrix is strong Hall and there is no coincidental numerical cancellation, the counts are exact for QR factorization and are the tightest bounds possible for LU factorization.
These algorithms are based on our earlier work on computing row and column counts for sparse Cholesky factorization, plus an efficient method to compute the column elimination tree of a sparse matrix without explicitly forming the product of the matrix and its transpose.
Similar content being viewed by others
REFERENCES
C. C. Ashcraft, R. G. Grimes, J. G. Lewis, B. W. Peyton, and H. D. Simon. Progress in sparse matrix methods for large linear systems on vector supercomputers. Internat. J. Supercomputer Appl., 1:4 (1987), pp. 10–30.
T. F. Coleman, A. Edenbrandt, and J. R. Gilbert. Predicting fill for sparse orthogonal factorization. J. ACM, 33 (1986), pp. 517–532.
J. W. Demmel, S. C. Eisenstat, J. R. Gilbert, X. S. Li, and J. W. H. Liu. A supernodal approach to sparse partial pivoting. SIAM J. Matrix Anal. Appl., 20:3 (1999), pp. 720–755.
J. W. Demmel, J. R. Gilbert, and X. S. Li. An asynchronous parallel supernodal algorithm for sparse Gaussian elimination. SIAM J. Matrix Anal. Appl., 20:4 (1999), pp. 915–952.
I. S. Duff. Algorithm 575.Permutations for a zero-free diagonal. ACMTrans.Math. Software, 7 (1981), pp. 387–390.
I. S. Duff. On algorithms for obtaining a maximum transversal. ACM Trans. Math. Software, 7 (1981), pp. 315–330.
I. S. Duff, A. M. Erisman, and J. K. Reid. Direct Methods for Sparse Matrices. Oxford University Press, Oxford, England, 1987.
I. S. Duff and T. Wiberg. Implementations of O(n 1/2 ? ) assignment algorithms. ACM Trans.Math.Software, 14 (1988), pp. 267–287.
A. George, J. R. Gilbert, and J. W. H. Liu. Graph Theory and Sparse Matrix Computation. Springer-Verlag, Berlin, 1993.
A. George and M. T. Heath. Solution of sparse linear least squares problems using Givens rotations. Linear Algebra Appl., 34 (1980), pp. 69–83.
A. George and J. W. H. Liu. Computer Solution of Large Sparse Positive Definite Systems. Prentice-Hall, Englewood Cliffs, NJ, 1981.
A. George, J. W. H. Liu, and E. G. Ng. A data structure for sparse QR and LU factors. SIAM J. Sci. Statist. Comput., 9 (1988), pp. 100–121.
A. George and E. G. Ng. Symbolic factorization for sparse Gaussian elimination with partial pivoting. SIAM J. Sci. Statist. Comput., 8 (1987), pp. 877–898.
J. R. Gilbert, C. Moler, and R. Schreiber. Sparse matrices in Matlab: Design and implementation. SIAM J. Matrix Anal. Appl., 13 (1992), pp. 333–356.
J. R. Gilbert and E. G. Ng. Predicting structure in nonsymmetric sparse matrix factorizations. In A. George et al. [9].
J. R. Gilbert, E. G. Ng, and B. W. Peyton. An efficient algorithm to compute row and column counts for sparse Cholesky factorization. SIAM J. Matrix Anal. Appl., 15 (1994), pp. 1075–1091.
D. Hare, C. Johnson, D. Olesky, and P. van den Driessche. Sparsity analysis of the QR factorization. SIAM J. Matrix Anal. Appl., 14 (1993), pp. 665–669.
X. S. Li. Sparse Gaussian elimination on high performance computers, Ph.D. Thesis, Technical Report UCB//CSD-96-919, Computer Science Division, U. C. Berkeley, CA, September 1996.
J. W. Liu. A compact row storage scheme for Cholesky factors using elimination trees. ACM Trans. Math. Software, 12 (1986), pp. 127-148.
J. W. H. Liu. The role of elimination trees in sparse factorization. Technical Report CS-87-12, Dept. of Computer Science, York University, Canada, 1987. (This is a longer version of Liu[21 ].)
J. W. H. Liu. The role of elimination trees in sparse factorization. SIAMJ. Matrix Anal. Appl., 11 (1990), pp. 134-172.
J.W. H. Liu, E. G. Ng, and B. W. Peyton. On finding supernodes for sparse matrix computations. SIAM J. Matrix Anal. Appl., 14 (1993), pp. 242-252.
E. G. Ng and B. W. Peyton. Block sparse Cholesky algorithms on advanced uniprocessor computers. SIAM J. Sci. Comput., 14 (1993), pp. 1034-1056.
E. G. Ng and B. W. Peyton. Some results on structure prediction in sparse QR factorization. SIAM J. Matrix Anal. Appl., 17 (1996), pp. 443-459.
A. Pothen and C. J. Fan. Computing the block triangular form of a sparse matrix. ACM Trans. Math. Software, 16 (1990), pp. 303-324.
R. Schreiber. A new implementation of sparse Gaussian elimination. ACM Trans. Math. Software, 8 (1982), pp. 256-276.
R. E. Tarjan. Efficiency of a good but not linear set union algorithm. J.ACM, 22 (1975), pp. 215-225.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Gilbert, J.R., Li, X.S., Ng, E.G. et al. Computing Row and Column Counts for Sparse QR and LU Factorization. BIT Numerical Mathematics 41, 693–710 (2001). https://doi.org/10.1023/A:1021943902025
Issue Date:
DOI: https://doi.org/10.1023/A:1021943902025