Math 6800 Problem Set 5: LU Factorization and Solution using MATLAB - Prof. Donald W. Schw, Assignments of Linear Algebra

Problem set 5 for math 6800, where students are required to write programs for lu-factorization and solution of a linear system using matlab. The problem set includes instructions for writing the functions 'mylu' and 'mysolve', as well as testing and comparing results with matlab's built-in functions.

Typology: Assignments

2011/2012

Uploaded on 02/17/2012

koofers-user-4uz
koofers-user-4uz 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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 n10. 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.
pf3
pf4
pf5

Partial preview of the text

Download Math 6800 Problem Set 5: LU Factorization and Solution using MATLAB - Prof. Donald W. Schw and more Assignments Linear Algebra in PDF only on Docsity!

Math 6800

D. Schwendeman Problem Set 5

Due: Thursday, 10/28/

  1. Text exercise 20.2, p.154. (What are the bandwidths of the factors L and U of 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 × n linear system Ax = b. Write a program, called myLU say, that computes the LU-factorization of A using partial pivoting following the algorithm discussed in class. Your matlab function should take A as input and return an n × n matrix with L and U packed 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 × n matrix to store P .) Test your program by constructing a 10 × 10 matrix with random elements and verifying that ‖P A − LU ‖/‖A‖ = O(mach). Compare your L and U factors 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 = b using forward and backward substitutions and the P A = LU factorization. Your program should take as input the right-hand-side vector b and the L and U factors and pivoting vector from myLU. (The L and U factors will be in packed form and P will 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.