SYMBOLIC AND EXACT STRUCTURE PREDICTION FOR SPARSE GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING

Similar documents
1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

Scientific Computing

Lecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)

Linear Equations in Linear Algebra

Direct Methods for Solving Linear Systems. Matrix Factorization

AMS 209, Fall 2015 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

Dense LU factorization and its error analysis

Preliminaries and Complexity Theory

This can be accomplished by left matrix multiplication as follows: I

Math 775 Homework 1. Austin Mohr. February 9, 2011

Linear Algebra March 16, 2019

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

A Review of Matrix Analysis

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

Matrix Factorization and Analysis

Lecture 2 INF-MAT : , LU, symmetric LU, Positve (semi)definite, Cholesky, Semi-Cholesky

5.6. PSEUDOINVERSES 101. A H w.

Chapter Contents. A 1.6 Further Results on Systems of Equations and Invertibility 1.7 Diagonal, Triangular, and Symmetric Matrices

MATH 3511 Lecture 1. Solving Linear Systems 1

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

On the adjacency matrix of a block graph

LU Factorization with Panel Rank Revealing Pivoting and Its Communication Avoiding Version

V C V L T I 0 C V B 1 V T 0 I. l nk

A Note on Perfect Partial Elimination

Gaussian Elimination and Back Substitution

CS 219: Sparse matrix algorithms: Homework 3

Numerical Linear Algebra

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects

Intrinsic products and factorizations of matrices

CHAPTER 6. Direct Methods for Solving Linear Systems

Acyclic Digraphs arising from Complete Intersections

2 Generating Functions

Linear Equations and Vectors

The Solution of Linear Systems AX = B

c 2013 Society for Industrial and Applied Mathematics

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

Linear Algebraic Equations

STAT 309: MATHEMATICAL COMPUTATIONS I FALL 2018 LECTURE 13

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Practical Linear Algebra: A Geometry Toolbox

Math 471 (Numerical methods) Chapter 3 (second half). System of equations

Linear Systems of n equations for n unknowns

Pivoting. Reading: GV96 Section 3.4, Stew98 Chapter 3: 1.3

Chapter 1 Matrices and Systems of Equations

Lecture Summaries for Linear Algebra M51A

Linear Systems and Matrices

Fundamentals of Engineering Analysis (650163)

0.1. Linear transformations

MODULE 7. where A is an m n real (or complex) matrix. 2) Let K(t, s) be a function of two variables which is continuous on the square [0, 1] [0, 1].

Sparse linear solvers

ACI-matrices all of whose completions have the same rank

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 6

ACYCLIC DIGRAPHS GIVING RISE TO COMPLETE INTERSECTIONS

Sign Patterns with a Nest of Positive Principal Minors

MAT Linear Algebra Collection of sample exams

Minimum number of non-zero-entries in a 7 7 stable matrix

Chapter 7. Tridiagonal linear systems. Solving tridiagonal systems of equations. and subdiagonal. E.g. a 21 a 22 a A =

RECAP How to find a maximum matching?

Chapter 3 - From Gaussian Elimination to LU Factorization

Orthonormal Transformations

Linear Equations in Linear Algebra

Numerical Linear Algebra

Solving Linear Systems Using Gaussian Elimination

Bidiagonal decompositions, minors and applications

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

Matrices and Systems of Equations

Math 502 Fall 2005 Solutions to Homework 3

4 Elementary matrices, continued

Linear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey

CPE 310: Numerical Analysis for Engineers

Review Questions REVIEW QUESTIONS 71

Solution of Linear Equations

MTH 464: Computational Linear Algebra

MAT 2037 LINEAR ALGEBRA I web:

7 Matrix Operations. 7.0 Matrix Multiplication + 3 = 3 = 4

Algebraic Methods in Combinatorics

Necessary And Sufficient Conditions For Existence of the LU Factorization of an Arbitrary Matrix.

5.1 Banded Storage. u = temperature. The five-point difference operator. uh (x, y + h) 2u h (x, y)+u h (x, y h) uh (x + h, y) 2u h (x, y)+u h (x h, y)

Sparsity. The implication is that we would like to find ways to increase efficiency of LU decomposition.

OHSx XM511 Linear Algebra: Solutions to Online True/False Exercises

CALU: A Communication Optimal LU Factorization Algorithm

Central Groupoids, Central Digraphs, and Zero-One Matrices A Satisfying A 2 = J

14.2 QR Factorization with Column Pivoting

The matrix will only be consistent if the last entry of row three is 0, meaning 2b 3 + b 2 b 1 = 0.

Ack: 1. LD Garcia, MTH 199, Sam Houston State University 2. Linear Algebra and Its Applications - Gilbert Strang

LU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b

POLI270 - Linear Algebra

On certain integral Schreier graphs of the symmetric group

Linear Algebra (part 1) : Matrices and Systems of Linear Equations (by Evan Dummit, 2016, v. 2.02)

ACO Comprehensive Exam March 17 and 18, Computability, Complexity and Algorithms

Arithmetic Progressions with Constant Weight

COUNCIL ROCK HIGH SCHOOL MATHEMATICS. A Note Guideline of Algebraic Concepts. Designed to assist students in A Summer Review of Algebra

Orthonormal Transformations and Least Squares

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

Homework 2 Foundations of Computational Math 2 Spring 2019

Determinants of Partition Matrices

Transcription:

