Anda di halaman 1dari 3

Problem Set 1 B

IMPORTANT:
• You don’t need to turn in this problem set.
• The computer problems are marked by †.

Problem 1. The Euclidean norm of an n-dimensional vector x is defined by


( n )1/2

∥x∥2 = x2i .
i=1

How would you avoid overflow and harmful underflow in this computation?

Problem 2. Consider the following claim: if two floating-point numbers x and y


with the same sign differ by a factor of at most the base β (i.e., 1/β ≤ x/y ≤ β),
then their difference, x − y, is exactly representable in the floating-point system.
Show that this claim is true for β = 2, but give a counterexample for β > 2.

Problem 3. † The polynomial (x − 1)6 has the value zero at x = 1 and is positive
elsewhere. The expanded form of the polynomial, x6 − 6x5 + 15x4 − 20x3 + 15x2 −
6x + 1, is mathematically equivalent but may not give the same results numerically.
Compute and plot the values of this polynomial, using each of the two forms, for
101 equally spaced points in the interval [0.995, 1.005], i.e., with a spacing of 0.0001.
Your plot should be scaled so that the values for x and for the polynomial use the
full ranges of their respective axes. Can you explain this behavior?

Problem 4. † Write a program to generate the first n terms in the sequence given
by the difference equation
xk+1 = 2.25xk − 0.5xk−1 ,
with starting values
1 1
x1 = and x2 = .
3 12
Use n = 25 if you are working in single precision, n = 60 if you are working in
double precision. Make a semilog plot of the values you obtain as a function of k.
The exact solution of the difference equation is given by
41−k
xk = ,
3
which decreases monotonically as k increases. Does your graph confirm this theo-
retically expected behavior? Can you explain your results? (Hint: Find the general
solution to the difference equation.)

1
Problem 5. Let A be an n × n matrix such that A2 = O, the zero matrix. Show
that A must be singular.

Problem 6. Let [ ]
1 1+ϵ
A= .
1−ϵ 1
(a) What is the determinant of A?
(b) In floating-point arithmetic, for what range of values of ϵ will the computed
value of the determinant be zero?
(c) What is the LU factorization of A?
(d) In floating-point arithmetic, for what range of values of ϵ will the computed
value of U be singular?

Problem 7. Prove that the matrix


[ ]
0 1
A=
1 0
has no LU factorization, i.e., no lower triangular matrix L and upper triangular
matrix U exist such that A = LU .

Problem 8. Prove that the Sherman-Morrison formula


( )−1 ( )−1 T −1
A − uv T = A−1 + A−1 u 1 − v T A−1 u v A
is correct.

Problem 9. In a general sense, the definition of a matrix norm can be taken to


be any real-valued function of a matrix satisfying the following three properties:
1. ∥A∥ > 0 if A ̸= O.
2. ∥γA∥ = |γ| · ∥A∥ for any scalar γ.
3. ∥A + B∥ ≤ ∥A∥ + ∥B∥.
where A and B are any matrices, and O is zero matrix.
Show that the following functions of an m×n matrix A satisfy the above definition
of a matrix norm and hence are matrix norms in the general sense.
(a)
∥A∥max = max |aij |
i,j

Note that this is simply the ∞-norm of A considered as a vector in Rmn .


(b)
( )1/2

∥A∥F = |aij |2
i,j

Note that this is simply the 2-norm of A considered as a vector in Rmn . It is


called the Frobenius matrix norm.

2
Problem 10. Let A be a band matrix with bandwidth β, and suppose that the
LU factorization P A = LU is computed using Gaussian elimination with partial
pivoting. Show that the bandwidth of the upper triangular factor U is at most 2β.

Problem 11. † The determinant of a triangular matrix is equal to the product of


its diagonal entries. Use this fact to develop a routine for computing the determinant
of an arbitrary n × n matrix A by using its LU factorization. You may use a
library routine for Gaussian elimination with partial pivoting to obtain the LU
factorization, or you may design your own routine. How can you determine the
proper sign for the determinant? To avoid risk of overflow or underflow, you may
wish to consider computing the logarithm of the determinant instead of the actual
value of the determinant.

Anda mungkin juga menyukai