



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 24, 2003
NAME (print)
(a) Write down all the numbers that can be represented exactly in this system. (You may find it convenient to write the numbers as fractions, arranged on a straight line.) (b) Define the terms underflow limit and overflow limit for a general floating-point number system. Write down their values for the system at hand. (c) Define the term machine epsilon for a general floating-point number system, and write down its value for the system at hand. (d) Consider the matrix A =
i. Write down the matrix A as it would be stored in the machine under the above system. ii. Compute the value of the determinant of A. In carrying out this computation, assume that each floating-point operation is performed exactly, and then chopped appropriately for rep- resentation in the system.
(a) For the mantissa the choices (in binary and their fractional equivalents) are
. 1000 = 1 / 2 . 1001 = 9 / 16 . 1010 = 10 / 16 . 1011 = 11 / 16 . 1100 = 12 / 16 . 1101 = 13 / 16 . 1110 = 14 / 16 . 1111 = 15 / 16.
The allowable exponents are -1, 0 and 1, and correspond to the multiplication of the mantissa by 1/2, 1 and 2. The full resulting set is
1 / 4 , 9 / 32 , 10 / 32 , 11 / 32 , 12 / 32 , 13 / 32 , 14 / 32 , 15 / 32 ,
1 / 2 , 9 / 16 , 10 / 16 , 11 / 16 , 12 / 16 , 13 / 16 , 14 / 16 , 15 / 16 , 1 , 9 / 8 , 10 / 8 , 11 / 8 , 12 / 8 , 13 / 8 , 14 / 8 , 15 / 8.
(b) The UFL is the smallest positive number, and the OFL the largest positive number in the system. Here these are 1/4 and 15/8 respectively. (c) Macine epsilon is the smallest number for which float(1 + ) > 1. Here, mach = 1/ 8. (Re- member that rounding is specified to be by chopping.) (d) Each element of the matrix is entered into the system as itself if it is machine representable, or chopped to the immediately smaller machine number. Thus A is rendered as
The determinant is computed as float(15/16)−float(3/16) = 15/ 16 −0 = 15/16 since 3/16, being smaller than the UFL, is entered as 0.
(b) What does the term condition number mean in the context of the problem Ax = b? Find the condition number of the matrix A =
(a) Gaussian elimination by hand gives, for step 1, m 21 = − 1 / 2 , m 31 = 1. Then, the matrix A transforms into (^)
In step 2, m 32 = 1, leading to the upper triangular matrix
The corresponding lower triangular matrix, formed by starting with a unit matrix and inserting −mij in the appropriate positions, turns out to be
It is easily checked that LU = A. (b) Condition number determines the extent to which error in the solution vector x is affected by errors in the input matrix A or the input vector b. For a given relative input error, a large (small) condition number implies a large (small) relative output error. The determinant of A is 0.2, and the inverse matrix is
Using maximal row norms, ||A|| = 11, ||A−^1 || = 55, so that the condition number
κ(A) = ||A|| ||A−^1 || = 11 × 55 = 605.
(a) The relationship is ||x − xˆ|| ||x||
= κ(A)
||r|| ||b|| where xˆ is the computed solution, κ(A) the condition number of A and r = b − Ax.ˆ Small residual will imply a small error only if the problem is well-conditioned. (b) Pivoting ensures stability. In partial pivoting the column below the current pivot is scanned and a row exchange made to put the largest elemnt in the column in the pivot position. In complete pivoting the entire unreduced submatrix associated with the current pivot is scanned, and both row and column exchanges made to put the largest element in the submatrix in the pivot position. (c) If the errors in the iteration obey lim n→∞
||en+1|| ||en||r^
where r ≥ 1 and C is a constant, then r is the convergence rate. (For r = 1, we need C < 1. ) Bisection is linearly convergent and Newton’s method quadratically convergent. (d) None.