Download presentation
Presentation is loading. Please wait.
1
CS 290N / 219: Sparse Matrix Algorithms
John R. Gilbert
2
Systems of linear equations: Ax = b
3
Systems of linear equations: Ax = b
Alice is four years older than Bob. In three years, Alice will be twice Bob’s age. How old are Alice and Bob now?
4
Link analysis of the web
1 5 2 3 4 6 7 1 2 3 4 7 6 5 Web page = vertex Link = directed edge Link matrix: Aij = 1 if page i links to page j
5
Web graph: PageRank (Google) [Brin, Page]
An important page is one that many important pages point to. Markov process: follow a random link most of the time; otherwise, go to any page at random. Importance = stationary distribution of Markov process. Transition matrix is p*A + (1-p)*ones(size(A)), scaled so each column sums to 1. Importance of page i is the i-th entry in the principal eigenvector of the transition matrix. But, the matrix is 10,000,000,000 by 10,000,000,000.
6
Mark Adams: Bone Density Modeling
7
Poisson’s equation for temperature
8
The (2-dimensional) model problem
Graph is a regular square grid with n = k^2 vertices. Corresponds to matrix for regular 2D finite difference mesh. Gives good intuition for behavior of sparse matrix algorithms on many 2-dimensional physical problems. There’s also a 3-dimensional model problem.
9
Solving Poisson’s equation for temperature
k = n1/3 For each i from 1 to n, except on the boundaries: – x(i-k2) – x(i-k) – x(i-1) + 6*x(i) – x(i+1) – x(i+k) – x(i+k2) = 0 n equations in n unknowns: A*x = b Each row of A has at most 7 nonzeros.
10
Graphs and Sparse Matrices: Cholesky factorization
Fill: new nonzeros in factor 10 1 3 2 4 5 6 7 8 9 10 1 3 2 4 5 6 7 8 9 Symmetric Gaussian elimination: for j = 1 to n add edges between j’s higher-numbered neighbors G(A) G+(A) [chordal]
11
The Landscape of Sparse Ax=b Solvers
Direct A = LU Iterative y’ = Ay More Robust More General Non- symmetric Symmetric positive definite More Robust Less Storage D
12
Complexity of linear solvers
Time to solve model problem (Poisson’s equation) on regular mesh n1/2 2D 3D Dense Cholesky: O(n3 ) Sparse Cholesky: O(n1.5 ) O(n2 ) CG, exact arithmetic: CG, no precond: O(n1.33 ) CG, modified IC: O(n1.25 ) O(n1.17 ) CG, support trees: O(n1.20 ) -> O(n1+ ) O(n1.75 ) -> O(n1.31 ) Multigrid: O(n)
13
Administrivia Course web site: www.cs.ucsb.edu/~gilbert/cs290
Join the (Google) discussion group!! (see web site) First homework is on the web site, due next Monday About 5 weekly homeworks, then a final project (implementation experiment, application, or survey paper) Assigned readings: Davis book, Saad book (online), MGT. (Library reserve; see me for an extra copy of Davis.)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.