SYMBOLIC AND EXACT STRUCTURE PREDICTION FOR SPARSE GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING LAURA GRIGORI, JOHN R. GILBERT, AND MICHEL COSNARD Abstract. In this paper we consider two structure prediction problems of interest in Gaussian elimination with partial pivoting of sparse matrices. First, we consider the problem of determining the nonzero structure of the factors L and U during the factorization. We present an eact prediction of the structure, that identifies some numeric cancellations appearing during Gaussian elimination. The numeric cancellations are related to submatrices of the input matri A that are structurally singular, that is, singular due to the arrangements of their nonzeros, and independently of their numerical values. Second, we consider the problem of estimating upper bounds for the structure of L and U prior to the numerical factorization. We present tight eact bounds for the nonzero structure of L and U of Gaussian elimination with partial pivoting P A = LU under the assumption that the matri A satisfies a combinatorial property, namely the Hall property, and that the nonzero values in A are algebraically independent from each other. This complements eisting work showing that a structure called the row merge graph represents a tight bound for the nonzero structure of L and U under a stronger combinatorial assumption, namely the strong Hall property. We also show that the row merge graph represents a tight symbolic bound for matrices satisfying only the Hall property. Key words. sparse LU factorization, partial pivoting, structure prediction, characterization of fill. AMS subject classifications. 6F0, 6F0, 68R0. Introduction. In this paper we consider the problem of structure prediction when solving a linear system A = b by Gaussian elimination with partial pivoting, where A is an n n sparse, nonsingular, and nonsymmetric matri and b is an n- vector. This elimination, also called LU factorization, involves eplicit factorization of the matri A into the product of L and U, where L is a unit lower triangular matri and U is an upper triangular matri. One of the main characteristics of the sparse LU factorization is the notion of fill. Fill denotes a nonzero entry in the factors, that was a zero in matri A. When Gaussian elimination without pivoting is used, the nonzero structure of the factors can be computed without referring to the numerical values of the matri, and is determined before performing the numerical computation of the factors itself. Knowledge of this structure is used to allocate memory, set up data structures, schedule parallel tasks and save time [8] by avoiding operations on zeros. When pivoting is used for numerical stability [], the structure of L and U depends not only on the structure of A, but also on the row interchanges. As the row interchanges are determined while doing the numerical factorization, the computation of the structure of the factors has to be interleaved with the computation of the numerical values of the factors. Prior to the numerical factorization, only upper bounds of the structure of L and U can be determined. We discuss in this paper two structure prediction problems. The first problem considers the computation of the nonzero structure of the factors during Gaussian elimination with row interchanges. The second problem is to obtain tight bounds of INRIA Saclay - Ile-de-France, Laboratoire de Recherche en Informatique, Paris-Sud University, Bat 90, 90 Orsay, France. (Laura.Grigori@inria.fr). Computer Science Department, University of California at Santa Barbara, CA 906-0. (gilbert@cs.ucsb.edu). INRIA Sophia Antipolis, 00 route des Lucioles BP9, 0690 Sophia Antipolis, France. (Michel.Cosnard@inria.fr)

L. GRIGORI, J. R. GILBERT AND, M. COSNARD the structure of L and U prior to the numerical factorization. For both problems, we study relations between the combinatorial properties of the nonzero structure of the matri A and the LU factorization. Two kinds of structure prediction and two combinatorial properties of the input matri are usually considered for these problems. The two structure predictions are called symbolic and eact []. Symbolic structure prediction assumes that the addition or subtraction of two nonzero results always yields a nonzero result. It ignores possible numeric cancellations occurring during the LU factorization. Eact structure prediction assumes that the nonzero values in A are algebraically independent from each other; in other words, it assumes that any computed zero is due to combinatorial properties of the nonzero structure. The two combinatorial properties of the input matri are called strong Hall property and Hall property. The strong Hall property is an irreducibility condition. The Hall property is a weaker combinatorial assumption and is related to matrices with full-column rank. We will define these two properties in more detail later in the paper. A matri that satisfies the Hall property can be decomposed using the Dulmage Mendelsohn decomposition [, 9, ] into a block upper triangular form, such that every block on the diagonal satisfies the strong Hall property. However, in practice this decomposition is not always used, and hence it is interesting to understand the structure prediction for matrices satisfying either the strong Hall property or only the Hall property. Many researches aimed at predicting the structure and bounds of the factors L and U as tightly as possible [0,,,, ]. The eisting results for determining the nonzero structure of L and U during Gaussian elimination with partial pivoting P A = LU are symbolic []. Under several additional conditions, this structure prediction is eact []. But in general, it ignores possible numeric cancellations during the factorization, for matrices satisfying the strong Hall property or only the Hall property. For the problem of predicting bounds for the structure of L and U prior to the numerical factorization, the eisting results in the literature assume that A satisfies the strong Hall property. The results assume the LU factorization with partial pivoting is seen as A = P L P L... P n L n U where P i is an n n elementary permutation matri identifying the row interchanges at step i. L i is an n n elementary lower triangular matri whose i-th column contains the multipliers at step i. U is an n n upper triangular matri. L is the n n matri whose i-th column is the i-th column of L i, so that L I = i (L i I). Note that this L is not the same as the factor L obtained from the factorization PA = LU. Both matrices are unit lower triangular, and they contain the same nonzero values but in different positions. The factor L has its rows in the order described by the entire row permutations. The factor L has the rows of its i-th column in the order described by only the first i row interchanges. George and Ng [0] predict an upper bound of the nonzero structure of L and U, called the row merge graph, that contains the nonzeros in L and U for all possible row permutations which can later appear in the numerical factorization due to pivoting. Gilbert and Ng [] showed that this is a tight eact bound for a square matri with nonzero diagonal which satisfies the strong Hall property. In this paper we provide answers to several open questions related to the two structure prediction problems considered here. For the first problem, we identify eact structure prediction of L and U during LU factorization with partial pivoting. For the second problem, we describe eact bounds of the factors obtained from the

