Sunteți pe pagina 1din 8

NAME: CS 357 Numerical Methods - 2 No computers, calculators, books, notes, or crib sheets allowed.

netid: Fall 2011 Tue, October 4 Midterm 1

1. [5pt] True or False There is only a nite number of elements in the oating point system F = (10, 5, 20, 20).

2. [5pt] True or False Every real number x R is exactly representable by an IEEE-754 single precision machine number. 3. [5pt] True or False For a, b, and c stored in IEEE-754 single precision, a + (b + c) = (a + b) + c.

4. [5pt] True or False The number 0.1 105 is not one of the elements of the oating point system F = (2, 3, 5, 5). 5. [5pt] True or False The IEEE-754 oating point representations are uniformly distributed on the real line with a hole in zero. 6. [35pt] Given a oating point system F , write the normalized oating point representation, a, for the number a in each of the following cases (assume chopping is used). Fill in the value for a in the space provided. Use notation (a)2 to represent the number a in binary system. If there are no parenthesis, assume a is in decimal system.

(a) [5pt] F (10, 3, 5, 5),

a = 131.24,

a=

(b) [5pt] F (10, 3, 5, 5),

a = 0.01011,

a=

(c) [5pt] F (2, 24, 126, 127),

a = (0.011010010)2 29 ,

a=

(d) [10pt] F (2, 2, 126, 126),

a = 57,

a=

(e) [10pt] F (2, 3, 3, 3),

a = 5/7,

a=

NAME:

netid:

CS 357 Numerical Methods - 2 No computers, calculators, books, notes, or crib sheets allowed.

Fall 2011 Tue, October 4 Midterm 1

7. [10pt] What is an approximation of f (1) using the rst two terms in the Taylor series expansion (that is, Taylor polynomial of rst order) about the point x0 = 0 of the function f (x) = (a) 1/2 (b) -1/3 (c) 1/4 (d) -1/4 (e) -1/12 1 x+2

8. [5pt] What is the absolute error for the approximation of f (1) in Problem 7? (a) 1/2 (b) -1/3 (c) 1/4 (d) -1/4 (e) -1/12

9. [5pt] What is the relative error for the approximation of f (1) in Problem 7? (a) 1/2 (b) -1/3 (c) 1/4 (d) -1/4 (e) -1/12

10. [5pt] True or False Using the rst three terms of the Maclaurin series expansion ex = 1+x+ x + x + x +... 2! 3! 4! versus using only the rst two terms increases the number of correct decimals in the approximation of e4 .

NAME:

netid:

CS 357 Numerical Methods - 2 No computers, calculators, books, notes, or crib sheets allowed.

Fall 2011 Tue, October 4 Midterm 1

11. [10pt] What is the exact number of oating point operations in the following implementation of the forward substitution algorithm for a linear system Lx = b, in which L is a n n lower triangular matrix , x is a n 1 vector, and the right hand side, b, is a n 1 vector? 1. 2. 3. 4. 5. 6. 7. 8. 9. given L , b x1 = b1 /11 for i = 2...n s = bi for j = 1...i 1 s = s i,j xj end xi = s/i,i end

Write your answer here: 12. [5pt] Suppose A and B are n n real matrices. What is the best asymptotic bound on the number of ops needed to compute the product AB? (a) O(1) (b) O(n) (c) O(n2 ) (d) O(n3 ) (e) O(n4 ) 13. [5pt] Suppose A is an n n real matrix and v is an n 1 real vector. What is the best asymptotic bound on the number of ops needed to compute the quadratic form v T Av? (a) O(1) (b) O(n) (c) O(n2 ) (d) O(n3 ) (e) O(n4 )

14. [35pt] For each of the following matrices, ll in the elements of its inverse and the inverses determinant in the spaces provided below:

1 0 (a) [5pt] A = 0 3 0 0

0 0 , 1

det(A1 ) =

1 (b) [5pt] B = 1/2 0

0 1 0

0 0 , 1

det(B 1 ) =

1 (c) [5pt] C = 0 0

0 0 0 1 , 1 0

det(C 1 ) =

(d) [20pt] D = CBA,

det(D1 ) =

NAME:

netid:

CS 357 Numerical Methods - 2 No computers, calculators, books, notes, or crib sheets allowed.

Fall 2011 Tue, October 4 Midterm 1

15. [5pt] True or False For a symmetric positive-denite matrix A, LU factorization can always be performed without pivoting. 16. [5pt] True or False For a symmetric positive-denite matrix A, performing Cholesky factorization requires less ops than performing LU factorization. 17. [20pt] For the matrix A= m 2 2 4

in the spaces provided below write an integer m such that A becomes: (a) [5pt] singular, m = (b) [5pt] not singular, m = (c) [5pt] positive-denite, m = (d) [5pt] not positive-denite, m =

18. [15pt] For the linear system Ax = m 2 2 4 x1 x2 = 2 6 =b

does there exist an integer m such that the system has: (a) [5pt] a unique solution, m = (b) [5pt] innitely many solutions, m = (c) [5pt] no solutions, m =

If such m exists, write it in the spaces provided above for each of the cases, otherwise write does not exist.

NAME:

netid:

CS 357 Numerical Methods - 2 No computers, calculators, books, notes, or crib sheets allowed.

Fall 2011 Tue, October 4 Midterm 1

19. [20pt] For the matrix 0 2 1 A= 3 1 2 0 4 1 perform the LU factorization, such that P A = LU , in which P is a permutation matrix, L is a lower triangular matrix, and U is an upper triangular matrix. Fill in the values you obtained for each of the matrices below:

P =

L= U =

NAME:

netid:

CS 357 Numerical Methods - 2 No computers, calculators, books, notes, or crib sheets allowed.

Fall 2011 Tue, October 4 Midterm 1

20. [15pt] For the matrix A= 4 2 2 8

perform the Cholesky factorization, such that A = CC T , in which C is lower triangular. Fill in the values you obtained for C:

C=

NAME:

netid:

CS 357 Numerical Methods - 2 No computers, calculators, books, notes, or crib sheets allowed.

Fall 2011 Tue, October 4 Midterm 1

21. [20pt] Prove that the function f (x, y, z) = 3x2 24xy + 18xz 52yz + 53y 2 + 53z 2 is globally non-negative by reducing it to a sum of squares. Fill in the obtained sum of squares here: f (x, y, z) =

22. [10pt] Prove that the function f (x, y) is globally non-negative. Find the global minimum of f (x, y). f (x, y) = [x 2 y 1] 2 1 1 4 x2 y1

S-ar putea să vă placă și