Docsity

CS 417/517 Assignment 5: Solving Linear Systems and Matrix Conditioning, Assignments of Computer Science

Toggle sidebar
bg1
CS 417/517 Computational Methods and Software
Spring 2004
Assignment 5
Assigned: Thurs Feb 19, 2004; Due: Thurs Feb 26, 2004
1. Are the following statements true or false? Provide reasons for your answers. (No credit will
be given if you do not support your answer with a correct argument.)
(a) If a lower triangular matrix has a zero entry on its diagonal, then it must be singular.
(b) If a matrix has a zero entry on its diagonal, then it must be singular.
(c) If a system of linear equations is well-conditioned, then pivoting is unnecessary in
Gaussian elimination.
(d) The conditioning of a problem depends on the algorithm used to solve it.
(e) A stable algorithm applied to a well-conditioned problem necessarily produces an ac-
curate solution.
2. What is the absolute error in approximating πby 22/7? What is the relative error in the same
approximation? Give your answers accurate to three significant figures.
3. (a) Solve the system Ax =bin Matlab, where
A=
2 4 −2
4 9 −3
−2−1 7
, b =
2
8
10
,
by computing the LU factorization of A, and then solving triangular systems of equa-
tions involving Land U. Report L,U, and the solution vector x(all to three significant
figures).
(b) Use the LU factorization that you have computed to solve the system Ay =c, where
c=
4
8
−6
.
Do not refactor the matrix A. Report the solution vector to three significant figures.
4. What is the condition number of the following matrix when the ∞norm is used? You have
to find an answer without using Matlab, and explain how you did it!
A=
100
−210
−301
.

Partial preview of the text

Download CS 417/517 Assignment 5: Solving Linear Systems and Matrix Conditioning and more Assignments Computer Science in PDF only on Docsity!

CS 417/517 Computational Methods and Software

Spring 2004 Assignment 5 Assigned: Thurs Feb 19, 2004; Due: Thurs Feb 26, 2004

  1. Are the following statements true or false? Provide reasons for your answers. (No credit will be given if you do not support your answer with a correct argument.)

(a) If a lower triangular matrix has a zero entry on its diagonal, then it must be singular. (b) If a matrix has a zero entry on its diagonal, then it must be singular. (c) If a system of linear equations is well-conditioned, then pivoting is unnecessary in Gaussian elimination. (d) The conditioning of a problem depends on the algorithm used to solve it. (e) A stable algorithm applied to a well-conditioned problem necessarily produces an ac- curate solution.

  1. What is the absolute error in approximating π by 22 / 7? What is the relative error in the same approximation? Give your answers accurate to three significant figures.
  2. (a) Solve the system Ax = b in Matlab, where

A =

  

   ,^ b^ =

  

   ,

by computing the LU factorization of A, and then solving triangular systems of equa- tions involving L and U. Report L, U , and the solution vector x (all to three significant figures). (b) Use the LU factorization that you have computed to solve the system Ay = c, where

c =

  

  .

Do not refactor the matrix A. Report the solution vector to three significant figures.

  1. What is the condition number of the following matrix when the ∞ norm is used? You have to find an answer without using Matlab, and explain how you did it!

A =

  

  .