{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw6 - EE364b Prof S Boyd EE364b Homework 6 1 Conjugate...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
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 block-diagonal 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. Hints. To force Matlab to treat A as dense, use full(A) .
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern