This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: EE364b Prof. S. Boyd EE364b Homework 6 1. Conjugate gradient residuals. Let r ( k ) = b Ax ( k ) be the residual associated with the k th element of the Krylov sequence. Show that r ( j ) T r ( k ) = 0 for j negationslash = k . In other words, the Krylov sequence residuals are mutually orthogonal. Do not use the explicit algorithm to show this property; use the basic definition of the Krylov sequence, i.e. , x ( k ) minimizes (1 / 2) x T Ax b T x over K k . 2. CG and PCG example. In this problem you explore a variety of methods to solve Ax = b , where A S n ++ has block diagonal plus sparse structure: A = A blk + A sp , where A blk S n ++ is block diagonal and A sp S n is sparse. For simplicity we assume A blk consists of k blocks of size m , so n = mk . The matrix A sp has N nonzero elements. (a) What is the approximate flop count for solving Ax = b if we treat A as dense? (b) What is the approximate flop count for an iteration of CG? (Assume multiplication by A blk and A sp are done exploiting their respective structures.) You can ignore the handful of inner products that need to be computed. (c) Now suppose that we use PCG, with preconditioner M = A 1 blk . What is the approximate flop count for computing the Cholesky factorization of A blk ? What is the approximate flop count per iteration of PCG, once a Cholesky factorization of A blk if found? (d) Now consider the specific problem with A blk , A , and b generated by ex_blockprecond.m . Solve the problem using direct methods, treating A as dense, and also treating A as sparse. Run CG on the problem for a hundred iterations or so, and plot the relative residual versus iteration number. Run PCG on the same problem, using the blockdiagonal preconditioner M = A 1 blk . Give the solution times for dense direct, sparse direct, CG (to relative residual 10 4 , say), and PCG (to relative residual 10 8 , say). For PCG break out the time as time for initial Cholesky factorization, and time for PCG iterations....
View
Full
Document
This note was uploaded on 04/09/2010 for the course EE 360B taught by Professor Stephenboyd during the Fall '09 term at Stanford.
 Fall '09
 StephenBoyd
 Gate

Click to edit the document details