CS323: Numerical Analysis and Computing Homework #2

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

CS323: Numerical Analysis and Computing Homework #2

For all programming assignments, please turn in your code along with your solution. Submissions should be made on Sakai.

Problem 1

Let A∈Rn×n�∈��×� be any matrix, and I be the n×n�×� identity matrix. Show that the matrix Lk=I+mkeTk��=�+����� is the inverse of the matrix Mk=I−mkeTk��=�−�����, where Mk�� is the elimination matrix for the kth��ℎ column ak�� of A.

Problem 2

Write a program to compute the LU decomposition of a matrix A using the concept of elimination matrices. Use it to solve the following system:

A=⎡⎣⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢21174112142112331322231178715148135359512814585751976551131113111392322152313871711192678232692431725711134356919917171611⎤⎦⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎡⎣⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢x1x2x3x4x5x6x7x8x9⎤⎦⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥=⎡⎣⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢257169483⎤⎦⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥�=[21321486911351728145523191641231351122267912115831572519147351123879285711323111711795382613172315191179416315127131724311][�1�2�3�4�5�6�7�8�9]=[257169483]

Problem 3

Suppose that ∥⋅∥a‖⋅‖� and ∥⋅∥b‖⋅‖� are two equivalent vector norms in Rn��. Thus, by definition, there exist two constants c,d>0�,�>0 such that for any vector x∈Rn�∈��, we have

c∥x∥a≤∥x∥b≤d∥x∥a�‖�‖�≤‖�‖�≤�‖�‖�

Prove that their induced matrix norms are also equivalent, i.e., there exist two constants c′,d′>0�′,�′>0 such that for any matrix A∈Rn×n�∈��×�

c′∥A∥a≤∥A∥b≤d′∥A∥a�′‖�‖�≤‖�‖�≤�′‖�‖�

Problem 4

  1. Use a single-precision routine for Gaussian elimination to solve the system Ax=b��=� defined below
⎡⎣⎢⎢⎢21.076.00.019.367.063.085.043.088.07.056.030.273.020.054.029.4⎤⎦⎥⎥⎥⎡⎣⎢⎢⎢x1x2x3x4⎤⎦⎥⎥⎥=⎡⎣⎢⎢⎢141.0109.0218.093.7⎤⎦⎥⎥⎥[21.067.088.073.076.063.07.020.00.085.056.054.019.343.030.229.4][�1�2�3�4]=[141.0109.0218.093.7]
  1. Compute the residual r=b−Ax�=�−�� using double-precision arithmetic, but storing the final result in a single-precision vector r. (Note that the solution routine may destroy the matrix A, so you may need to save a separate copy for computing the residual.)
  2. Solve the linear system Az=r��=� to obtain the “improved” solution x+z�+�. (Note that the matrix A need not be refactored.)
  3. Repeat steps b)�) and c)�) until no further improvement is observed.

Problem 5

Use Gaussian elimination without pivoting to solve the linear system

[ε111][x1x2]=[1+ε2][�111][�1�2]=[1+�2]

for ε=10−2k�=10−2�, where k=1,2,…,10�=1,2,…,10. The exact solution is x=(1,1)T�=(1,1)�, independent of the value of ε. How does the acccuracy of the computed solution behave as the value of ε decreases?

发表评论

电子邮件地址不会被公开。 必填项已用*标注