
Math 6800
D. Schwendeman Problem Set 5
Due:
Thursday, 10/28/10
1. Text exercise 20.2, p.154. (What are the bandwidths of the factors Land Uof A? What
is the maximum number of nonzero elements in any column of L? Other observations?)
2. Text exercise 21.2, p.161. (Similar questions to those in problem 1 can be addressed.)
3. Text exercise 21.4, p.161.
4. Consider the n×nlinear system Ax =b. Write a program, called myLU say, that
computes the LU-factorization of Ausing partial pivoting following the algorithm discussed
in class. Your matlab function should take Aas input and return an n×nmatrix with
Land Upacked into it. There will also be a n-vector of integers on return that contains
the row interchanges implied by P. (Do not allocate a full n×nmatrix to store P.) Test
your program by constructing a 10 ×10 matrix with random elements and verifying that
kP A −LU k/kAk=O(mach). Compare your Land Ufactors with those given by matlab’s
built in function lu(A). If there are differences, explain them.
5. Write a program, called mySolve say, that computes the solution of Ax =busing forward
and backward substitutions and the PA =LU factorization. Your program should take as
input the right-hand-side vector band the Land Ufactors and pivoting vector from myLU.
(The Land Ufactors will be in packed form and Pwill be an n-vector of integers.) Test
your program on linear systems with n≥10. Consider a well-conditioned problem and an
ill-conditioned problem. Assess the stability of your algorithms and the accuracy of your
computed results.
Please note that it is not necessary to include printouts of big matrices in your solutions.
You can verify results by computing various norms and including these with your solutions.