AMATH 341 / CM 271 / CS 371
Assignment 6
Due : Friday March 19, 2010
Instructor: K. D. Papoulia
1. Suppose
A
is an
n
×
n
symmetric positive definite matrix.
(a) Derive the Cholesky algorithm for factorizing
A
=
R
T
R
, where
R
is an upper tri
angular matrix with positive diagonal entries. Note: at some points of the algorithm,
it may be necessary to take a square root or a quotient. You may assume without
proof that the quantities under the square root sign are nonnegative and quantities
in the denominators are nonzero. Hint: use the equation
R
T
R
=
A
to deduce the en
tries of
R
in the right order. For example, by considering the (1
,
1) entry, we obtain
the equation
R
(1
,
1)
R
(1
,
1) =
A
(1
,
1), i.e.,
R
(1
,
1) =
√
A
(1
,
1)
.
Then the equation
for the (1
,
2) entry yields
R
(1
,
2)
R
(1
,
1) =
A
(1
,
2), i.e.,
R
(1
,
2) =
A
(1
,
2)
/R
(1
,
1),
where
R
(1
,
1) has already been determined. Proceed in this manner.
(b) Determine the number of arithmetic operations for Cholesky factorization as a
function of
n
, up to the leading term. Note: count square root as one arithmetic
operation. Hint: the formula
∑
n
i
=1
i
p
=
n
p
+1
/
(
p
+ 1) +
O
(
n
p
) is useful for this kind
of problem.
2. Implement the GaussSeidel algorithm in Matlab using only primitive commands
(i.e., do not appeal to the builtin linear algebra functionality of Matlab).
(a) Use the stopping criterion
∥
A
x
k
−
b
∥
< tol
. (You may use the Matlab command
norm
to implement this). Your algorithm should print out the number of iterations
it took to achieve the tolerance and the final estimate of
x
. It should check for error
cases, such as when a division by zero occurs, and handle them appropriately, e.g.,
you could use the Matlab command
error
.
(b) Modify your algorithm to use a
relative
stopping condition, given by
∥
A
x
k
−
b
∥
∥
A
x
0
−
b
∥
< tol.
(c) For the systems
A
x
=
b
with
(a)
A
=
2
1
0
1
3
1
0
.
01
0
0
.
05
b
=
2
4
3
(b)
A
=
4
1
1
0
1
−
1
−
3
1
1
0
2
1
5
−
1
−
1
−
1
−
1
3
4
0
0
2
−
1
1
4
b
=
6
6
6
6
6
(i) Determine if the matrix
A
is strictly diagonally dominant.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 Papoulia,Katerina
 Matrices, Diagonal matrix, Triangular matrix, relative convergence tol

Click to edit the document details