Exercise Sheet 10 - Bergische Universität Wuppertal
Exercise Sheet 10 - Bergische Universität Wuppertal
Exercise Sheet 10 - Bergische Universität Wuppertal
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Bergische</strong> Universität <strong>Wuppertal</strong><br />
Faculty C - Department of Mathematics<br />
Prof. Dr. M. Bolten<br />
Dipl. Math. N. Božović<br />
Numerical Linear Algebra<br />
WS 2011/2012<br />
<strong>Exercise</strong> <strong>Sheet</strong> <strong>10</strong><br />
<strong>Exercise</strong> 1 (4 points)<br />
Gaussian elimination reduces a full matrix A to an upper-triangular matrix U. The<br />
key question for stability is whether amplification of the entries takes place during<br />
this reduction. In particular, let the growth factor for A be defined as the ratio<br />
ρ = max i,j |u ij |<br />
max i,j |a ij | . (1)<br />
If ρ is of order 1, not much growth has taken place, and the elimination process is<br />
stable. If ρ is bigger than this, we must expect instability.<br />
Write a MATLAB program that computes the Gaussian elimination with partial<br />
pivoting for given A ∈ R m×m and b ∈ R m . Furthermore, have your program compute<br />
the growth factor ρ defined in (1).<br />
Here “partial pivoting” means that in each step k of the elimination process, the<br />
largest entry in the first column of the submatrix Ã(k:m,k:m) is chosen as pivot. Note:<br />
Largest entry means the largest magnitude.<br />
<strong>Exercise</strong> 2 (4 points)<br />
a) Show that for Gaussian elimination with partial pivoting, applied to any matrix<br />
A ∈ C m×m , the growth factor (1) satisfies ρ ≤ 2 m−1 .<br />
b) Experiment with solving 60 × 60 systems of equations Ax = b by Gaussian<br />
elimination with partial pivoting, with A having the following form:<br />
⎡<br />
⎤<br />
1 1<br />
−1 1 1<br />
A =<br />
⎢−1 −1 1 1<br />
⎥<br />
⎣−1 −1 −1 1 1⎦ .<br />
−1 −1 −1 −1 1<br />
Do you observe that the results are useless because of the growth factor of<br />
order 2 60 At your first attempt you may not observe this, because the integer<br />
entries of A may prevent any rounding errors from occurring. If so, find a way<br />
to modify your problem slightly so that the growth factor is the same or nearly<br />
so and catastrophic rounding errors really do take place.<br />
– Continues on next page –
<strong>Exercise</strong> 3 (4 points)<br />
The idea of this exercise is to carry out an experiment analoguous to the one described<br />
in the lecture (householder_stability), but for the SVD instead of QR<br />
factorization.<br />
a) Write a MATLAB program that constructs a 50 × 50 matrix A=U*S*V’, where<br />
U and V are random orthogonal matrices (i.e. the Q of a QR-decomposition of a<br />
random matrix) and S is a diagonal matrix whose diagonal entries are random<br />
uniformly distributed numbers in [0, 1], sorted into nonincreasing order. Have<br />
your program compute [U2,S2,V2]=svd(A) and the norms of U-U2, V-V2, S-<br />
S2 and A-U2*S2*V2’. Do this for five matrices A and comment on the results.<br />
(Hint: Plots of diag(U2’*U2) and diag(V2’*V2) may be informative).<br />
b) Fix the signs in your computed SVD so that the difficulties of (a) go away.<br />
Run the program again for five random matrices and comment on the various<br />
norms. Do they have a connection with cond(A)<br />
c) Replace the diagonal entries of S by their sixth powers and repeat (b). Do you<br />
see significant differences between the results of this exercise and those of the<br />
experiment for QR factorization<br />
Hand in by: Tue., <strong>10</strong>.01.2012, in the exercise