STRUCTURE PREDICTION IN GAUSSIAN ELIMINATION factorization PA = LU, when the matri A satisfies only the Hall property. These eact bounds are not symbolic bounds. We show then that the row merge graph represents symbolic bounds for the structure of L and U. The eact structure prediction is based on the following approach. All the elements of the factors L and U can be computed using the determinants of two submatrices of the input matri A (see for eample Gantmacher [9]). Consider for eample the element in position (i, j) of U, where i and j are two indices with i j. Let A i be the submatri of A formed by the first (i ) columns and the first (i ) rows of A. Let K be the i i submatri of A that includes the first i rows and the first i columns and column j of A. Then the value in position (i, j) of the factor U is given by the quotient of the determinant of K and the determinant of A i. A similar relation eists for the elements of L. Our new results identify when the submatri K is structurally singular, that is, singular due to the arrangements of its nonzeros, and independently of the numerical values. In eact arithmetic, the determinant of K is zero, and hence the element in position (i, j) corresponds to a numeric cancellation. This numeric cancellation is identified in our new results on eact structure prediction. However, in a backward stable factorization A+E = ˆLÛ, the computed factors ˆL and Û are not necessarily close to the eact A = LU factors, even though the norm of E is small. In particular, a zero in L or U may, in principle, be large in ˆL or Û, so rounding it to zero may cause backward instability. The rest of the paper is organized as follows. In section we present background and several new results used throughout the paper. In section we consider the problem of determining the nonzero structure of the factors L and U during Gaussian elimination with partial pivoting. We present new results that give an eact characterization of the fill occurring in the LU factorization. We show how the theoretical results can be used in an algorithm for computing fill-ins. In sections and we consider the problem of predicting bounds for the structure of L and U prior to the numerical factorization. In section we present an eact analysis for matrices that satisfy the Hall property. We present tight eact bounds for the nonzero structure of L and U of Gaussian elimination with partial pivoting PA = LU. In section we present a symbolic analysis, and we show that the row merge graph is a lower symbolic bound for the factors L and U of the factorization A = P L P L... P n L n U. In other words, for every edge of the row merge graph of a Hall matri, there is a permutation such that this edge corresponds to a symbolic nonzero in L or U. By a simple countereample, we will show that the row merge graph is not a tight bound for the factors L and U in the eact sense. These results are of practical interest, since the row merge graph is used by several solvers implementing the sparse LU factorization with partial pivoting. In solvers like the sequential and shared memory versions of SuperLU [, 6], the row merge graph is used to estimate the memory needs prior to the LU factorization. In solvers proposed in [0, ], the numerical computation of the factors L and U is performed on the row merge graph, and some operations involve zero elements. Finally, section 6 presents concluding remarks.. Graphs of matrices and their properties. In this section we provide the necessary notions to study the structure prediction of the sparse LU factorization with partial pivoting. We give definitions, previously published results and two new results (Lemma.6 and Lemma.7) that are needed by our subsequent proofs. Let A be a sparse n n matri. A ij denotes the element at row i and column j of A. We refer to the determinant of matri A as det(a). We denote the submatri

L. GRIGORI, J. R. GILBERT AND, M. COSNARD of A formed by elements of row indices from i to j and column indices from d to e as A(i: j, d: e). When the indices are not consecutive, we use the following notation: A([i: j, k], d: e) denotes the submatri of A formed by elements of row indices from i to j and k and column indices from d to e. We refer to the submatri A(: i, : i) as the principal minor of order i of A. Two graphs are used to predict the nonzero structure of the factors L and U from the structure of A. The first graph is the directed graph of A and is denoted G(A). This graph has n vertices and an edge i, j for each nonzero element A ij. We say that the edge i, j is incident on the vertices i and j. The second graph is the bipartite graph of A, denoted H(A). This graph is undirected and has n row vertices, n column vertices, and an edge i, j if and only if the element A ij is nonzero. Note that whenever possible, we use prime to distinguish between row vertices and column vertices in a bipartite graph. Also, we use i, j, k, d, e to denote a verte of H for which it is known if it is a column or a row verte. That is, i stands for a row verte and i for a column verte. We use v and w to denote a generic verte of H, that is a verte that can be a row verte or a column verte. A path is a sequence of distinct vertices Q = (v 0, v,...,v q, v q ) such that for each two consecutive vertices v i, v i+ there is an edge from v i to v i+. The length of this path is q. The vertices v,...,v q are called intermediate vertices. Let H be a bipartite graph with m row vertices and n column vertices. A matching M on H is a set of edges, no two of which are incident on the same verte. A verte is covered or matched by M if it is an endpoint of an edge of M. A matching is called column-complete if it has n edges, row-complete if it has m edges, perfect if m = n and it is both row- and column-complete. Given a graph H and a column verte i, we denote by H i the subgraph of H induced by all the row vertices and all the column vertices ecept i. The net lemma identifies a matching in the bipartite graph H of A, such that if the edges of M become the diagonal elements, the values chosen make the permuted matri strongly diagonally dominant. It will be used in section to prove our results on eact structure prediction for Hall matrices. Lemma. (Gilbert and Ng []). Suppose the bipartite graph H has a perfect matching M. Let A be a matri with H(A) = H, such that A ij > n for i, j M and 0 < A ij < for i, j / M. If A is factored by Gaussian elimination with partial pivoting, then the edges of M will be the pivots. If M is a matching on H, an alternating path with respect to M is a path on which every second edge is an element of M. A c-alternating path is a path that follows matching edges from rows to columns. An r-alternating path is a path that follows matching edges from columns to rows. Suppose the last verte of one c-alternating path is the first verte of another c-alternating path. The path obtained by their concatenation is also a c-alternating path. Same result holds for r-alternating paths. Suppose Q is an alternating path from an unmatched verte v to a different verte w. If the last verte w on Q is unmatched, or the last edge on Q belongs to M, then a new matching M can be obtained from M by alternating along path Q. The set of edges of M is given by M Q = (M Q) (M Q). If w is matched by M, then v is matched and w is unmatched by M, and M = M. If w is unmatched by M, then both v and w are matched by M, and M = M +, and Q is called an augmenting path with respect to M... Hall and strong Hall graphs. We briefly review the Hall and strong Hall properties and related results. For a detailed description of Hall and strong Hall

