Docsity

Math221 Midterm Solutions: Stability, Condition, Linear Systems, Least Squares, QR, Exams of Mathematics

Toggle sidebar
bg1
Math221 Midterm, Oct. 18, 2007
1. On page 5 in the text, backward stability is defined as follows:
If alg(x)is our algorithm for f(x), including the effects of round-
off, we call alg(x)abackward stable algorithm for f(x)if for all xthere
is a “small” δx such that alg(x) = f(x+δx).δx is called the backward
error. Informally, we say that we get the exact answer (f(x+δx))
for a slightly wrong problem (x+δx).
Identify the xand f(x) for
•systems of linear equations.
•Least Squares problems.
•QR factorization.
In the first two cases, also identify a backward stable algorithm for computing f(x). In
the third case, explain why a backward stable algorithm might NOT exist. We exclude
overflow/underflow considerations.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Math221 Midterm Solutions: Stability, Condition, Linear Systems, Least Squares, QR and more Exams Mathematics in PDF only on Docsity!

Math221 Midterm, Oct. 18, 2007

  1. On page 5 in the text, backward stability is defined as follows:

If alg(x) is our algorithm for f (x), including the effects of round- off, we call alg(x) a backward stable algorithm for f (x) if for all x there is a “small” δx such that alg(x) = f (x + δx). δx is called the backward error. Informally, we say that we get the exact answer (f (x + δx)) for a slightly wrong problem (x + δx).

Identify the x and f (x) for

  • systems of linear equations.
  • Least Squares problems.
  • QR factorization.

In the first two cases, also identify a backward stable algorithm for computing f (x). In the third case, explain why a backward stable algorithm might NOT exist. We exclude overflow/underflow considerations.

  1. Let

A =

( I Z 0 I

) ,

where Z ∈ Rn×n^ and I is the identity matrix. Express the 2-norm condition number of A using the singular values of Z.

  1. Let H ∈ R^5 ×^5 be a matrix of the form

H =

   

x x x x x x x x x x x x x x x x x x x

   ^ ,

where all the x’s denote non-zero entries. Matrices with the non-zero pattern of H are called Hessenberg matrices. Show how to use 4 Givens rotations to QR factorize H.

  1. Consider the following variant of the least squares problem:

min x

( ‖Ax − b‖^22 + ρ^2 ‖x‖^22

) ,

where the matrix A, the vector b and scalar ρ > 0 are given. Find the normal equation for this problem and develop a QR-type algorithm for solving the normal equation.

  1. Let

A =

( I Z 0 I

) ,

where Z ∈ Rn×n^ and I is the identity matrix. Express the 2-norm condition number of A using the singular values of Z. Solution: Let Z = U ΣV T^ be the SVD of Z, then

A =

( U 0 0 V

) ( I Σ 0 I

) ( U T^0 0 V T

) .

Of the three matrices on the right hand side, only the middle matrix is not orthogonal, and its singular values are the singular values of A. Each diagonal entry σ of Σ induces a pair of singular values in the 2 × 2 matrix ( 1 σ 0 1

) .

These singular values are (^) √ 2 + σ^2 ± σ

σ^2 + 4 2

The singular values of A are all these pairs of singular values. Hence the 2-norm condition number of A is (^) √ √√ √√ 2 +^ σ (^2) max + σmax

√ σ^2 max + 4

2 + σmin^2 + σmin

√ σmin^2 + 4

  1. Let T be an m × m lower triangular matrix and b be an m-vector. Show how to solve the m × m linear system of equations T x = b in about m^2 flops. Solution: Forward substitution.
  1. Consider the following variant of the least squares problem:

min x

( ‖Ax − b‖^22 + ρ^2 ‖x‖^22

) ,

where the matrix A, the vector b and scalar ρ > 0 are given. Find the normal equation for this problem and develop a QR-type algorithm for solving the normal equation. Solution: We let  =

( A ρI

) and ̂b =

( b 0

) .

Then the given problem becomes minx ‖ Ax̂ − ̂b‖^22 ,

to which the standard QR factorization method can be applied.