Math 450 Midterm 3

advertisement
Math 450 Midterm 3
1. Explain why there are
numerical
problems with solving the linear system
1 M M
1 1 2
by naive Gaussian elimination when M is large.
Solution.
Naive Gaussian forward elimination gives
1 M M
1 1 2
1
M
M
∼
0 1−M 2−M
Then back substitution gives x2 = 2−M
. For large enough M , this is x2 = 1 on the
1−M
computer. In this case, the next step of back substitution gives x1 = 0. However, as
M → ∞ the exact solution approaches x1 = x2 = 1.
1
2. Let A be a matrix of the form

a11 a12 a13
a21 a22 a23

A=
a31 0 a33
a41 0
0
a51 0
0
Write an ecient pseudocode for naive Gaussian
Solution.
a14
a24
a34
a44
0

a15
a25 

a35 
.
a45 
a55
forward
elimination on A.
An ecient pseudocode is
for k = 1 : 4
for i = k + 1 : 5
c = aik /akk
aik = 0
j =k+1:5
aij = aij − cakj
end
for
end
end
(though it can be improved slightly to avoid six subtractions.)
2
3. Let A be an n × n (strictly) diagonally dominant matrix.
(i) Must A have an LU factorization? Why or why not?
Yes. Diagonal dominance is preserved during naive forward elimination on A. Thus,
the diagonal entries must be nonzero at each step. This means naive forward elimination
is successful, or equivalently, A has an LU factorization.
(ii) Must A have a Cholesky factorization? Why or why not?
Solution.
No: A is not necessarily symmetric.
3
4. Find the LU factorization of the matrix
Solution.


1 2 0
A = 1 1 1
2 0 1
.
The factorization is


1 0 0
L = 1 1 0 ,
2 4 1


1 2
0
U = 0 −1 1  .
0 0 −3
4
5. Carry out two iterations of the Jacobi method for Ax = b where
A=
using the initial guess x
Solution.
(0)
5 1
,
2 6
3
b=
,
4
. What is the exact solution?
0
=
1
The iterations are
x
The exact solution is x =
(1)
=
2/5
,
2/3
x
.
1/2
1/2
5
(2)
=
7/15
.
8/15
Download
Related flashcards

Matrix theory

15 cards

Matrices

23 cards

Linear algebra

58 cards

Create Flashcards