STRUCTURE PREDICTION IN GAUSSIAN ELIMINATION matrices and their properties, the reader is directed to [,, ]. A bipartite graph with m rows and n columns has the Hall property if every set of k column vertices is adjacent to at least k row vertices, for all k n. The net theorem and corollary relates the Hall property to column-complete matchings and matrices with full-column rank. In Corollary. [] it is shown that if H is Hall and given a matri A with H = H(A), then the set of ways to fill in its values to make it singular has measure zero. Hence almost all matrices A with H = H(A) have full column rank. Theorem. (Hall s Theorem). A bipartite graph has a column-complete matching if and only if it has the Hall property. Corollary. (Gilbert, Ng []). If a matri A has full column rank, then H(A) is Hall. Conversely, if H is Hall then almost all matrices A with H = H(A) have full column rank. Known results in structure prediction were obtained under an additional assumption, called the strong Hall property. A bipartite graph with m rows and n m columns satisfies the strong Hall property if (i) m = n > and every set of k column vertices is adjacent to more than k row vertices, for all k < n, or (ii) m > n and every set of k column vertices is adjacent to more than k row vertices, for all k n. Lemma. (Gilbert and Ng []). If H is strong Hall and has more nonzero rows than columns, and M is any column-complete matching on H, then from every row or column verte v of H there is a c-alternating path to some unmatched row verte i (which depends on v and M). The net theorem relates alternating paths and matchings in strong Hall graphs. This theorem was used in several structure prediction results, in the contet of sparse LU factorization by Gilbert and Ng in [], as well as in the sparsity analysis of QR factorization by Coleman, Edenbrandt, Gilbert in [] and Hare, Johnson, Olesky and van den Driessche in [7]. In this paper, we will use it in Lemma.6 to derive a new result on alternating paths and matchings in strong Hall graphs. Theorem. (Alternating Paths, Gilbert []). Let H be a strong Hall graph with at least two rows, let i be a column verte of H, and let v be any row or column verte of H such that a path eists from i to v. Then H has a column complete matching relative to which there eists a c-alternating path from i to v (or, equivalently, an r-alternating path from v to i). The net lemma is new. Given a path in a bipartite graph H between a column verte and a row verte or between two row vertices, the lemma shows that there is an alternating path with respect to a column complete matching of H which ecludes a row verte at the etremity of the path. We will use it in sections and to estimate the nonzero structure of the factors L and U. Lemma.6. Let H be a strong Hall graph with more nonzero rows than columns, let v be a row or column verte of H, and let i be any row verte of H such that a path eists from v to i. Then H has a column complete matching which ecludes verte i and relative to which there eists a c-alternating path from v to i. Proof. We distinguish two different cases. Case : v is a column verte. By hypothesis there is a path from v to i. As H is strong Hall, the Alternating Path Theorem. applies, and says that H has a column complete matching M relative to which there eists a c-alternating path P from v to i. If i is not covered by M, then M is the column complete matching

6 L. GRIGORI, J. R. GILBERT AND, M. COSNARD searched. Otherwise, Lemma. implies that there is an unmatched row verte k and a c-alternating path Q from i to k. Now obtain matching M from M by alternating along path Q, where i is unmatched in M. If P and Q have no vertices in common (ecept row verte i ), then P is still c-alternating from v to i with respect to M. If the only verte in common of P and Q (ecept row verte i ) is column verte v, then let e be the row verte matched by M to v that belongs to the path Q. The path formed by v, e followed by Q[e : i ] is c-alternating with respect to M. If P and Q have intermediate vertices in common, let d be the first (row) verte of P (starting from v) which belongs to Q. The path obtained by the concatenation of P[v: d ] and Q[d : i ] is c-alternating with respect to M, and this ends the proof for this case. This case is illustrated in Figure.. v d i k v d i k Fig... Case of Lemma.6. In the upper graph, the solid edges are the matching M; path P is the horizontal path from v to i ; path Q is the light dotted line from i to k. In the lower graph, the solid edges are the matching M. The path obtained by concatenating P[v: d ] and Q[d : i ] is c-alternating with respect to M. Case : v is a row verte. We denote the row verte v as v. By hypothesis, there is a path from v to i. Suppose v i, otherwise there is nothing to prove. Let d be the first column verte on this path, that is the net verte after v. H is a strong Hall graph that has a path from column verte d to row verte i. The first case of this theorem, that we have just proved, says that there is a column complete matching M that ecludes verte i and relative to which there eists a c-alternating path P from d to i. We distinguish four cases: Case.: v is not matched by M. Let e be the row verte matched by M to the column verte d. We obtain a new matching M by unmatching row verte e and matching row verte v to row verte d. The path formed by v, d followed by P is c-alternating from v to i with respect to M. Note that M ecludes row verte i, and this is the path searched. Case.: v is matched by M to the column verte d. The path obtained by v, d followed by P is c-alternating from v to i with respect to the matching M, and the matching M ecludes row verte i. Case.: v is matched by M and belongs to the path P. Then P[v : i ] is a c-alternating path with respect to the matching M. Case.: v is matched by M to a different column verte than d and does not belong to the path P. Lemma. applies and says that there is an unmatched row verte j and a c-alternating path R from v to j.

STRUCTURE PREDICTION IN GAUSSIAN ELIMINATION 7 If P and R have no vertices in common, then obtain matching M from M by alternating along path R. As v is matched in M, then v is unmatched in M and j is matched in M. From here we proceed as in Case. and we obtain a matching that ecludes verte i and with respect to which there is a c-alternating path from v to i. If P and R have at least one verte in common, then let k be the last verte of P (starting from d) which belongs to R. Note that k has to be a column verte. The path obtained by concatenating R[v : k] and P[k: i ] is c-alternating with respect to M, M ecludes the row verte i, and this ends the proof. This case is illustrated in Figure.. i k d v j Fig... Case. of Lemma.6. The solid edges are the matching M; path P is the horizontal path from i to d; path R is the light dotted line from v to j. Here, P and R have at least one common verte. Verte k is the last verte on P (starting from d) that belongs to R. The path obtained by concatenating R[v : k] and P[k:i ] is c-alternating with respect to M and M ecludes row verte i... Hall sets and their properties. For a bipartite graph H with m row vertices and n m column vertices, a set of k column vertices, k n forms a Hall set if these columns are adjacent to eactly k rows [7]. Under the assumption that A satisfies the Hall property, the union of two Hall sets is a Hall set, so there eists a unique Hall set of maimum cardinality in any given set of columns. The set of maimum cardinality might be empty. Let C j be the Hall set of maimum cardinality in the first j columns; we define C 0 = ). Let R j be the set of all row indices covered by the columns of C j ; thus C j and R j have the same cardinality. Note that if we assume all diagonal entries of A are nonzero, then R j = {i : i j and i C j }. The Hall sets of maimum cardinality are useful to partition a Hall graph into two subgraphs, one that satisfies the Hall property and another one that satisfies the strong Hall property. Let H be a bipartite graph with m row vertices and n < m column vertices, that satisfies the Hall property. Let C be the Hall set of maimum cardinality in H and let R be the set of row vertices covered by column vertices of C. The first subgraph H is induced by all the row vertices in R and all the column vertices in C. This subgraph satisfies the Hall property. The second subgraph Ĥ is induced by all the row vertices ecept those in R and all the column vertices ecept those in C. This subgraph is strong Hall because its Hall set of maimum cardinality is empty. In a similar way, we can partition the edges of a column complete matching M of H into edges belonging to the graph H and edges belonging to the graph Ĥ. This is epressed in a more general way in the following lemma. Lemma.7. Let A be an m n Hall matri, m n. Let C be a Hall set of cardinality p in A, where p n, and let R be the set of all row indices covered by

