Sparsified Cholesky and Multigrid Solvers for Connection Laplacians
Rasmus Kyng, Yin Tat Lee, Richard Peng, Sushant Sachdeva, Daniel A. Spielman
Introduction
We introduce the sparsified Cholesky and sparsified multigrid algorithms for solving systems of linear equations. Two advantages of these algorithms over other recently introduced nearly-linear time algorithms for solving systems of equations in Laplacian matrices [Vai90, ST14, KMP10, KMP11, KOSZ13, CKM+14] are:
They give nearly-linear time algorithms for solving systems of equations in a much broader class of matrices—the connection Laplacians and Hermitian block diagonally dominant matrices. Connection Laplacians [SW12, BSS13] are a generalization of graph Laplacians that arise in many applications, including celebrated work on cryo-electron microscopy [SS11a, SS12, ZS14], phase retrieval [ABFM14, MTW14], and many image processing problems (e.g. [OSB15, ANKKS+12]). Previous algorithms for solving systems of equations in graph Laplacians cannot be extended to solve equations in connection Laplacians because the previous algorithms relied on some form of low stretch spanning trees, a concept that has no analog for the more general connection Laplacians.
They provide linear-sized approximate inverses of connection Laplacian matrices. That is, for every -dimensional connection Laplacian , the sparsified Cholesky factorization algorithm produces an block-upper-triangular matrix and block diagonal with nonzero entries so that is a constant-factor approximation of . Such matrices and allow one to solve systems of equations in to accuracy in time , where is the number of nonzero entries of . Even for ordinary Laplacian matrices, the existence of such approximate inverses is entirely new. The one caveat of this result is that we do not yet know how to compute those approximate inverses in nearly linear time.
The sparsified Cholesky and sparsified multigrid algorithms work by sparsifying the matrices produced during Gaussian elimination. Recall that Cholesky factorization is the version of Gaussian elimination for symmetric matrices, and that the high running time of Gaussian elimination comes from fill—new nonzero matrix entries that are created by row operations. If Gaussian elimination never produced rows with a super-constant number of entries, then it would run in linear time. The sparsified Cholesky algorithm accelerates Gaussian elimination by sparsifying the rows that are produced by elimination, thereby guaranteeing that the elimination will be fast. Sparsified Cholesky is inspired by one of the major advances in algorithms for solving linear equations in Laplacian matrices—the Incomplete Cholesky factorization (ICC) [MV77]. However, ICC merely drops entries produced by elimination, whereas sparsification also carefully increases ones that remain. The difference is crucial, and is why ICC does not provide a nearly-linear time solver.
To control the error introduced by sparsification, we have to be careful not to do it too often. This means that our algorithm actually chooses a large set of rows and columns to eliminate at once, and then sparsifies the result. This is the basis of our first algorithms, which establish the existence of linear time solvers and linear sized approximate inverses, after precomputation. This precomputation is analogous to the procedure of computing a matrix inverse: the approximate inverse takes much less time to apply than to compute.
To produce entire algorithms that run in nearly linear time (both to compute and apply the approximate inverse) requires a little more work. To avoid the work of computing the matrix obtained by eliminating the large set of rows and columns, we design a fast algorithm for approximating it quickly. This resulting algorithm produces a solver routine that does a little more work at each level, and so resembles a multigrid V-cycle [TOS00]. We call the resulting algorithm the sparsified multigrid. We note that Krishnan, Fattal, and Szeliski [KFS13] present experimental results from the use of a sparsification heuristic in a multigrid algorithm for solving problems in computer vision.
Our new algorithms are most closely related to the Laplacian solver recently introduced by Peng and Spielman [PS14]: unlike the other Laplacian solvers, they rely only on sparsification and do not directly rely on “support theory” preconditioners or any form of low stretch spanning trees. This is why our algorithms can solve a much broader family of linear systems. To sparsify without using graph theoretic algorithms, we employ a recently developed algorithm of Cohen et. al. [CLM+14] that allows us to sparsify a matrix by solving systems of equations in a subsampled matrix.
In this section, we define block diagonally dominant (bDD) matrices—the most general family of matrices such that the associated systems of linear equations can be solved by our algorithms. We begin by defining our motivating case: the connection Laplacians
Connection Laplacians may be thought of as a generalization of graph Laplacians where every vertex is associated with a vector, instead of a real number, and every edge is associated with a unitary matrix. Like graph Laplacians, they describe a natural quadratic form. Let be the unitary matrix associated with edge , and let be the (nonnegative) weight of edge . We require that , where denotes the conjugate transpose. The quadratic form associated with this connection Laplacian is a function of vectors , one for each vertex , that equals
The matrix corresponding to this quadratic form is a block matrix with blocks . Most applications of the connection Laplacian require one to either solve systems of linear equations in this matrix, or to compute approximations of its smallest eigenvalues and eigenvectors. By applying the inverse power method (or inverse Lanczos), we can perform these eigenvector calculations by solving a logarithmic number of linear systems in the matrix (see [ST14, Section 7]).
The matrices obtained from the connection Laplacian are a special case of block diagonally dominant (bDD) matrices, which we now define. Throughout this paper, we consider block matrices having entries in where is a fixed integer. We say that has block-rows, and block-columns. For we let denote the -block in and denote the block-column, i.e., For sets we let denote the block-submatrix with blocks for is block-diagonal, if for We emphasize that all computations are done over , not over a matrix group.
To define bSDD matrices, let denote the operator normRecall that the operator norm is the largest singular value of and square root of the largest eigenvalue of . of a matrix . For Hermitian matrices write iff is positive semidefinite.
A Hermitian block-matrix is block diagonally dominant (or bDD) if
Throughout the paper we treat as a constant. The hidden dependence on of the running times of the algorithms we present, is polynomial. The major results of this paper are the following.
There is an algorithm that, when given a bDD matrix with block rows and nonzero blocks, produces a solver for in work and depth so that the solver finds -approximate solutions to systems of equations in in work and depth.
Previously, the existence of nearly-linear time solvers was even unknown for the 1-dimensional case () when the off-diagonal entries were allowed to be complex numbers.
We can use the above algorithm to find approximations of the smallest eigenvalues and eigenvectors of such matrices at an additional logarithmic cost.
For every bDD matrix with block-rows there exists a diagonal matrix and an upper triangular matrix with nonzero blocks so that
Moreover, linear equations in , , and can be solved with linear work in depth , and these matrices can be computed in polynomial time.
These matrices allow one to solve systems of linear equations in to -accuracy in parallel time and work . Results of this form were previously unknown even for graph Laplacians.
In the next two sections we explain the ideas used to prove these theorems. Proofs may be found in the appendices that follow.
Background
We require some standard facts about the order on matrices.
For and positive definite, if and only if .
If and is any matrix of compatible dimension, then .
If and , then .
We now address one technicality of dealing with matrices: it is not immediate whether or not a matrix is singular. Moreover, if it is singular, the structure of its null space is not immediately clear either. Throughout the rest of this paper, we will consider matrices to which a small multiple of the identity have been added. These matrices will be nonsingular. To reduce the problem of solving equations in a general matrix to that of solving equations in a nonsingular matrix, we require an estimate of the smallest nonzero eigenvalue of .
Hence, we can solve systems in by approximately solving systems in . Any lower bound on the smallest nonzero eigenvalue of will suffice. It only impacts the running times of our algorithms in the numerical precision with which one must carry out the computations.
The above claim allows us to solve systems in that have a solution. If is singular and we want to apply its pseudoinverse (that is, to find the closest solution in the range of ), we can do so by pre and post multiplying by to project onto its range. The resulting algorithm, which is implicit in the following claim, requires applying a solver for three times. It also takes times as long to run, where is the finite condition numberThe finite condition number is the ratio of the largest singular value to the smallest nonzero singular value. of .
Let be an upper bound on the finite condition number of . Given an error parameter , let . If all nonzero eigenvalues of are at least , and if , then
Overview of the algorithms
We index the block rows and columns of a block matrix by a set of vertices (or indices) . When we perform an elimination, we eliminate a set , and let . Here, stands for “fine” and stands for “coarse”. In contrast with standard multigrid methods, we will have .
To describe block-Cholesky factorization, we write the matrix with the rows and columns in first:
Cholesky factorization writes the inverse of this matrix as
is the Schur complement of with respect to .
Our algorithms rely on two fundamental facts about matrices: that the Schur complement of a matrix is a matrix (Lemma B.3) and that one can sparsify matrices. The following theorem is implicit in [dCSHS11].
For every , every bDD matrix with -dimensional block rows and columns can be -approximated by a bDD matrix having at most nonzero blocks.
We use the identity (1) to reduce the problem of solving a system of equations in to that of solving equations in its Schur complement. The easiest part of this is multiplication by : the time is proportional to the number of nonzero entries in the submatrix, and we can sparsify to guarantee that this is small.
The costlier part of the reduction is the application of the inverse of three times. This would be fast if were block-diagonal, which corresponds to being an independent set. We cannot find a sufficiently large independent set , but we can find a large set that is almost independent. This results in a matrix that is well approximated by its diagonal, and thus linear equations in this matrix can be quickly solved to high accuracy by a few Jacobi iterations (see Theorem 3.7 and Section E).
We can prove the existence of linear sized approximate inverses by explicitly computing , sparsifying it, and then recursively applying the algorithm just described. To make this algorithm efficient, we must compute a sparse approximation to without constructing . This is the problem of spectral vertex sparsification, and we provide a fast algorithm for this task in Sections 3.4 and G.
We encode this recursive algorithm by a Schur complement chain (SCC). An SCC defines a linear operator that can be used to approximately solve equations in an initial matrix . If the matrix is sparse, then it is the same as ; if not, then is a sparse approximation to . Let be the first set of vertices eliminated, a sparse approximation to the Schur complement of with respect to and an operators that approximates the inverse of
An -Schur complement chain (-SCC) for a matrix indexed by vertex set is a sequence of operators and subsets,
so that for and , and for ,
The algorithm ApplyChain, described in Section C, applies an SCC to solve equations in in the natural way and satisfies the following guarantee.
Consider an -SCC for where and can be applied to a vector in work and depth respectively.
The algorithm corresponds to a linear operator acting on such that
and
for any vector , runs in depth and work.
For an -SCC chain for we define the depth and work of the chain to be the work and depth required by ApplyChain to apply the SCC.
We must choose the set of vertices so that we can approximate the inverse of by an operator that is efficiently computable. We do this by requiring that the matrix be -block diagonally dominant (-bDD), a term that we now define.
A Hermitian block-matrix is -bDD if
We remark that a -bDD matrix is simply a bDD matrix. In particular, for Laplacian matrices are -bDD.
By picking a subset of rows at random and discarding those that violate condition (2), the algorithm bDDSubset (described in Section D) finds a linear sized subset of the block-rows of a bDD matrix so that is -bDD.
Given a bDD matrix with block-rows, and an , bDDSubset computes a subset of size least such that is -bDD. It runs in runs in expected work and expected depth, where is the number of nonzero blocks in .
We can express an -bDD matrix as a sum of a block diagonal matrix and a bDD matrix so that it is well-approximated by the diagonal.
Every -bDD matrix can be written in the form where is block-diagonal, is bDD, and .
As is positive semidefinite, which means that is a good approximation of when is reasonably big. As block-diagonal matrices like are easy to invert, systems in these well-conditioned matrices can be solved rapidly using preconditioned iterative methods. In Section E, we show that a variant of Jacobi iteration provides an operator that satisfies the requirements of Definition 3.2.
Let be a bDD matrix with index set , and let such that is -bDD for some and has nonzero blocks. The algorithm acts as a linear operator on that satisfies
The algorithm takes work and depth.
We now explain how Theorems 3.7 and 3.1 allow us to construct Schur complement chains that can be applied in nearly linear time. We optimize the construction in the next section.
Theorem 3.1 tells us that there is a matrix with nonzero blocks that that -approximates , and that for every there is a matrix with nonzero blocks that is an -approximation of . We will pick later. Lemma 3.5 provides a set containing a constant fraction of the block-rows of so that is -bDD. Theorem 3.7 then provides an operator that solves systems in to accuracy in time times the number of nonzero entries in . This is at most the number of nonzero entries in , and thus at most . As each contains at least a constant fraction of the rows of , the depth of the recursion, , is . Thus, we can obtain constant accuracy by setting . The time required to apply the resulting SCC would thus be .
We can reduce the running time by setting to a constant and allowing it to shrink as increases. For example, setting results in a linear time algorithm that produces a constant-factor approximation of the inverse of . We refine this idea in the next section.
3 Linear Sized Approximate Inverses
In this section we sketch the proof of Theorem 1.3, which tells us that every matrix has a linear-sized approximate inverse. The rest of the details appear in Section F.
The linear-sized approximate inverse of a matrix with block rows and columns is provided by a -approximate of the form where is block diagonal and is block upper-triangular and has nonzero blocks. As systems of linear equations in block-triangular matrices like and can be solved in time proportional to their number of nonzero blocks, this provides a linear time algorithm for computing a approximation of the inverse of . By iteratively refining the solutions provided by the approximate inverse, this allows one to find -accurate solutions to systems of equations in in time .
The matrix that we construct has meta-block structure that allows solves in and to be performed with linear work and depth . This results in a parallel algorithm for solving equations in in work and depth . We remark that with some additional work (analogous to Section 7 of [LPS15]), one could reduce this depth to .
The key to constructing is realizing that the algorithm Jacobi corresponds to multiplying by the matrix defined in equation (7). Moreover, this matrix is a polynomial in and of degree , where where is bDD, and block diagonal such that To force to be a sparse matrix, we require that be sparse.
If we use the algorithm bSDDSubset to choose , then need not be sparse. However, this problem is easily remedied by forbidding algorithm bSDDSubset from choosing any vertex of more than twice average degree. Thus, we can ensure that all are sparse.
For every bDD matrix and every , there is a subset of size at least such that is -bDD and the number of nonzeros blocks in each block-row of at most twice the average number of nonzero blocks in a block-row of .
Discard every block-row of that has more than twice the average number of nonzeros blocks per row-block. Then remove the corresponding row blocks. The remaining matrix has dimension at least . We can now use Lemma 3.5 to find an -bDD submatrix. ∎
We obtain the factorization by applying the inverse of the factorization (1):
In the left and right triangular matrices we replace with the polynomial we obtain from Jacobi. In the middle matrix, it suffices to approximate by a block diagonal matrix, and by a factorization of its sparse approximation given by Theorem 3.1. The details, along with a careful setting of , are carried out in Section F.
4 Spectral Vertex Sparsification Algorithm
In this section, we outline a procedure ApproxSchur that efficiently approximates the Schur complement of a bDD matrix w.r.t. a set of indices s.t. is -bDD. The following lemma summarizes the guarantees of ApproxSchur.
Let be a bDD matrix with index set , and nonzero blocks. Let be such that is -bDD for some The algorithm , returns a matrix s.t.
has nonzero blocks, and
,
in work and depth.
We sketch a proof of the above lemma in this section. A complete proof and pseudocode for ApproxSchur are given in Section G.
First consider a very simple special case: where is a singleton, . Let be the remaining indices.
Thus, if has nonzero blocks, could have additional nonzero blocks compared to , potentially making it dense. If were a graph Laplacian, then would represent the adjacency matrix of a weighted clique. In Section J, we construct weighted expanders that allow us to -approximate in this case using edges. In Section G.4, we show how to use such weighted expanders to sparsify when is a bDD matrix.
This reduction can also be performed in parallel. If is such that is block diagonal, we can approximate by expressing as and using weighted expanders. However, may not be diagonal. Instead, we give a procedure SchurSquare that generates that is better approximated by its diagonal.
Invoking SchurSquare a few times leads a sequence of matrices . We will show that is -approximated by its diagonal and we call the procedure LastStep to approximate . An additional caveat is that replacing by its diagonal at this step gives errors that are difficult to bound. We discuss the correct approximation below
SchurSquare is based on a squaring identity for matrix inverse developed in [PS14]. Given a splitting of into where is block-diagonal, and has its diagonal blocks as zero, it relies on the fact that the matrix
satisfies . Furthermore, we can show that if is -bDD, is -bDD, which indicates that the block on rapidly approaches being diagonal.
As may be dense, we construct a sparse approximation to it. Since is diagonal, we can construct sparse approximations to the blocks and in a manner analogous to the case of diagonal . Similarly, we use bipartite expanders to construct sparse approximations to and .
Our sequence of calls to SchurSquare terminates with being roughly -bDD. We then return . As mentioned above, we cannot just replace by its diagonal. Instead, LastStep performs one step of squaring similar to SchurSquare with a key difference: Rather than expressing as it expresses it as where is block-diagonal, and is just barely bDD. With this splitting, it constructs after performing one iteration similar to Eq. (3). After this step, it replaces the block with the block-diagonal matrix . Again, we directly produce sparse approximations to and its Schur complement via weighted (bipartite) expanders. A precise description and proofs are given in Section G.2.
5 Sparsifying bDD matrices
The main technical hurdle left to address is how we sparsify bDD matrices. We to do this both to approximate by , if is not already sparse, and to ensure that all the matrices remain sparse. While the spectral vertex sparsification algorithm described in the previous section allows us to compute an approximation to a Schur complement , it is sparse only when is already sparse. As we iteratively apply this procedure, the density of the matrices produced will grow unacceptably. We overcome this problem by occasionally applying another sparsification routine that substantially decreases the number of nonzero blocks. The cost of this sparsification routine is that it requires solving systems of equations in sparse matrices. We, of course, do this recursively.
Our sparsification procedure begins by generalizing the observation that graph Laplacians can be sparsified by sampling edges with probabilities determined by their effective resistances [SS11b]. There is a block analog of leverage scores (37) that provides probabilities of sampling blocks so that the resulting sampled matrix approximates the original and has nonzero blocks with high probability. To compute this block analog of leverage scores we employ a recently introduced procedure of Cohen et. al. [CLM+14].
Once we generalize their results to block matrices, they show that we can obtain sufficiently good estimates of the block leverage scores by computing leverage scores in a bDD matrix obtained by randomly subsampling blocks of the original. The block leverage scores in this matrix are obtained by solving a logarithmic number of linear equations in this subsampled matrix. Thus, our sparsification procedure requires constructing a solver for a subsampled matrix and then applying that solver a logarithmic number of times. We compute this solver recursively.
There is a tradeoff between the number of nonzero blocks in the subsampled system and in the resulting approximation of the original matrix. If the original matrix has nonzero blocks and we subsample to a system of nonzero blocks, then we obtain an -approximation of the original matrix with nonzero blocks.
The details of the analysis of the undersampling procedure appear in Section H.
6 The main algorithm
We now explain how we prove Theorem 1.2. The details supporting this exposition appear in Section I. Our main goal is to control the density of the Schur complement chain as we repeatedly invoke Lemma 3.9.
Starting from some , we compute sets (via calls to bDDSubset), approximate solvers (via Jacobi), and approximations of Schur complements (via ApproxSchur), until we obtain a matrix such that its dimension is a smaller than that of by a large constant factor (like 4). While the dimension of is much smaller, its number of nonzero blocks is potentially larger by an even larger factor. We use the procedure described in the previous section to sparsify it. This sparsification procedure produces a sparse approximation of the matrix at the cost of solving systems of equations in a subsampled version of that matrix. Some care is required to balance the cost of the resulting recursion.
We now sketch an analysis of a nearly linear time algorithm that results from a simple choice of parameters. We optimize the parameter choice and analysis in Section I. Let be the dimension of and let be its number of nonzero blocks. To begin, assume that , for a to be specified later. We call this the sparse case, and address the case of dense later.
We consider fixing for all , for some constant . As the depth of the Schur complement chain is , this results in a solver with constant accuracy. A constant number of iterations of the procedure described above are required to produce an whose dimension is a factor of 4 smaller than . Lemma 3.9 tells us that the edge density of this is potentially higher than that of by a factor of
Set to be this factor. We use the sparsification procedure from the previous section to guarantee that no matrix in the chain has density higher than that of this matrix, which is upper bounded by .
Setting , the subsampling produces a matrix of density half that of , and it produces a sparse approximation of of density , which, by setting constants appropriately, we can also force to be half that of . In order to perform the sparsification procedure, we need to construct a Schur complement chain for the subsampled matrix, and then use it to solve systems of linear equations. The cost of using this chain to solve equations in the subsampled system is at most , and the cost of using the solutions to these equations to sparsify is . The cost of the calls to bDDSubset and ApproxSchur are proportional to the number of edges in the matrices, which is .
We repeat this procedure all the way down the chain, only using sparsification when the dimension of shrinks by a factor of . Since none of the matrices that we generate have density higher than , we remain in the sparse case. Let be the time required to construct a solver chain on systems of size with . We obtain the following recurrence
To handle the case of dense , we repeatedly sparsify while keeping fixed until we obtain a matrix with fewer than edges, at which point we switch to the algorithm described above. The running time of this algorithm on a graph with edges, , satisfies the recurrence
Thus is upper bounded bounded by .
We tighten this bound in Section I to prove Theorem 1.2 by carefully choosing the parameters to accompany a sequence that starts constant and decreases slowly.
Summary
We introduce a new approach to solving systems of linear equations that gives the first nearly linear time algorithms for solving systems in connection Laplacians and the first proof that connection Laplacians have linear-sized approximate inverses. This was unknown even for graph Laplacians.
Our algorithms build on ideas introduced in [PS14] and are a break from those used in the previous work on solving systems of equations in graph Laplacians [Vai90, ST14, KMP10, KMP11, KOSZ13, CKM+14]. Those algorithms all rest on support theory [BGH+06], originally introduced by Vaidya [Vai90], and rely on the fact that the Laplacian of one edge is approximated by the Laplacian of a path between its endpoints. No analogous fact is true for connection Laplacians, even those with complex entries for .
Instead, our algorithms rely on many new ideas, the first being that of sparsifying the matrices that appear during elimination. Other critical ideas are finding -bDD subsets of vertices to eliminate in bulk, approximating Schur complements without computing them explicitly, and the use of sub-sampling to sparsify in a recursive fashion. To efficiently compute approximations of the Schur complements, we introduce a new operation that transforms a matrix into one with the same Schur complement but a much better conditioned upper block (3). To obtain the sharp bounds in Theorem 1.2, we exploit a new linear-time algorithm for constructing linear-sized sparse approximations to implicitly represented weighted cliques whose edge weights are products of weights at vertices (Section J), and extend this to the analog for bDD matrices (Section G.4).
References
Appendix A Background
Since all nonzero eigenvalues of are at least , the eigenvalues of lie between and 1. Using , we see that the eigenvalues of lie between and . Using , we have
Let be a matrix of condition number and let for . Then, .
First, observe that implies that . It also implies that . As
. Similarly, as
.
Let . The above relation implies that
By Claim A.1, using ,
has an eigendecomposition in the same basis as , and so it follows that has the same eigenbasis, and the same null space as .
So , and . ∎
For every we can find where
Letting for we get and hence Moreover,
If and are positive semidefinite matrices satisfying , then
This fact can be proven via an energy minimization definition of Schur complement. More details on this formulation can be found in [MP13].
Appendix B Block Diagonally Dominant Matrices
In this section, we prove a few basic facts about bDD matrices. The following lemma gives an equivalent definition of bDD matrices.
The only if direction is easy. For bDD matrix if we let be the block diagonal matrix such that and be the matrix such that
where we used that since are Hermitian, is also Hermitian, and thus are Hermitian. ∎
This immediately implies the corollary that flipping the sign of off-diagonal blocks preserves bDD-ness.
Given a bDD matrix write it as where is a block-diagonal, and has its diagonal blocks as zero. Then, is also PSD.
First observe that for all i.e., their diagonal blocks are identical. Moreover, for all we have Thus is also bDD, and hence PSD. ∎
Next, we show that the class of bDD matrices is closed under Schur complement.
The class of bDD matrices is closed under Schur complement.
Since Schur complementation does not depend on the order of indices eliminated, it suffices to prove that for any bDD matrix is a bDD matrix. Let
We have Let be the block diagonal matrix such that for Expressing as we have for any
The next definition describes a special form that we can express any bDD matrix in, which will occasionally be useful.
Every bDD matrix with nonzero off-diagonal blocks can be written as where is a unitary edge-vertex transfer matrix and is a block diagonal PSD matrix. This implies that every bDD matrix is PSD. Furthermore, for every block diagonal matrix s.t. is bDD, we have . This decomposition can be found in time and depth.
We let which must be block-diagonal. We now show that for all the block is PSD. We have for all
where the last inequality holds since is bDD.
Thus, if we define such that its columns are all the vectors defined above, we have and every column of has exactly 2 nonzero blocks.
To show that for every block diagonal s.t. is bDD, , first consider applying the decomposition described above to instead of . Since the construction of only depends on the off-diagonal blocks, we get , where is block diagonal and PSD. So, .
It is immediate that the decomposition can be found in time and depth.
Appendix C Schur Complement Chains
In this section, we give a proof of Lemma 3.3. We restate the lemma here for convenience. See 3.3
The pseudocode for procedure ApplyChain that uses an -vertex sparsifier chain to approximately solve a system of equations in is given in Figure 1.
We begin by observing that the output vector is a linear transformation of the input vector . Let be the matrix that realizes this transformation. Similarly, for , define to be the matrix so that
An examination of the algorithm reveals that
We will now prove by backwards induction on that
The base case of follows from (4). Using the definition of an -SCC, we know that We show in Lemma C.1 that this implies
As ,
By combining this identity with (5) and our inductive hypothesis, we obtain
The whole algorithm involves a constant number of applications of and We observe that in order to compute using a multiplication procedure for we can pad with zeros, multiply by and read off the answer on the indices in Similarly, we can multiply vectors with This immediately gives the claimed bounds on work and depth. ∎
We now prove the deferred claims from the above proof.
Let be a bDD matrix, be a subset of the indices, and be an hermitian operator satisfying Then,
Using Lemma C.2, we know that the assumption on is equivalent to
When we use Fact 2.2 to substitute this inequality into the one above, we obtain
Given a bDD matrix a partition of its indices such that are invertible, and an invertible hermitian operator the following two conditions are equivalent:
The left inequality in this statement is equivalent to the left inequality in condition 1. Thus, it suffices to prove the right sides are equivalent.
To this end, using it suffices to prove that
This is equivalent to proving
Since the rhs is a convex function of The minimum is achieved at and we obtain the equivalent condition
Since we obtain our claim. ∎
Appendix D Finding α𝛼\alpha-bDD Subsets
In this section we check that a simple randomized sampling procedure leads to -bDD subsets. Specifically we will prove Lemma 3.5:
Pseudocode for this routine is given in Figure 2.
We first show that the set returned is guaranteed to be -strongly block diagonally dominant.
If bSDDSubset terminates, it returns such that is -bDD.
Consider some , the criteria for including in in Step 2 gives:
where the last inequality follows since is a subset of .
Incorporating this into the definition of being bDD gives
which means is -bDD. ∎
It remains to show that the algorithm finds a big quickly. This can be done by upper bounding the expected size of , or the probability of a single index being in .
This event only happens if and
Conditioning on being selected initially, or , the probability that each other is in is
Combining these two bounds gives Lemma 3.5.
(of Lemma 3.5) Applying Linearity of Expectation to Lemma D.2 gives
So, with probability at least , , and the algorithm will pass the test in line 3. Thus, the expected number of iterations made by the algorithm is at most . The claimed bounds on the expected work and depth of the algorithm follow. ∎
Appendix E Jacobi Iteration on α𝛼\alpha-bDD Matrices
From an -bDD set , we will construct an operator that approximates and that can be applied quickly. Specifically, we will show:
Pseudocode of this routine is given in Figure 3.
We first verify that any -bDD matrix has a good block-diagonal preconditioner.
Write where is block-diagonal and has its diagonal blocks as zeros. Note that is bDD by definition. Thus, by Corollary B.5,
Using Lemma B.2, we know that , or . This implies .
As is -strongly diagonally dominant and , we have
We now move on to measuring the quality of the operator generated by Jacobi. It can be checked that running it steps gives the operator
which is equivalent to evaluating a truncation of the Neumann series for
Let be a matrix with splitting where for some parameter . Then, for odd and for as defined in (7) we have:
The left-hand inequality is equivalent to the statement that all the eigenvalues of are at most (see [BGH+06, Lemma 2.2] or [ST14, Proposition 3.3]). To see that this is the case, expand
As all the eigenvalues of an even power of a matrix are nonnegative, all of the eigenvalues of this last matrix are at most .
Similarly, the other inequality is equivalent to the assertion that all of the eigenvalues of are at least one. Expanding this product yields
The eigenvalues of this matrix are precisely the numbers
where ranges over the eigenvalues of . The assumption implies that the eigenvalues of are at most , so . We have chosen the value of precisely to guarantee that, under this condition on , the value of (9) is at least . ∎
This error crucially depends only on , which for any choice of can be upper bounded by . Propagating the error this way allows us to prove the guarantees for Jacobi
(of Theorem 3.7) Consider the matrix generated when calling Jacobi with . being bDD means for each we have
Therefore if we extend onto the full matrix by putting zeros everywhere else, we have . Fact A.3 then gives .
Lemma 3.6 gives that . As , we can invoke Lemma E.1 with . Since , our choice of gives the desired error. Each of these steps involve a matrix vector multiplication in and two linear system solves in . The former takes work and depth since the blocks of are a subset of the blocks of , while the latter takes work and depth due to being block-diagonal. ∎
Appendix F Existence of Linear-Sized Approximate Inverses
In this section we prove Theorem 1.3, which tells us that every matrix has a linear-sized approximate inverse. In particular, this implies that for every matrix there is a linear-time algorithm that approximately solves systems of equations in that matrix. To save space, we will not dwell on this algorithm, but rather will develop the linear-sized approximate inverses directly. There is some cost in doing so: there are very large constants in the linear-sized approximate inverses that are not present in a simpler linear-time solver.
To obtain a factorization from an -SCC in which each is -bDD, we employ the procedure in Figure 4.
On input an -SCC of in which each is -bDD, the algorithm Decompose produces matrices and such that
Consider the inverse of the operator realized by the algorithm ApplyChain, and the operators that appear in the proof of Lemma 3.3.
After expanding and multiplying the matrices in this recursive factorization, we obtain
Moreover, we know that this latter matrix is a approximation of . It remains to determine the impact of replacing the matrix in the middle of this expression with .
Lemma E.1 implies that each and Lemma 3.6 implies that . So, the loss in approximation quality when we substitute the diagonal matrices is . ∎
Invoking this decomposition procedure in conjunction with the the near-optimal sparsification routine from Theorem 3.1 gives a nearly-linear work routine. Repeatedly picking subsets using Lemma 3.8 gives then gives the linear sized decomposition.
We set throughout and . Theorem 3.1 then guarantees that the average number of nonzero blocks in each column of is at most . If we now apply Lemma 3.8 to find -diagonally dominant subsets of each , we find that each such subset contains at least a fraction of the block columns of its matrix and that each column and row of indexed by has at most nonzero entries. This implies that each row of has at most nonzero entries.
Let denote the number of block columns of . By induction, we know that
So, the total number of nonzero blocks in is at most
We will show that the term multiplying in this later expression is upper bounded by a constant. To see this, note that for some constant . So, there is some other constant for which
To bound the quality of the approximation, we compute
The claimed bound on the work to perform backwards and forwards substitution with is standard: these operations require work linear in the number of nonzero entries of . The bound on the depth follows from the fact that the substitutions can be performed level-by-level, take depth for each level, and the number of levels, , is logarithmic in . ∎
Appendix G Spectral Vertex Sparsification Algorithm
In this section, we give a proof of the following lemma that immediately implies Lemma 3.9.
Let be a bDD matrix with index set , and nonzero blocks. Let be such that is -bDD for some The algorithm , returns a matrix s.t.
has nonzero blocks, and
,
in work and depth.
Moreover, if is a matrix such that only the submatrix is nonzero, and is bDD, then .
We show how to sparsify the Schur complement of after eliminating a set of indices such that is an -bDD matrix. The procedure ApproxSchur is described in Figure 5 and uses two key subroutines SchurSquare and SchurSquare allows us to approximate as the Schur complement of another matrix such that is roughly -bDD. LastStep allows us to approximate with error, when is roughly -bDD.
Let be an bDD matrix with index set , and nonzero blocks and let be such that is -bDD for some Given the algorithm , returns a bDD matrix in work and depth, such that
and
is -bDD.
has nonzero blocks,
If is a matrix such that only the submatrix is nonzero, and is bDD, then .
We can repeatedly applying the above lemma, to approximate as where is -bDD. LastStep allows us to approximate the Schur complement for such a strongly block diagonally dominant matrix The guarantees of LastStep are given by the following lemma.
Let be an bDD matrix with index set , and nonzero blocks and let be such that is -bDD for some There exist a procedure LastStep such that returns in work and depth a matrix s.t. has nonzero blocks and . If is a matrix such that only the submatrix is nonzero, and is bDD, then .
Combining the above two lemmas, we obtain a proof of Lemma 3.9.
(of Lemma G.1). By induction, after steps of the main loop in ApproxSchur,
Lemma G.2 also implies that is -bDD. Thus, we have that is -strongly diagonally dominant at the last step. Hence, Lemma G.3 then gives
Composing this bound with the guarantees of the iterations then gives the bound on overall error.
The property that if is a matrix such that only the submatrix is nonzero, and is bDD, then follows from Lemma G.2 and G.3, which ensure that this property holds for all our calls to SchurSquare and LastStep.
The work of these steps, and the size of the output graph follow from Lemma G.2 and G.3. ∎
In this section, we give a proof of Lemma G.2. At the core of procedure is a squaring identity that preserves Schur complements, and efficient sparsification of special classes of bDD matrices that we call product demand block-Laplacians.
The product demand block-Laplacian of a vector , is a bDD matrix defined as
Given a vector and an index set let . The bipartite product demand block-Laplacian of is a bDD matrix defined as
In Section G.4, we prove the following lemmas that allows us to efficiently construct sparse approximations to these matrices.
There is a routine such that for any demand vector and returns in work and depth a bDD matrix with nonzero blocks such that
There is a routine such that for any demand vector and , returns in work and depth a bDD matrix with nonzero blocks such that
Moreover, and are block-diagonal, where
We now use these efficient sparse approximations to give a proof of the guarantees of the procedure
(of Lemma G.2) Let denote Write as where is a block-diagonal, and has its diagonal blocks as zero. The proof is based on the identity where is the following matrix.
It is straightforward to prove that satisfies (see Lemma G.8). It is also straightforward to show that is -bDD. Thus, satisfies the first two requirements.
However, is likely to be a dense matrix, and we will not construct it in full. The key observation is that can be written as a sum of an explicit sparse bDD matrix, and several product demand block-Laplacians. Formally, for every we define as follows
For every we need to define a bipartite product demand block-Laplacian given by defined as
Letting denote the number of nonzero blocks in the number of nonzero blocks in each of is at most We construct a sparse representation of each of them using work. Thus, the total number of nonzero blocks in all these block-vectors is at most and we can explicitly construct sparse representations for them using work and depth.
We can now express as
For all we compute Define to be the block diagonal matrix such that
Since at most of are nonzero, and we can compute and construct using using work and depth. It is easy to verify that we can express explicitly as
in time and depth. has nonzero blocks and is our required matrix.
We first show that is bDD. Using for all we have for all
where the last inequality uses that is bDD. Again, using is bDD, for all we have
We also have Thus, using Fact A.3, we obtain It remains to show that is -bDD.
It is easy to verify that our transformations maintain that if is a matrix that is only nonzero inside the submatrix , and is bDD, then . ∎
We now prove the claims deferred from the above proof.
The matrix defined by Eq. (10) satisfies
We need the following identity from [PS14]:
G.2 Schur Complement w.r.t. Highly α𝛼\alpha-bDD Submatrices
In this section, we describe the LastStep procedure for computing an approximate Schur complement of a bDD matrix with a highly -bDD submatrix . LastStep is the final step of the ApproxSchur algorithm. The key element of the procedure is a formula for approximating the inverse of that is leveraged to approximate the Schur complement of as the Schur complement of matrix with the submatrix being block diagonal.
We prove guarantees for the LastStep algorithm as stated in Lemma G.3.
One could attempt to deal with the highly -bDD matrix at the last step by directly replacing it with its diagonal, but this is problematic. Consider the case where contains and with a weight edge between them, and and are connected to and in by weight edges respectively. Keeping only the diagonal results in a Schur complement that disconnects and . This however can be fixed by taking a step of random walk within .
Given a bDD matrix , s.t. is -bDD we define a block diagonal matrix s.t. for each
and another block diagonal matrix s.t. for each
and we define a matrix
Thus . One can check that because is bDD and is -bDD, it follows that is bDD and the matrix
We defer the proof of Lemma G.9 to Section G.3.
To utilize , define
Lemma G.9 tells us that for large enough , we can approximate the Schur complement of by approximating the the Schur complement of .
The next lemma tells us that is bDD and that we can write the matrix as a sum of an explicit bDD matrix and sparse implicitly represented product demand block-Laplacians and bipartite product demand block-Laplacians.
Consider a bDD matrix , where is -bDD for some , and let be the associated matrix defined by equation (24). Let be the number of nonzero blocks of .
For , we define
For , we define
where is bDD and has nonzero blocks, and the total number of nonzero blocks in and for all combined is also .
as well as and for all can be computed in time and depth.
If is a matrix that is only nonzero inside the submatrix , then if we apply the transformation of Eq. 24, to instead of , we find , and in particular .
We defer the proof of Lemma G.10 to Section G.3.
(of Lemma G.3) The procedure first computes and and for all s.t.
is . We define
which we can compute in time and depth. We have and , so that . It follows from Fact A.3 that .
Because the sparsifiers computed by BipartiteCliqueSparsificationpreserve the graph bipartition, is block diagonal.
We can use the block diagonal structure of quickly compute a sparse approximation to .
For , we define
Let us define, for each block row , , and for each block row , . From being bDD, we then conclude for each
With this in mind, we check that each for of is bDD.
We can compute and all in time and depth, since this is an upper bound to the number of nonzero blocks in .
Suppose is a matrix that is only nonzero inside the submatrix , and is bDD. We can show that , by first noting that this type of property holds for by Lemma G.10, and from this concluding that similarly if we consider as a function of then , and finally considering as a function of , we can then easily show that . ∎
G.3 Deferred Proofs from Section G.2
To help us prove Lemma G.9, we first prove the next lemma.
If be a -bDD matrix for some , then the operator as defined in Equation 23 satisfies:
Composing both sides by and substituting in means it suffices to show
We can use the fact that is -strongly diagonally dominant to show , and equivalently , as follows:
Firstly, as is bDD, similarly, as is also bDD. From the latter , so . Finally, .
As and commute, the spectral theorem means it suffices to show this for any scalar . Note that
Taking the difference between the inverse of this and the ‘true’ value of gives:
Incorporating the assumption that and gives that the denominator is at least
Combining these two bounds then gives the result. ∎
Lemma G.9 allows us to extend the approximation of by the inverse of to the entire matrix .
(of Lemma G.9) Recall that when a matrix is PSD,
The left-hand inequality of our lemma follows immediately from Eq. 33 and the left-hand side of the guarantee of Lemma G.11. To prove the right-hand inequality we apply Eq. 33 and the right-hand side of the guarantee of Lemma G.11. to conclude
Each product demand clique and bipartite product demand clique is bDD.
We now have to find an expression for and show that is bDD. Let us write in terms of its blocks From
Next we check the block rows for . Let us define for each , Thus for , the sum of block norms of row over columns
For , the sum of block norms of row over columns is . So the total sum of the blocks norms of off-diagonals is
For these block rows are also bDD, and hence is bDD. It is clear from the definitions that as well as and for all can be computed in time and depth.
It is easy to verify that if is a matrix that is only nonzero inside the submatrix , then if we apply the transformation of Eq. 24, to instead of , we find , and in particular . ∎
G.4 Sparsifying Product Demand Block-Laplacians
In this section, we show how to efficiently sparsify product demand block-Laplacians and their bipartite analogs. We prove the following key lemma later in this section that allows us to transfer results on graph sparsification to sparsifying these product block-Laplacians.
We now introduce scalar versions of product block-Laplacian matrices that will be useful.
The product demand graph of a vector , , is a complete weighted graph on vertices whose weight between vertices and is given by
The Laplacian of denoted is called the product demand Laplacian of
The bipartite product demand graph of two vectors , is a weighted bipartite graph on vertices whose weight between vertices and is given by
The Laplacian of denoted is called the bipartite product demand Laplacian of
In Section J, we give results on efficiently constructing approximations to product demand Laplacians that can be summarized as follows:
There is a routine such that for any and a demand vector returns in work and depth a graph with edges such that
There is a routine such that for any demand vectors and of total length and a parameter , it returns in work and depth a bipartite graph between and with edges such that
Finally, we need to define an operation on graphs: Given a graph define to be the graph obtained by duplicating each vertex in and for each edge in add a bipartite clique between the two copies of and
We now combine the above construction of sparsifiers fo product demand graphs with Lemma G.12 to efficiently construct sparse approximations to product demand block-Laplacians.
(of Lemma G.6) The procedure returns the matrix where
By construction Thus, applying Lemma G.12, with and we know that where is given by
Since we have proving our claim. ∎
(of Lemma G.7) The procedure returns the matrix where
Since returned by WeightedBipartiteExpander is guaranteed to be bipartite using Lemma G.16, we obtain that and are block-diagonal.
By construction Thus, applying Lemma G.12, with and we know that where is given by
Since we have proving our claim. ∎
By assumption, we have Using Lemma G.17, we get that This implies
and thus, ∎
G.5 Constructing sparsifiers for lifts of graphs
Given a graph define to be the graph obtained by duplicating each vertex in and for each edge in add a bipartite clique between the two copies of and
If is a sparsifier for i.e., then is a sparsifier for i.e.
Since we have Thus, if denotes the diagonal matrix of degrees of we have The Laplacian for is
Since this implies
Adding the above two, we get ∎
Appendix H Estimating Leverage Scores by Undersampling
We will control the densities of all intermediate bDD matrices using the uniform sampling technique introduced by [CLM+14]. It relies on sampling columns The randomized numerical linear algebra literature, e.g. [CLM+14], typically samples rows instead of columns of matrices. We sample columns instead in order to use a more natural set of notations. of matrices by upper bounds of their true leverage scores,
These upper bounds are measured w.r.t. a different matrix, giving generalized leverage scores of the form:
We introduced unitary edge-vertex transfer matrices in Definition B.4. Sparsifying bDD matrices can be transformed into the more general setting described above via a unitary edge-vertex transfer matrix, which is analogous to the edge-vertex incidence matrix.
Lemma B.5 proves that every bDD matrix with nonzero off-diagonal blocks can be written as where is a unitary edge-vertex transfer matrix and is a block diagonal PSD matrix. Additionally, for every block diagonal matrix s.t. is bDD, we have . This decomposition can be found in time and depth. We rely on this to detect some cases of high leverage scores as samples of may have lower rank.
We will reduce the number of nonzero blocks in by sampling columns blocks from this matrix. This is more restrictive than sampling individual columns. Nonetheless, it can be checked via matrix concentration bounds [AW02, Tro12] that it suffices to sample the block by analogs of leverage scores:
As in [CLM+14], we recursively estimate upper bounds for these scores, leading to the pseudocode given in Figure 10.
Given a positive definite bDD matrix with nonzero blocks.
Assume that for any positive definite bDD matrix with nonzero blocks, we can find an implicit representation of a matrix such that in depth and work and for any vector , we can evaluate in depth and work .
For any , , the algorithm outputs an explicit positive definite bDD matrix with nonzero blocks and .
The guarantees of this process can be obtained from the main result from [CLM+14]:
Let be a by matrix, and a density parameter. Consider the matrix consisting of a random fraction of the columns of . Then, with high probability we have is a vector of leverage score overestimates, i.e. , and
(Sketch of Lemma H.1) Instead of sampling column blocks, consider sampling individual columns to form . Theorem H.2 gives that the total leverage scores of all the columns of w.r.t. is at most .
As is formed by taking blocks instead of columns, we have
so the individual leverage scores computed w.r.t. (and in turn ) sums up to less than the ones computed w.r.t. .
Let us use to denote the column of the block column. Note that
To approximate , we apply a standard technique given by [SS11c, AT11, LMP13]. The rough idea is to write
By Johnson-Lindenstrauss Lemma, for a random Gaussian matrix with rows, we know that
for high probability. Since has rows, this can be approximated by applying the approximate inverse to vectors. Hence, step 3 runs in depth and work. ∎
We remark that the extra factor of can likely be improved by modifying the proof of Theorem H.2 to work with blocks. We omit this improvement for simplicity, especially since we’re already treating as a constant.
Appendix I Recursive Construction of Schur Complement Chains
We now give the full details for the recursive algorithm that proves the running times as stated in Theorem 1.2: See 1.2
This argument can be viewed as a more sophisticated version of the one in Section 3.6. The main idea is to invoke routines for reducing edges and vertices in a slightly unbalanced recursion, where several steps of vertex reductions take place before a single edge reduction. The routines that we will call are:
bDDSubset given by Lemma 3.5 proven in Section D for finding a large set of -bDD subset.
ApproxSchur given by Lemma G.1 proven in Section G that gives sparse approximations to Schur complements.
Sparsify given by Lemma H.1 proven in Section H that allows us to sparsify a bDD matrix by recursing on a uniform subsample of its non-zero blocks.
An additional level of complication comes from the fact that the approximation guarantees of our constructions rely on gradually decreasing errors down the Schur complement chain. This means that the density increases faster and larger reduction factors are required as the iteration goes on. Pseudocode of our algorithm is given in Figure 11.
Note that since may be initially dense, we first make a recursive call to Sparsify before computing the approximate Schur complements.
In our analysis, we will use to denote the number of non-zero column/row blocks in , and to denote the number of non-zero blocks in . These are analogous to dimension and number of non-zeros in the matrix. It is also useful to refer to the steps between calls to Sparsify as phases. Specifically, phase consists of iterations to . We will also use to denote the reduction factor used to perform the sparsification at the start of phase , aka.
A further technicality is that Lemma H.1 require a strictly positive definite block-diagonal part to facilitate the detection of vectors in the null space of the sample. We do so by padding with a small copy of the identity, and will check below that this copy stays throughout the course of this algorithm.
There are two mechanisms by which this recursive algorithm generates new matrices: through uniform sampling within Sparsify and via ApproxSchur. We will show inductively down the algorithmic calls that all matrices satisfy this property.
Lemma H.1 gives that this is preserved in the sample.
for some absolute constant .
The number of non-zero blocks in any iteration of phase is at most .
Lemma 3.5 and the choice of ensures , which means there is constant such that . Furthermore, we do not increase vertex count at any point in this recursion, and all recursive calls are made to smaller graphs. Therefore, the recursion terminates.
Lemma G.1 shows that after computing each approximate Schur complement,
Hence, by picking appropriately we can guarantee that the density increases by a factor of most during each iteration. This size increase is controlled by calls to Sparsify. Specifically, Lemma H.1 gives that at the start of phase we have:
Then, since we go at most steps without calling Sparsify, this increase in density can be bounded by:
Also, we can evaluate in depth and work for any vector .
We first bound the quality of approximation between and . The approximate Schur complement was constructed so that . The other source of error, Sparsify, is called only for some . In those iterations, Lemma H.1 guarantee that changes only by factor. This means overall we have . By Lemma 3.3, we have:
and it can be checked that is a constant.
The cost of ApplyChain is dominated by the sequence of calls to Jacobi. As each is chosen to be -bDD, the number of iterations required is . As matrix-vector multiplications take depth, the total depth can be bounded by.
The total work of these steps depend on the number of non-zero blocks, . Substituting the bounds from Lemma I.2 into Jacobi gives a total of:
where the inequality follows from the fact that the s are geometrically decreasing. ∎
This allows us to view the additional overhead of Sparsify as a black box, and analyze the total cost incurred by the non-recursive parts of RecursiveConstruct during each phase.
The total cost of RecursiveConstruct during phase , including the linear system solves made by Sparsify at iteration (but not its recursive invocation to RecursiveConstruct) is
Let and be the number of non zeros and variables in before the Sparsify call if there is. Lemmas 3.5 and G.1 show that the iteration takes work and depth. By Lemma I.2 the cost during these iterations excluding the call to Sparsify is:
We now consider the call to Sparsify made during iteration . Access to a fast solver for the sampled bDD matrix is obtained via recursive calls to RecursiveConstruct. The guarantees of the chain given by Lemma I.3 above means each solve takes depth
Incorporating these parameters into Lemma H.1 allows us to bound the overhead from these solves by
Note that at the end of the phase, the time required to construct an extra Schur complement chain for the Sparsify call is less than the remaining cost after the phase. This is the reason why we use as the reduction factor for the Sparsify call. The following theorem takes account for the recursive call and show the total running time for the algorithm.
With high probability, takes depth and work.
Lemma I.2 shows that the call to Sparsify at the start of each phase requires the construction of an extra Schur complement chain on a matrix with row/column blocks and at most non-zeros blocks. The guarantees of Lemma H.1 gives that the number of non-zero block in the sparsified matrix is at most
for some absolute constant . Therefore the cost of this additional call is less than the cost of constructing the rest of the phases during the construction process. Therefore, every recursive call except the first one can be viewed as an extra branching factor of at each subsequent phase.
Depth can be bounded by the total number of recursive invocations to RecursiveConstruct. The fact that is geometrically decreasing means there are phases. Choosing so that gives a depth of:
For bounding work, we start with the sparse case since all intermediate matrices generated during the construction process have density at most . In this case, the extra branching factor of at each phase can be accounted for by weighting the cost of iteration by , giving:
For the dense case, the first recursive call to is made to a graph whose edge count is much less. This leads to a geometric series, and an overhead of work at each step. As this can happen at most times, it gives an additional factor of in depth, which is still . The work obeys the recurrence:
To obtain Theorem 1.2, we simply choose an appropriate initial padding and set the parameter .
Appendix J Weighted Expander Constructions
Split all of the high demand vertices into many vertices that all have the same demand. This demand will still be the highest.
Given a graph in which almost all of the vertices have the same highest demand, we
drop all of the edges between vertices of lower demand,
replace the complete graph between the vertices of highest demand with an expander, and
replace the bipartite graph between the high and low demand vertices with a union of stars.
To finish, we merge back together the vertices that split off from each original vertex.
We start by showing how to construct the expanders that we need for step (2b). We state formally and analyze the rest of the algorithm for the complete case in the following two sections. We explain how to handle the bipartite case in Section J.3.
Expanders give good approximations to unweighted complete graphs, and our constructions will use the spectrally best expanders—Ramanujan graphs. These are defined in terms of the eigenvalues of their adjacency matrices. We recall that the adjacency matrix of every -regular graph has eigenvalue with multiplicity corresponding to the constant eigenvector. If the graph is bipartite, then it also has an eigenvalue of corresponding to an eigenvector that takes value on one side of the bipartition and on the other side. These are called the trivial eigenvalues. A -regular graph is called a Ramanujan graph if all of its non-trivial eigenvalues have absolute value at most . Ramanujan graphs were constructed independently by Margulis [Mar88] and Lubotzky, Phillips, and Sarnak [LPS88]. The following theorem and proposition summarizes part of their results.
Let and be unequal primes congruent to modulo 4. If is a quadratic residue modulo , then there is a non-bipartite Ramanujan graph of degree with vertices. If is not a quadratic residue modulo , then there is a bipartite Ramanujan graph of degree with vertices.
If , then the graph guaranteed to exist by Theorem J.1 can be constructed in parallel depth and work , where is its number of vertices.
When is a quadratic residue modulo , the graph is a Cayley graph of . In the other case, it is a Cayley graph of . In both cases, the generators are determined by the solutions to the equation where is odd and , and are even. Clearly, all of the numbers , , and must be at most . So, we can compute a list of all sums and all of the sums with work , and thus a list of all solutions with work .
As the construction requires arithmetic modulo , it is convenient to compute the entire multiplication table modulo . This takes time . The construction also requires the computation of a square root of modulo , which may be computed from the multiplication table. Given this data, the list of edges attached to each vertex of the graph may be produced using linear work and logarithmic depth. ∎
For our purposes, there are three obstacles to using these graphs:
They do not come in every number of vertices.
We handle the first two issues by observing that the primes congruent to 1 modulo 4 are sufficiently dense. To address the third issue, we give a procedure to convert a non-bipartite expander into a bipartite expander, and vice versa.
An upper bound on the gaps between consecutive primes congruent to 1 modulo 4 can be obtained from the following theorem of Tchudakoff.
For two integers and , let be the th prime congruent to modulo . For every ,
There exists an so that for all there is a prime congruent to 1 modulo 4 between and .
We now explain how we convert between bipartite and non-bipartite expander graphs. To convert a non-bipartite expander into a bipartite expander, we take its double-cover. We recall that if is a graph with adjacency matrix , then its double-cover is the graph with adjacency matrix
It is immediate from this construction that the eigenvalues of the adjacency matrix of the double-cover are the union of the eigenvalues of with the eigenvalues of .
Let be a connected, -regular graph in which all matrix eigenvalues other than are bounded in absolute value by . Then, all non-trivial adjacency matrix eigenvalues of the double-cover of are also bounded in absolute value by .
To convert a bipartite expander into a non-bipartite expander, we will simply collapse the two vertex sets onto one another. If is a bipartite graph, we specify how the vertices of are mapped onto by a permutation . We then define the collapse of induced by to be the graph with vertex set and edge set
Note that the collapse will have self-loops at vertices for which and . We assign a weight of to every self loop. When a double-edge would be created, that is when is also an edge in the graph, we give the edge a weight of . Thus, the collapse can be a weighted graph.
Let be a -regular bipartite graph with all non-trivial adjacency matrix eigenvalues bounded by , and let be a collapse of . Then, every vertex in has weighted degree and all adjacency matrix eigenvalues of other than are bounded in absolute value by .
To prove the bound on the eigenvalues, let have adjacency matrix
After possibly rearranging rows and columns, we may assume that the adjacency matrix of the collapse is given by
Note that the self-loops, if they exist, correspond to diagonal entries of value . Now, let be a unit vector orthogonal to the all-1s vector. We have
as the vector is orthogonal to the eigenvectors of the trivial eigenvalues of the adjacency matrix of . ∎
We now state how bounds on the eigenvalues of the adjacency matrices of graphs lead to approximations of complete graphs and complete bipartite graphs.
Let be a graph with vertices, possibly with self-loops and weighted edges, such that every vertex of has weighted degree and such that all non-trivial eigenvalues of the adjacency matrix of have absolute value at most . If is not bipartite, then is an -approximation of for . If is bipartite, then is an -approximation of for .
Let be the adjacency matrix of . Then,
In the non-bipartite case, we observe that all of the non-zero eigenvalues of are , so for all vectors orthogonal to the constant vector,
As all of the non-zero eigenvalues of are between and , for all vectors orthogonal to the constant vector
In the bipartite case, we naturally assume that the bipartition is the same in both and . Now, let be any vector on the vertex set of . Both the graphs and have Laplacian matrix eigenvalue with the constant eigenvector, and eigenvalue with eigenvector [{\mbox{\boldmath1}};-{\mbox{\boldmath1}}]. The other eigenvalues of the Laplacian of are , while the other eigenvalues of the Laplacian of are between
The proposition now follows from our choice of , which guarantees that
There are algorithms that on input and produce a graph having edges that is an approximation of or for some . These algorithms run in depth and work.
We first consider the problem of constructing an approximation of . By Corollary J.4 there is a constant so that if , then there is a prime that is equivalent to modulo so that is between and and . Let be such a prime and let . Similarly, for sufficiently small, there is a prime equivalent to modulo that is between and . Our algorithm should construct the corresponding Ramanujan graph, as described in Theorem J.1 and Proposition J.2. If the graph is bipartite, then Proposition J.7 tells us that it provides the desired approximation of . If the graph is not bipartite, then we form its double cover to obtain a bipartite graph and use Proposition J.5 and Proposition J.7 to see that it provides the desired approximation of .
The non-bipartite case is similar, except that we require a prime so that is between and , and we use a collapse to convert a bipartite expander to a non-bipartite one, as analyzed in Proposition J.6. ∎
For the existence results in Section F, we just need to know that there exist graphs of low degree that are good approximations of complete graphs. We may obtain them from the recent theorem of Marcus, Spielman and Srivastava that there exist bipartite Ramanujan graphs of every degree and number of vertices [MSS15].
For every integer and even integer , there is a weighted graph on vertices of degree at most that is a approximation of .
The main theorem of [MSS15] tells us that there is a bipartite Ramanujan graph on vertices of degree for every . By Propositions J.6 and J.7, a collapse of this graph is a weighted graph of degree at most that is a approximation of . The result now follows by setting . ∎
In the rest of the section, we will adapt these expander constructions to weighted settings. We start with product demand graphs.
Our algorithm for sparsifying complete product demand graphs begins by splitting the vertices of highest demands into many vertices. By splitting a vertex, we mean replacing it by many vertices whose demands sum to its original demand. In this way, we obtain a larger product demand graph. We observe that we can obtain a sparsifier of the original graph by sparsifying the larger graph, and then collapsing back together the vertices that were split.
Let be a product demand graph with vertex set and demands , and let be a product demand graph with demands . If there is a partition of into sets so that for all , , then is a splitting of and there is a matrix so that
The entry of matrix is if and only if . Otherwise, it is zero. ∎
We now show that we can sparsify by sparsifying .
Let and be graphs on the same vertex set such that for some . Let be a partition of , and let and be the graphs obtained by collapsing together all the vertices in each set and eliminating any self loops that are created. Then
Let be the matrix introduced in Proposition J.10. Then,
For distinct vertices and , we let denote the graph with an edge of weight between vertex and vertex . If , we let be the empty graph. With this notation, we can express the product demand graph as
This notation also allows us to precisely express our algorithm for sparsifying product demand graphs.
This section and the next are devoted to the analysis of this algorithm. Given Proposition J.11, we just need to show that is a good approximation to .
The number of vertices in is at most .
The number of vertices in is
So, and . That is, . In the next section, we prove the lemmas that show that for these special product demand graphs in which almost all weights are the maximum, our algorithm produces a graph that is a good approximation of .
(of Lemma G.15) The number of vertices in the graph will be between and . So, the algorithm described in Lemma J.8 will take depth and work to produce an approximation of the complete graph on vertices. This dominates the computational cost of the algorithm.
Proposition J.11 tells us that approximates at least as well as approximates . To bound how well approximates , we use two lemmas that are stated in the next section. Lemma J.14 shows that
J.2 Product demand graphs with most weights maximal
In this section, we consider product demand graphs in which almost all weights are the maximum. For simplicity, we make a slight change of notation from the previous section. We drop the hats, we let be the number of vertices in the product demand graph, and we order the demands so that
We let and be the set of low and high demand vertices, respectively. Let be the product demand graph corresponding to , and let , and be the subgraphs containing the low-low, high-high and low-high edges respectively. We now show that little is lost by dropping the edges in when is small.
Our analysis will make frequent use of the following Poincare inequality:
Let be an edge of weight and let be a path from from to consisting of edges of weights . Then
As the weights of the edges we consider in this section are determined by the demands of their vertices, we introduce the notation
With this notation, we can express the product demand graph as
If , then
The lower bound follows from .
Using lemma J.13 and the assumptions for and and for , we derive for every ,
The assumption then allows us to conclude
Using a similar technique, we will show that the edges between and can be replaced by the union of a small number of stars. In particular, we will partition the vertices of into sets, and for each of these sets we will create one star connecting the vertices in that set to a corresponding vertex in .
We employ the following consequence of the Poincare inequality in Lemma J.13.
For any , and ,
By applying Lemma J.13 and recalling that and , we compute
Multiplying both sides by and adding then gives
Recall that and let be a partition of so that for all . Then,
For each , and we apply Lemma J.15 to show that
Summing this approximation over all gives
Summing the left-hand side of this this approximation over all and gives
On the other hand, the sum of the right-hand terms gives
J.3 Weighted Bipartite Expanders
This construction extends analogously to bipartite product graphs. The bipartite product demand graph of vectors is a complete bipartite graph whose weight between vertices and is given by . The main result that we will prove is:
Without loss of generality, we will assume and . As the weights of the edges we consider in this section are determined by the demands of their vertices, we introduce the notation
Our construction is based on a similar observation that if most vertices on side have equaling to and most vertices on side have equaling to , then the uniform demand graph on these vertices dominates the graph.
Similarly to the non-bipartite case, the Poincare inequality show that the edges between low demand vertices can be completely omitted if there are many high demand vertices which allows the demand routes through high demand vertices.
Let be the bipartite product demand graph of the demand . Let a subset of vertices on side with demand higher than the set of remaining vertices on side. Define similarly. Assume that and , then
The proof is analogous to Lemma J.14, but with the upper bound modified for bipartite graphs.
For every edge , we embed it evenly into paths of the form over all choices of and . The support of this embedding can be calculated using Lemma J.13, and the overall accounting follows in the same manner as Lemma J.14.
It remains to show that the edges between low demand and high demand vertices can be compressed into a few edges. The proof here is also analogous to Lemma J.15: we use the Poincare inequality to show that all demands can routes through high demand vertices. The structure of the bipartite graph makes it helpful to further abstract these inequalities via the following Lemma for four edges.
Let be the bipartite product demand graph of the demand . Given and . Assume that . For any , we have
Using Lemma J.13 and , we have
The other side is similar due to the symmetry.∎
(of Lemma G.16) The proof is analogous to Lemma G.15. After the splitting, the demands in are higher than the demands in and so is to . Therefore, Lemma J.17 shows that that
By a proof analogous to Lemma J.16, one can use Lemma J.18 to show that