CS计算机代考程序代写 algorithm University of Toronto Mississauga Department of Mathematical and Computational Sciences CSC 338 — Numerical Methods, Spring 2017

University of Toronto Mississauga Department of Mathematical and Computational Sciences CSC 338 — Numerical Methods, Spring 2017
Midterm Test
Name:
Student Number:
Closed book. 1-page, single-sided cheat sheet allowed (8.5x11in, no more than 6000 characters, 12pt font or larger if typed). No other aids allowed.
50 minutes. 7 pages. 4 questions. 50 points. Write all answers on the test booklet, using the backs of pages if necessary. The last page is blank. Clear, concise answers will receive more marks than long, rambling ones. Unless specified otherwise, all answers should be justified. Good luck!
I don’t know policy: If you do not know the answer to a question (or part), and you write “I don’t know”, you will receive 20% of the marks of that question (or part). If you just leave a question blank with no such statement, you will get 0 marks for that question.
1

1. (12 points) For each of the following statements, state whether it is true or false (without giving an explanation):
(a) A problem is ill-conditioned if its solution is highly sensitive to small changes in the problem data.
(b) If a matrix, A, is non-singular, then the number of solutions to the linear system Ax = b depends on the particular choice of right-hand side vector b.
(c) A symmetric positive definite matrix is always well-conditioned.
(d) The conditioning of a problem depends on the algorithm used to solve it.
(e) Once the LU factorization of a matrix has been computed to solve a linear system, then subsequent linear systems with the same matrix but different right-hand-side vectors can be solved without refactoring the matrix.
(f) If A is an n × n non-singular matrix, then cond(A) = cond(A−1).
2

2. (15 points total) In a floating-point number system having an underflow level of UFL = 10−35, which of the computations below will incur an underflow? Explain why. In each case where underflow occurs, is it reasonable to simply set the quantity that underflows to zero? Explain why.
(a) (5points) a=√b2 +c2, withb=1,c=10−20.
(b) (5points) a=√b2 +c2, withb=c=10−19.
(c) (5points) u=(v×w)/(y×z), withv=10−18,w=10−20,y=10−26,z=10−12.
3

3. (12 points) Suppose A, B and C are non-singular n × n matrices, and b is an n-vector. How would you efficiently evaluate the following expression without computing any matrix inverses:
C−1(A + B−1)(I + 5A)b
4

4. (11 points total) Linear Least Squares.
Suppose you are using Householder transformations to compute the QR factorization of the following matrix:
224 45 1
A=13 9 
2 7 12
(a) (2 points) How many Householder transformations are required?
(b) (5 points) Specify the first Householder transformation. (i.e., Give the vector v for the transformation.)
5

(c) (2 points) What does the first column of A become as a result of applying the first Householder transformation?
(d) (2 points) What does the first column of A then become as a result of applying the second Householder transformation?
6

This page is for answers and rough work
7