8 L. GRIGORI, J. R. GILBERT AND, M. COSNARD the columns of C. Suppose M is a column-complete matching in the bipartite graph H(A). Then each column verte j of C is matched by M to a row verte i of R. Proof. Immediate.. Nonzero structure of L and U during Gaussian elimination with partial pivoting. Let A be an n n nonsingular matri. In this section we consider the problem of determining the nonzero structure of the factors L and U during Gaussian elimination with partial pivoting. In the first part of this section we consider the LU factorization without pivoting. We first present a brief overview of several wellknown results described in the literature. Then we describe why these results ignore numeric cancellations related to submatrices of A that are structurally singular. In section. we present new results that identify some numeric cancellation occurring during Gaussian elimination and caused by submatrices of A that are structurally singular. In section. we describe how the new results can be used in the Gaussian elimination with partial pivoting. We also present an algorithm that uses the new results to compute the nonzero structure of the factors L and U. The main result in the structure prediction of Gaussian elimination without pivoting is the Fill Path Lemma.. This lemma relates paths in the directed graph G(A) and the nonzero elements that appear in the factors L and U, represented in the so called filled graph G + (A). Lemma. (Fill Path: Rose, Tarjan, and Lueker []). Let G be a directed or undirected graph whose vertices are the integers through n, and let G + be its filled graph. Then i, j is an edge of G + if and only if there is a path in G from i to j whose intermediate vertices are all smaller than min(i, j). The filled graph G + (A) represents a symbolic bound for the factors L and U, that is, it ignores possible numeric cancellation during the factorization. The net lemma represents an eample of conditions under which this structure prediction is eact, by taking into account the values of the nonzeros in the matri. In this lemma, a square Hall submatri of A denotes a square submatri of A which satisfies the Hall property, and which is formed by a subset of rows and columns of A that can be different and non-contiguous. Lemma. (Gilbert and Ng []). Suppose A is square and nonsingular, and has a triangular factorization A = LU without pivoting. Suppose also that all the diagonal elements of A ecept possibly the last one are nonzero, and that every square Hall submatri of A is nonsingular. Then G(L + U) = G + (A); that is, every nonzero predicted by the filled graph of A is actually nonzero in the factorization. We are interested in fill when the diagonal may contain zeros (perhaps due to pivoting), but Lemma. does not hold in this case. An eample showing this was given by Brayton, Gustavson and Willoughby []. We give a slightly different eample in Figure., where we display a matri A, its bipartite graph H(A) and its directed graph G(A). Note that H(A) satisfies the strong Hall property. Since there is a path from to through lower numbered vertices in G(A), the edge, belongs to the filled graph G + (A), but L = 0 regardless of the nonzero values of A. That is because after the first step of elimination, the elements in column positions and of the rows and are linearly dependent. At the second step of elimination the element L is zeroed. A simpler way of understanding this numeric cancellation is to consider the two submatrices A([:, ], : ), A(:, : ) and their determinants that determine the value of L. The submatri A([:, ], : ) (displayed in light gray in Figure.) has three columns (, and ) with nonzero elements in only two rows ( and ). This

STRUCTURE PREDICTION IN GAUSSIAN ELIMINATION 9 submatri does not satisfy the Hall property, and its determinant is zero. This is the approach we use to identify some numeric cancellations in the LU factorization. A H(A) G(A) Fig... Eample showing that the Fill Path Lemma. does not predict eactly the nonzero structure of L and U when factorizing without pivoting the strong Hall matri A. Details are given in the tet following Lemma.. The following lemma describes the above observation. Assuming that the LU factorization eists, this lemma relates the value of an element of the factors L and U to the singularity of a submatri of A. Lemma. (Gilbert and Ng []). Suppose A is square and nonsingular, and has a triangular factorization A = LU without pivoting. Let i be a row inde and j a column inde of A and let B be the submatri of A consisting of rows through min(i, j) and i, and columns through min(i, j) and j. Then (L + U) ij is zero if and only if B is singular... New results. Theorem. is the first new result of this section, and provides necessary and sufficient conditions, in terms of paths in the bipartite graph H(A), for a fill element to occur in eact arithmetic during Gaussian elimination. It is illustrated in Figure. and Figure.. Consider the nonzero structure of L. Suppose that the factorization eists until the step j of factorization, that is the principal minor of order j is nonzero. The theorem uses the fact that L ij is nonzero if and only if the determinant of the submatri A([: j, i], : j) is nonzero. Theorem.. Let A be an n n nonsingular matri, that has a triangular factorization A = LU. Suppose that every square Hall submatri of A is nonsingular. Let i be a row of A, j be a column of A and k = min(i, j). Let M k be a perfect matching of A(: k, : k). Let C ki be the Hall set of maimum cardinality in H(A([: k, i], : k)) and R ki be the set of all row indices covered by columns of C ki. Then the following three statements are equivalent:. (L + U) ij is nonzero.. There is an r-alternating path in the bipartite graph H(A) from row verte i to column verte j with respect to the matching M k.. There is a path in the bipartite graph H(A) from i to j whose intermediate vertices are smaller or equal than k and that has no verte in C ki R ki. Proof. Let A k be the leading (k k) principal submatri of A and det(a k ) its determinant. As we suppose the factorization eists, det(a k ) is nonzero. This implies that A k satisfies the Hall property, and has a perfect matching M k. The matching M k represents also a column complete matching in the graph H(A([: k, i], : k)). Lemma.7 applies with respect to the graph H(A([: k, i], : k)) and the Hall set C ki and says that each row verte of R ki has to be matched by M k to one of the column vertices in C ki. Since i is not a row verte matched by M k, then i / R ki.

