CSC 338H5 S 2019 Midterm Test Duration — 60 minutes
Aids allowed: single-sided aid sheet, non-programmable calculator
Last Name:
Student Number: UTORid:
First Name:
0000000000 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 7777777777 8888888888 9999999999
Do not turn this page until you have received the signal to start.
Fill out the identification section above, write your name and bubble in the
Student Number on the top right, and read the instructions below.
Good Luck!
This test consists of 5 questions on 8 pages (including this page). When you receive the signal to start, please make sure that your copy is complete.
• Bubble in your student number on the top right corner of this page using either a pen or a pencil.
• If you use any space for rough work, indicate clearly what you want marked.
• There is one blank page at the back of the exam if you need more space.
• Do not remove any pages from the exam booklet.
#1: /8 #2: /6 #3: /4 #4: /10 #5: /12
TOTAL: /40
Total Pages = 8
Question 1. [8 marks]
Circle either “True” or “False” for each of the below statements.
1. True
2. True
3. True
4. True
5. True
6. True
7. True
8. True
False False
False False False
False
False False
The propagated data error is affected by the stability of the algorithm. A well-posed problem can be ill-conditioned.
The problem of factorizing a non-singular n×n matrix A into A = LU where L is lower triangular and U is upper triangular is well-posed.
The inverse of an elementary elimination matrix is upper triangular.
For an n×n matrix A, if cond(A) = 1, then A = I where I is the identity matrix.
2 7
The matrix A = 4 15 has a large condition number.
An n × n matrix A with cond(A) = 2.13 is ill-conditioned.
The product of two upper triangular matrices is upper triangular.
Midterm Test Winter 2019
Page 2 of 8
Midterm Test Winter 2019
Question 2. [6 marks]
Consider the normalized floating-point system F (β = 10, p = 3, L = −10, U = 10), where chopping is used
for rounding.
Part (a) [1 mark]
What is the representation of 1 in the floating-point system? (What are the values of the mantissa and
7
exponent?)
Part (b) [1 mark]
What is the representation of 1 in the floating-point system?
9
Part (c) [2 marks]
Compute f l( 1 ) − f l( 1 ), where the subtraction is floating-point subtraction.
79
Part (d) [2 marks]
What is the relative error of the result of part (c)? Write the relative error as a percentage, rounded to the nearest whole percent.
Page 3 of 8
Midterm Test Winter 2019
Question 3. [4 marks]
Consider, again, the normalized floating-point system F (β = 10, p = 3, L = −10, U = 10), where chopping
is used for rounding.
Suppose that we allow subnormal floating-point numbers in our system. How many subnormal floating- point numbers would we have?
Page 4 of 8
Midterm Test Winter 2019
Question 4. [10 marks]
Part (a) [5 marks]
Consider the condition number of the function (f ◦ g)(x) = f (g(x)). Is it true that the condition number of f ◦ g is equal to the product of the condition numbers of f and the condition number of g? In other words, prove or disprove the statement Kf ◦g (x) = Kf (g(x)) · Kg (x).
Part (b) [5 marks]
Show that cond(AB) ≤ cond(A)cond(B), where A and B are n × n non-singular matrices.
Page 5 of 8
1 2 3 041
Midterm Test Winter 2019
Question 5. [12 marks] Part (a) [6 marks]
Consider the following matrix. Find the LU factorization of A using Gauss Elimination. You do not need to use pivoting. Show your steps, and write your final result below.
A=0 8 1 L= U=
Page 6 of 8
Midterm Test Winter 2019
Part (b) [3 marks]
Solve the system Ax = b for b = [7, 4, 2]T using your results from part (a). Show all your work.
Part (c) [3 marks]
Compute ||A||1, ||x||1 and ||b||1, where A, b and x are from parts (a) and (b). Why would we expect that
||b||1 ≤ ||A||1? ||x||1
Page 7 of 8
Total Pages = 8 End of Test