Docsity

Midterm Exam Spring 2011 - Numerical Analysis | CS 450, Exams of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
CS450, Spring 2011, Midterm
1. Why is it desirable to use a stable algorithm in numerical computation?
(a) It will improve the conditioning of the underlying problem.
(b) It will always produce accurate results.
(c) It is relatively insensitive to changes in the input data.
(d) It is relatively insensitive to errors made during the computation.
2. Consider the infinite series 1
1−x= 1 + x+x2+x3+· · · ,
which is valid for |x|<1. If we truncate the series after the second term, we obtain the approximation
1
1−x≈1 + x,
which might be useful if division were unavailable on a given calculator. What is the maginitude of the
backward error in using this approximation to compute 1/(1 −x) for the argument x= 1/2?
(a) 1/6
(b) 1/3
(c) 1/2
(d) 3/2
3. Which of the following is a legitimate reason why cancellation in floating-point computation is usually bad?
(a) The result is usually not exactly representable.
(b) The digits lost are the most significant.
(c) The digits lost are the least significant.
(d) Subsequent operations are likely to underflow or overflow.
4. Consider the following Matlab program
a = 1.0;
while (a + 1.0) > 1.0
a = a / 2.0;
end
disp(2.0*a);
What will be the outcome of this program?
(a) It will terminate when ais less than Underflow (UFL), and display 0.
(b) It will terminate when ais less than mach, and display 0.
(c) It will terminate when ais less than mach, and display the value of mach.
(d) It will never terminate.
5. Which of the following is not a reasonable definition of unit roundoff, mach?
(a) The minimum distance between two floating point numbers, x6=y, with x, y ∈[100,101).
(b) The maximum relative error in representing any nonzero real number.
(c) The smallest representable positive normalized machine number.
(d) The smallest for which fl (1 + )>1.
pf3
pf4

Partial preview of the text

Download Midterm Exam Spring 2011 - Numerical Analysis | CS 450 and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

CS450, Spring 2011, Midterm

  1. Why is it desirable to use a stable algorithm in numerical computation? (a) It will improve the conditioning of the underlying problem. (b) It will always produce accurate results. (c) It is relatively insensitive to changes in the input data. (d) It is relatively insensitive to errors made during the computation.
  2. Consider the infinite series (^1) 1 − x = 1 +^ x^ +^ x

(^2) + x (^3) + · · · ,

which is valid for |x| < 1. If we truncate the series after the second term, we obtain the approximation 1 1 − x ≈^ 1 +^ x, which might be useful if division were unavailable on a given calculator. What is the maginitude of the backward error in using this approximation to compute 1/(1 − x) for the argument x = 1/2? (a) 1/ 6 (b) 1/ 3 (c) 1/ 2 (d) 3/ 2

  1. Which of the following is a legitimate reason why cancellation in floating-point computation is usually bad? (a) The result is usually not exactly representable. (b) The digits lost are the most significant. (c) The digits lost are the least significant. (d) Subsequent operations are likely to underflow or overflow.
  2. Consider the following Matlab program

a = 1.0; while (a + 1.0) > 1. a = a / 2.0; end disp(2.0*a);

What will be the outcome of this program? (a) It will terminate when a is less than Underflow (UFL), and display 0. (b) It will terminate when a is less than mach, and display 0. (c) It will terminate when a is less than mach, and display the value of mach. (d) It will never terminate.

  1. Which of the following is not a reasonable definition of unit roundoff, mach? (a) The minimum distance between two floating point numbers, x 6 = y, with x, y ∈ [10^0 , 101 ). (b) The maximum relative error in representing any nonzero real number. (c) The smallest representable positive normalized machine number. (d) The smallest  for which fl (1 + ) > 1.
  1. What is the condition number of the following matrix?  

(a) 2 (b) 4/ 3 (c) 1/ 3 (d) 1/ 6

  1. What is the complexity of solving Ax = b given an LU factorization of A ∈ Rn×n? (a) O

[

n^3

]

(b) O

[

n^2

]

(c) O [n] (d) O [1]

  1. What is the complexity of computing an LU factorization of A ∈ Rn×n^ for solving Ax = b? (a) O

[

n^4

]

(b) O [n^3 ] (c) O

[

n^2

]

(d) O [n]

  1. Suppose you are solving an n × n linear system Ax = b by Gaussian elimination with partial pivoting followed by back substitution. If the matrix A is highly ill-conditioned, what are the likely consequences? (a) The error in the computed solution will be relatively large. (b) The residual will be relatively large. (c) The solution will be relatively insensitive to changes in the data. (d) All of the above.
  2. When does a small residual indicate that an approximate solution to an n × n linear system Ax = b is accurate? (a) Always (b) When the matrix A is nonsingular (c) When the matrix A is well-conditioned (d) Never
  3. Under what condition does an m × n linear system Ax ∼= b have a least squares solution?

(a) When b lies in the span(A). (b) When rank(A) = n (c) When rank(A) = m (d) Always

  1. What is the Rayleigh quotient estimate of the eigenvalue corresponding to approximate eigenvector[ x = − 1 1

]

for the matrix A =

[

]

(a) 6 (b) 4 (c) 2 (d) 1

  1. Consider computing the roots of a function f : Rn^ → Rn^ in floating point arithmetic. What property of f and a root x∗^ most directly affects the conditioning of this problem? (a) f (x∗) (b) Jf (x∗) (Jacobian) (c) Hf (x∗) (Hessian) (d) J f− 1 (x∗)f (x∗)
  2. In using fixed-point iteration based on the fixed-point problem x = g(x) to find a root x∗^ of a nonlinear equation f (x) = 0, what are the relative advantages in terms of the convergence rate if either g or f has a horizontal tangent at x∗? (a) Horizontal tangent of g is more favorable. (b) Horizontal tangent of f is more favorable. (c) Neither is favorable. (d) Both are equally favorable.
  3. Which of the following properites is not true of the interval bisection method for finding a zero of a nonlinear function? (a) The number of iterations required to attain a given accuracy depends on the particular function. (b) Its convergence rate is linear. (c) It gains one bit of accuracy per iteraiton. (d) It always converges.
  4. Consider using Newton’s method to find a root of the polynomial p(x) = x^3 − 5, using an initial guess of x 0 = 2. What is the result of a single iteration, x 1? (a) 7/ 4 (b) 5/ 4 (c) 3/ 4 (d) 1/ 4
  5. Suppose you applied an iterative numerical method for finding the roots of a scalar function, f (x) = 0, starting from an initial guess of x 0. The error in the approximate solution at the kth step, ek = |xk − x∗|, is given by the following sequence, k 1 2 3 4 ek 1 e − 2 1 e − 4 1 e − 8 1 e − 16 what is the rate of convergence? (a) Linear (b) Superlinear (but less than quadratic) (c) Quadratic (d) Cubic