0 L. GRIGORI, J. R. GILBERT AND, M. COSNARD Let B be the submatri of A consisting of columns through k and j and rows through k and row i. Suppose edge i, j does not belong to H(A), otherwise the proof is trivial. We will prove now that the three statements are equivalent. : As (L+U) ij is nonzero by hypothesis, then Lemma. applies and shows that B is a nonsingular matri. Hence its bipartite graph H(B) satisfies the Hall property and there is a perfect matching M B in H(B). Consider now the row verte i in the bipartite graph H(A). Recall we assume that edge i, j does not belong to H(A). Row verte i is matched by M B to column verte j 0. Since i / R ki, we can deduce that j 0 / C ki. Column verte j 0 is matched by M k to some row verte i 0, where i 0 i since i is not matched by M k. Also we have that i 0 / R ki. Row verte i 0 is matched by M B to some column verte j, where j j 0, since j 0 is matched in M B to i. If j = j then we stop. Otherwise we continue our reasoning, for each row verte we consider its matched column verte by M B, then for each column verte we consider its matched row verte by M k. Continuing inductively, we arrive at verte j. The vertices followed during our reasoning are vertices i, j 0, i 0, j, i,... i t, j. Edge i, j 0 and edges i q, j q+ are edges of H(B) which belong to the perfect matching M B. Edge i t, j and edges j q, i q are edges of H(A k ), which belong to the perfect matching M k. This yields a path in H(A) from row verte i to column verte j that is r-alternating with respect to the matching M k. : Consider the r-alternating path (i, j 0, i 0, j, i,... i t, j) from i to j with respect to the matching M k. All the intermediate vertices on this path are smaller or equal than k. Because i / R ki, we can deduce that j 0 / C ki. Continuing inductively, we can deduce that this path does not include any verte in C ki R ki. : Let d be the last row verte on Q, that is the verte just before j on Q. We partition the graph H(A([: k, i], : k)) into two subgraphs. The first subgraph, induced by the row vertices in R ki and the column vertices in C ki, satisfies the Hall property and has a perfect matching M. The second subgraph, induced by the row vertices,...k and i ecept row vertices in R ki and the column vertices through k ecept column vertices in C ki, is strong Hall. Lemma.6 says that there is a column complete matching M which ecludes row verte i and relative to which there eists a c-alternating path R from d to i. Let the matching M be formed by the edges of M and the edges of M. This matching represents a column complete matching in H(A([: k, i], : k)). We now show that the graph H(B) satisfies the Hall property. Recall that column verte j and row verte i are not matched by the matching M. Consider path R from d to i that is c-alternating with respect to matching M. Obtain a new matching M R from M by alternating along path R. As i is not matched in M and d is matched in M, then i is matched in M R and d is not matched in M R. Add to matching M R the edge d, j. Thus we obtain a perfect matching in H(B), that is H(B) satisfies the Hall property. By hypothesis, every square Hall submatri of A is nonsingular, and thus B is nonsingular and its determinant is nonzero. Therefore (L + U) ij is nonzero. The net theorem uses Hall sets of maimum cardinality associated with subsets of columns of A to restrict paths corresponding to nonzero elements of L and U. In this paper we use this theorem in section to determine upper bounds for the factorization PA = LU, where the matri A satisfies only the Hall property. Note that for a matri satisfying the strong Hall property, the Hall set of maimum cardinality of a subset of columns is always empty. Thus, Theorem. is relevant to matrices satisfying

STRUCTURE PREDICTION IN GAUSSIAN ELIMINATION A H(A(:,:)) H(A([:,],:)) Fig... Eample for Theorem. ( ). Consider the strong Hall matri A, and the matri B = A([:,], :) displayed in patterned gray. The Hall set of maimum cardinality of H(A([:, ],: )) is C = {} and R = { }. Suppose element L is nonzero. The perfect matching M k of matri A k = A(:, : ) is formed by the edges,,,,,. The perfect matching M B of B is formed by the edges,,,,,, and,. Form a path by starting at and by following one edge in M B and one edge in M k. This yields the path (,,,). A H(A([:,],:)) H(A([:,],:)) Fig... Eample for Theorem. ( ). Consider the strong Hall matri A as in Figure., the matri B = A([:,], :), C = {} and R = { }. Consider the path Q = (,,, ) that has no verte in C R. The graph H(A([:,],: )) is partitioned into two subgraphs. The subgraph induced by column verte and row verte satisfies the Hall property and it has a perfect matching M = {, }. The subgraph induced by column vertices {, } and row vertices {,, } satisfies the strong Hall property, and has a column complete matching M = {,,, } relative to which there is a c-alternating path R = (,, ). The matching M is formed by the edges of M and M and is presented by solid edges in the graph H(A([:, ],:)). The matching obtained by alternating along path R is a perfect matching of H(B) and is presented at the right of the figure. only the Hall property. This theorem can also be useful in the algorithm described in section.. The Hall sets involved can be computed prior to the factorization using an algorithm as for eample the one proposed in [7]. Theorem.. Let A be an n n nonsingular matri that is factored by Gaussian elimination as A = LU. Suppose that (L+U) ij is nonzero. Let k = min(i, j), and let C k be the Hall set of maimum cardinality in the first k columns and R k be the set of all row indices covered by columns of C k. Then there is a path in the bipartite graph H(A) from row verte i to column verte j whose intermediate vertices are smaller or equal than k and that has no verte in C k R k. Proof. Let C ki be the Hall set of maimum cardinality in H(A([: k, i], : k)) and R ki be the set of all row indices covered by columns of C ki. It can be easily shown that C k C ki and R k R ki. The third statement of Theorem. implies that this theorem holds. Note that Theorem. provides only a necessary condition for fill to occur during the elimination. Figure. (as well as Theorem.) shows that the condition is

