Homework assignments for Math 221

  • Homework #1 due Wednesday, Sept 8:
  • From Chapter 1: 1,2,3,4,5,10,11
  • Variation on Question 12 from Chapter 1:
  • Answer the question as stated just for addition and multiplication.
  • Write down an algorithm for complex division a/b.
  • Assume your algorithm runs using IEEE double precision arithmetic. Let a = 2^512 + i*2^512 (which is roughly equal to 1.341 * 10^154 + i * 1.341 * 10^154), and b=a, so a/b = 1. What answer does your algorithm compute? (you can write a very short program to try it, or just reason based on on the rules of IEEE arithmetic.) If it does not compute something close to 1, propose how you might improve it.
  • Homework #2 due Friday, Sept 17
  • From Chapter 1: 5, 7, 13, 14, 15, 16, 20
  • From Chapter 2: 1 (For part 2, in addition to finding the fastest machines for solving A*x=b and their speeds, compute the ratios of the speeds at which these machines solve A*x=b to their peak speeds.)
  • Homework #3 due Friday, Sept 24 (see updated errata)
  • From Chapter 2: 2, 7, 10, 11, 13 (parts 1,2), 17, 18
  • Homework #4 due Friday, Oct 1
  • From Chapter 2: 19
  • From Chapter 2: modification of problem 14:

    Rather than modifying existing LAPACK or CLAPACK codes as in the book's version of question 2.14, we will instead do this assignment in Matlab, as described below.

    Your assignment is to implement Gaussian Elimination with Complete Pivoting (GECP) in Matlab, and evaluate it as described here. On the class webpage you will find four programs,

  • gecp.m
  • testgecp.m.
  • testge.m.
  • randmatgen.m.
  • gecp.m is the routine that performs GECP, but it only includes the calling sequence and leading comments that describe exactly what its inputs and outputs should be; your job is to fill in the implementation. testgecp.m is a program that tests gecp.m, including a comparison with Matlab's built-in implmentation of Gaussian Elimination with partial pivoting (which, ultimately, is the LAPACK routine dgesv.f, which you can find at www.netlib.org/lapack if you like). You should run testgecp.m (which also calls testge.m and randmatgen.m, and prints out results) and discuss whether each of test matrix results is what you expect:
  • Is the backward error (for the factorizations from gecp and gepp) what you expect? How does your answer depend on pivot growth?
  • Is the backward error (for solving Ax=b from gecp and gepp) what you expect? How does your answer depend on pivot growth?
  • Do the estimated condition numbers (using Matlab's version of Algorithm 2.5 with gepp, and using Matlab's version of Algorithm 2.5 with gecp) agree with the "true" condition number?
  • Are the error estimates (using the estimated condition numbers) good upper bounds for the true error?
  • How are your answers to the above questions correlated to the reported pivot growth factors?
  • You do not need to do timing comparisons between your version of gecp.m and Matlab's built in gepp, which will be much faster.
  • Homework #5 due Friday, Oct 8

    Due date delayed until Monday, Oct 11

  • From Chapter 3: 3, 4 (just the normal equations part), 9, 12, 14, 15
  • Homework due Friday, Oct 15: class project proposals
  • Homework #6 due Friday, Oct 22
  • From Chapter 4: 1, 2, 4, 5, 6, 7
  • Homework #7 due Friday, Oct 29
  • From Chapter 4: 8, 11, 13
  • Homework #8 due Friday, Nov 5
  • From Chapter 4: 16 (The part about error bounds is for extra credit.)
  • Homework #9 due Friday, Nov 12
  • From Chapter 5: 1, 2, 3, 4, 5
  • Homework #10 due Monday, Nov 29
  • From Chapter 6: 1, 3, 4
  • Erratum: Question 6.2, part 1: The formula for B_N(i,i+1) is missing a minus sign
  • Homework #11 due Monday, Dec 13
  • From Chapter 6: 14