



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




February 27, 2012
NAME (print)
(a) (12 points) Write a T or an F, as appropriate, next to the number of each of the following True/False questions. i. True or False: Using higher-precision arithmetic will not make an ill-conditioned problem better conditioned. T ii. True or False: If two real numbers are exactly representable as floating-point numbers, then so is their sum. F iii. True or False: A stable algorithm will produce an accurate solution regardless of the condition number of the problem being solved. F iv. True or False: The norm of a singular matrix is not necessarily zero. T v. True or False: If a matrix has a zero entry on the main diagonal, then it is necessarily singular. F vi. True or False: A system of linear equations Ax = b can have exactly two distinct solutions. F
(b) (12 points) i. (6 points) Define the term machine epsilon. What is its value in a p -digit binary floating point system? How is it related to the relative error incurred when a number x is replaced by its floating-point approximation y obtained by rounding to nearest? Machine epsilon, mach, is the spacing between the number 1 and the machine number im- mediately larger than 1. Its value is 1/ 2 pโ^1. The upper bound on the relative error incurred is mach/ 2.
ii. (6 points) Consider a p -digit, normalized, decimal system with exponent range [L, U ]. What are the smallest values of p and U and the largest value of L such that both 5632.27 and 0 .0000215 can be represented exactly in the system? Note that 0 .0000215 = 2. 15 ร 10 โ^5 , 5632 .27 = 5. 63227 ร 103. Therefore, p = 6, U = 3 and L = โ5 will suffice.
(a) (15 points)Consider the problem Ax = b, where
๏ฃป (^) , b =
i. Apply the method of partial pivoting to the problem and carry it as far as you can. (As you update the various entries, keep them as fractions rather than decimals.) ii. If the procedure is successful, then find the solution x. If the procedure fails, then at what point does it fail? State the reason for failure. iii. If the problem has a solution x in case the procedure fails, then find it in its most general form, or else state that the solution does not exist.
i. Consider the augmented matrix A|b. Begin by interchanging R 1 and R 2 to put the maximal element in the pivot position.
A|b โ
The operations R 2 โ R 2 โ (1/4)R 1 and R 3 โ R 3 โ (1/2)R 1 yield
A|b โ
Interchange R 2 and R 3.
A|b โ
Replace R 3 by R 3 + (1/2)R 2.
A|b โ
ii. The appearance of zeros in the last row signals a singular matrix and hence the end of the elimination process. iii. Since all entries in the third row of the augmented matrix are zeros, the system is consistent. With x 3 arbitrary, a back substitution finds that
x 2 =
โ2(1 + 3x 3 ) 3
, x 1 =
2 โ 6 x 3 โ 5 x 2 4
(b) (5 points) This problem is unrelated to that in part (a) above. Assume that you have computed the LU - decomposition of a nonsingular matrix A. How will you use it to solve the system AT^ x = b? The system can be written as U T^ LT^ x = b, and then split into a lower triangular system U T^ c = b and an upper triangular system LT^ x = c. The first triangular system can be solved by forward substitution for c and the second by backward substitution for x respectively.
(a) (10 points) Let x be the exact solution and xc the computed solution of the system Ax = b. i. Define the terms relative residual and relative output error. ii. Derive a relationship between the above two terms, and hence deduce the condition under which a small relative residual implies a small relative error in the output.
i. The relative residual can be defined as
Rr =
||b โ Axc|| ||A||||xc||
and the relative output error as Er =
||x โ xc|| ||xc||
ii. We can write
Er =
||Aโ^1 [Ax โ Axc]|| ||xc||
=
||Aโ^1 [b โ Axc]|| ||xc||
โค
||Aโ^1 ||||b โ Axc|| ||xc||
||A||||Aโ^1 ||||b โ Axc|| ||A||||xc||
= ฮบ(A)Rr.
Thus a small relative residual implies a small output error only if the condition number ฮบ(A) is moderate.
f (h) = eh^ โ 1 h
(a) ( 6 points) Show analytically that L = limhโ 0 f (h) = 1. (b) (9 points) The attached figure shows a MATLAB-generated plot of f (h) against h. The plot is jagged and appears to suggest that the limit L is zero. What is the reason for the jaggedness and for the incorrect result about the limit? Explain, in particular, why the values of f (h) drop to zero for |h| near 10โ^16.
โ
(a) Upon using LโHopitalโs rule,
lim hโ 0 f (h) = lim hโ 0
eh 1
(b) Recall that f (h) = eh^ โ 1 h
[1 + h + h^2 /2 + ยท ยท ยท ] โ 1 h
As h is made smaller and smaller in the numerical calculation, eh^ gets closer and closer to 1, leading to catastrophic cancellation and hence loss of significance in the numerator. Rounding can be upward or downward, leading to the jagged appearance in the graph. When h falls below the unit roundoff, which is around 10โ^16 in Matlab, eh^ โผ 1 + h is approximated in the floating- point system as 1, and theregfore the numerator as zero. In the denominator, though, h remains nonzero until it falls below the UFL which, in MATLAB, has a value around 10โ^308. Hence the graph displays an apparent limit of zero.