L. GRIGORI, J. R. GILBERT AND, M. COSNARD A H(A) G(A) Fig... Eample showing that the converse of Theorem. is not true. not sufficient. Consider the Hall matri A in Figure.. The Hall set of maimum cardinality is C = {} and it covers the row inde R = { }. The Hall set of maimum cardinality in H(A([:, ], : )) is C = {, } and it covers the row indices R = {, }. There is a path (,,, ) in H(A) that has no verte in C. However, the element L = 0 because of numeric cancellation... Computing the nonzero structure of the factors L and U during Gaussian elimination with partial pivoting. In this section we present an algorithm that uses the results of the previous section to compute the nonzero structure of the factors L and U during the LU factorization with partial pivoting. The algorithm computes one column of L and one row of U at a time. First we present Theorem.6 that describes eplicitly how Theorem. can be used during the LU factorization with partial pivoting of a matri A. This theorem supposes that the first j steps of the LU factorization eist, and it gives the necessary results to compute the structure of column j of L and of row j of U at the j-th step of factorization. Theorem.6. Let A be an n n nonsingular matri, that is to be decomposed using LU factorization with partial pivoting. Suppose that the first j steps of LU factorization with partial pivoting of A eist and have been eecuted. Let P J = P j P j... P be the permutations performed during the first j steps of elimination and let M j be a perfect matching of (P J A)(: j, : j ). Suppose that every square Hall submatri of A is nonsingular. At the j-th step of decomposition, the element L ij is nonzero if and only if there is a c-alternating path in the bipartite graph H(P J A) from column verte j to row verte i with respect to the matching M j. The element U ji is nonzero if and only if there is an r-alternating path in the bipartite graph H(A) from row verte j to column verte i with respect to the matching M j. Proof. The proof is similar to the proof of Theorem.. Algorithm uses Theorem.6 and sketches the factorization PA = LU, where P = P n... P and each P j reflects the permutation of two rows at step j of factorization. At each step j, the structure of column j of L is determined, and then its numerical values are computed. The element of maimum magnitude in column j of L is chosen as pivot. Let L kj be this element. The algorithm interchanges rows k and j of L and rows k and j of A. Then the structure of row j of U is determined, followed by the computation of its numerical values. The structure of column j of L is computed by finding all the c-alternating paths with respect to M j from column verte j to some row verte i. This can be achieved in a similar way to the augmenting path technique, used in finding maimum

STRUCTURE PREDICTION IN GAUSSIAN ELIMINATION matchings in bipartite graphs, and described for eample in [7]. This technique ensures that each edge of the bipartite graph of A is traversed at most once. The structure of row i of U is computed in a similar way. Since the j-th diagonal element corresponds to a nonzero, Theorem. ensures that there is a c-alternating path Q from column verte j to row verte j with respect to the matching M j. During the computation of the structure of column j of L, we store for each row verte i, the column verte just before i on a c-alternating path with respect to M j from j to i. This allows us to retrace Q. The algorithm computes a new matching M j by alternating along path Q. The overall compleity of computing the structure of L and the structure of U in Algorithm is hence bounded by O(n nnz(a)), where n is the order and nnz(a) is the number of nonzeros of matri A. Algorithm LU factorization with partial pivoting, aware of some cancellations M 0 = for j := to n do if j < n then. Compute structure of L(j: n, j). This is formed by all row vertices i j such that there is a c-alternating path in H(A) with respect to M j from column verte j to row verte i.. Compute numerical values of L(j: n, j).. Find k such that L kj = ma L(j: n, j). Let v = L kj.. Interchange L(j, : ) with L(k, : ) and A(j, : ) with A(k, : ). Let Q[j: j ] be the c-alternating path in H(A) with respect to M j that corresponds to L jj.. Scale: L(:, j) = L(:, j)/v. end if 6. Compute structure of U(j, j+: n). This is formed by all column vertices i j such that there is an r-alternating path in H(A) from row verte j to column verte i with respect to the matching M j. 7. Compute numerical values of U(j, j + : n). Let U jj = v. if j = then M = Q else M j = M j Q end if end for Several aspects need to be investigated and remain as open questions. First important aspect is related to the practical interest of using this algorithm, which depends on the utility of identifying numeric cancellations and on the number of numeric cancellations that appear in real world applications. Second aspect is related to the compleity of Algorithm, which is equivalent to the compleity of one of the first algorithms for computing the structure of the factors L and U, denoted as FILL algorithm in []. The algorithms proposed more recently for computing fillins [] are faster in practice than FILL. Since we epect Algorithm to have a similar runtime to FILL, further investigation is required to make it competitive with respect to the new algorithms.. Tight eact bounds for the structure prediction of PA = LU, when A satisfies only the Hall property. Let A be an n n matri that satisfies the Hall

L. GRIGORI, J. R. GILBERT AND, M. COSNARD property. Suppose A is factored by Gaussian elimination with row interchanges as PA = LU. In this section we discuss the problem of predicting bounds for the factors L and U prior to the numerical factorization. We consider eact results, that is, the upper bounds do not include elements that correspond to numeric cancellations due to submatrices of A structurally singular. The net three theorems give tight eact bounds for the nonzero structure of the factors L and U. Theorem. gives upper bounds for the structure of L and U in terms of paths in the bipartite graph H(A). Theorems. and. show that this bound is the tightest possible for Gaussian elimination with row interchanges of a matri that satisfies the Hall property. That is, for every predicted element of the upper bound, there is a permutation and a choice of the values of matri A such that this element corresponds to a nonzero in the factors L or U. Theorem.. Let A be an n n nonsingular matri, that is factored by Gaussian elimination with row interchanges as PA = LU. Let i be an inde, j be a column inde, and q = min(i, j). Let C q be the Hall set of maimum cardinality in the first q columns and R q be the set of all row indices covered by columns of C q. If L ij is nonzero then there is a path in the bipartite graph H(A) from row verte k to column verte j whose intermediate column vertices are all in {,..., q} and that has no verte in C q R q, where k is the row of A that corresponds to row i of PA. If U ij is nonzero then there is a path in the bipartite graph H(A) from column verte i to column verte j whose intermediate column vertices are all in {,..., q} and that has no verte in C q R q. Proof. Case : i j (structure of L). Due to Theorem., there is a path Q in H(A) from row verte k to column verte j whose intermediate column vertices are all in {,...,j } and that has no verte in C j R j. This is the path searched in the theorem. Case : i < j (structure of U). According to Theorem., there is a path Q in H(A) from row verte k to column verte j whose intermediate column vertices are all in {,...,i } and that has no verte in C i R i. By hypothesis the factorization eists, thus the i-th diagonal element of P A is nonzero. Theorem. applies with respect to this element, and says that there is a path R in H(A) from column verte i to row verte k whose intermediate column vertices are all in {,...,i } and that has no verte in C i R i. Using the path R and the path Q, we can form a path in H(A) from column verte i to column verte j whose intermediate column vertices are all in {,..., i } and that has no verte in C i R i. This is the path searched in the theorem. The net two theorems show that the upper bound defined in Theorem. for the structure of L and U is tight. First, Theorem. shows that the bound for the structure of L is tight, and it is illustrated in Figure.. Second, Theorem. shows that the bound for U is tight, and it is illustrated in Figure.. The bound for L depends on the row permutations of A. It considers every row i of the original matri A. The bound identifies all column indices j that correspond to elements of row i that can become potentially nonzeros during the factorization through permutations. The bound for U is independent of row permutations of A. It identifies potential nonzeros U ij using paths that relate column verte i to column verte j in the bipartite graph of A. None of the results assumes that the input matri A has a zero-free diagonal. Theorem.. Let H be the structure of a square Hall matri. Let j be a column verte, C j be the Hall set of maimum cardinality in the first j columns, R j

STRUCTURE PREDICTION IN GAUSSIAN ELIMINATION be the set of row indices covered by columns in C j, and i be any row verte not in R j. Suppose that H contains a path from i to j whose intermediate column vertices are all in {,...,j } and which has no verte in C j R j. There eists a nonsingular matri A with H(A) = H and a permutation matri P such that if A is factored by Gaussian elimination with row interchanges as PA = LU, then row i of A is permuted in some row position k of PA, k j and L kj 0. Proof. By hypothesis, there is a path in H from i to j whose intermediate column vertices are all at most j. Consider H j the subgraph of H induced by all row vertices and all column vertices from to j. The graph H satisfies the Hall property, hence H j satisfies also the Hall property. We obtain a column complete matching M j in this graph which will induce the pivoting order for the first j steps of elimination. We partition the graph H j into two subgraphs. The first subgraph, H j, satisfies the Hall property and is induced by all the row vertices in R j and all the column vertices in C j. Let M j be a perfect matching in this subgraph. The second subgraph, Ĥ j, satisfies the strong Hall property and is induced by all the row vertices ecept row vertices in R j and all the column vertices through j ecept column vertices in C j. Let M j be a column complete matching in this subgraph. We distinguish two cases to determine M j, depending if i, j is an edge of H(A) or not. First, assume that i, j is an edge of H(A). Lemma. says that for any column complete matching M of Ĥj, there is a c-alternating path R from i to some unmatched row verte. We denote M j the matching obtained from M by alternating along path R. With this choice, row verte i is not covered by the matching M j. Second, assume that i, j is not an edge of H(A). Let e be the last row verte on the path between i and j, that is the verte just before j. Therefore Lemma.6 applies, and says that there is a column complete matching M j which ecludes verte i and relative to which there eists a c-alternating path R from e to i. Let the column complete matching M j be formed by the edges of M j and the edges of M j. We choose the values of A such that every square submatri of A that is Hall, including A itself, is nonsingular. We can say that this is possible by using an argument as the one described in [] (the determinant of a Hall submatri is a polynomial in its nonzero values, not identically zero, since the Hall property implies a perfect matching). We choose the values of nonzeros of A corresponding to edges of M j to be larger than n, and the values of the other nonzeros of A to be between 0 and. With this choice, Lemma. says that the first j steps of elimination of A pivot on nonzeros corresponding to edges of M j. Let P be the permutation matri that describes these row interchanges. Note that with our choice of M j, row verte i is not covered by the matching M j. Thus, after the first j steps of elimination, row i of A was moved to a row in position k of PA, where k j. We prove that this choice makes L kj nonzero. If i, j is an edge of H(A), then L kj is nonzero. Otherwise, let K be the j j submatri of A that includes the first j columns and the rows to j in corresponding positions of PA and row i of A (that is, row k of PA). Thus the columns of K are those numbered through j in H(A). The first j columns are matched by M j, while the last column j is not matched by M j. The first j rows of K are those matched to columns through j of H(A) by M j. The last row of K is row number i of A. To show that L kj is nonzero, we still need to show that K satisfies the Hall prop-

6 L. GRIGORI, J. R. GILBERT AND, M. COSNARD erty. Recall that column verte j and row verte i are not matched by the matching M j in H(K). Consider path R from e to i that is c-alternating with respect to matching M j. Obtain a new matching M j R from M j by alternating along path R. As i is not matched in M j and e is matched in M j, then i is matched in M j R and e is not matched in M j R. Add to matching M j R the edge e, j and thus we get a perfect matching in H(K), that is H(K) satisfies the Hall property. By our choice of values, every submatri that satisfies the Hall property is nonsingular. Therefore element L kj is nonzero. 6 7 6 6 7 7 A H(A[ :7 ][:]) 7 7 K H(K) Fig... Eample for Theorem. showing the construction that makes element L 7 nonzero for the Hall matri A at top left. The last row verte on the path (7,,,,, ) between i = 7 and j = satisfying the conditions in Theorem. is e =. The graph H j, presented at top right, is the subgraph of H induced by column vertices through j = and all the row vertices. The solid edges represent a column complete matching M j that ecludes row verte 7 and with respect to which there is a c-alternating path R = (,,,,7 ) from to 7. At bottom right, K is the submatri of P A with columns through j = and the rows in corresponding positions after steps of pivoting. The fifth row of K is k = i = 7. In H(K) there is a maimum matching M j R represented by solid edges at bottom right. Thus the element L 7 is nonzero. Theorem.. Let H be the structure of a square Hall matri. Let i and j be two column vertices, i < j, let C i be the Hall set of maimum cardinality in the first i columns, and let R i be the row vertices covered by columns in C i. Suppose that H contains a path from j to i whose intermediate column vertices are all in {,...,i } and that has no verte in C i R i. There eists a nonsingular matri A with H(A) = H and a permutation matri P such that if A is factored by Gaussian elimination with row interchanges as PA = LU, then U ij is nonzero. Proof. By hypothesis, there is a path Q in H(A) from column verte j to column verte i whose intermediate column vertices are all at most i. Let k be the first row verte on Q, that is the verte just after j on Q. Let e be the last row verte on Q, that is the verte just before i on Q. Note that e can be equal to k. Let Ĥi be the strong Hall subgraph of H induced by all the row vertices ecept