18.335 Problem Set 4 Solutions
Problem 1: Qs R us (10+15 points)
(a) In nite precision, instead of w = A1 v, we will get w = w + w where w = (A + A)1 A w (from
the formula on page 95), where A = O(mac
18.335 Problem Set 3 Solutions
Problem 1: SVD and low-rank approximations (5+10+10+10 pts)
(a) A = QR, where the columns of Q are orthonormal and hence Q Q = I . Therefore, A A = (QR) (QR) =
R (Q Q
18.335 Problem Set 4 Solutions
Problem 1: Hessenberg ahead! (10+10+10 points)
(a) (Essentially the same recurrence is explained in equation 30.8 in the text.) You can derive this re
currence relation
18.335 Problem Set 1 Solutions
Problem 1: Gaussian elimination
The inner loop of LU, the loop over rows, subtracts from each row a dierent multiple of the pivot
row. But this is exactly a rank-1 updat
18.335 Midterm Solutions
Problem 1: Schur, backsubstitution, complexity (20 points)
You are given matrices A (m m), B (n n), and C (m n), and want to solve for an unknown matrix X
(m n) solving:
AX X
18.335 Fall 2008
Performance Experiments
with Matrix Multiplication
Steven G. Johnson
Hardware: 2.66GHz Intel Core 2 Duo
64-bit mode, double precision, gcc 4.1.2
optimized BLAS dgemm: ATLAS 3.6.0
http
18.335 Problem Set 2 Solutions
Problem 1: Floating-point
(a) The smallest integer that cannot be exactly represented is n = t + 1 (for base- with a t -digit man
tissa). You might be tempted to think t
Experiments with
Cache-Oblivious
Matrix Multiplication
for 18.335
Steven G. Johnson
MIT Applied Math
platform: 2.66GHz Intel Core 2 Duo,
GNU/Linux + gcc 4.1.2 (-O3) (64-bit), double precision
(optimal
CPU
ideal cache
Z items
main memory
cache hit: CPU needs item in cache (fast)
cache miss: CPU needs item not in cache
item loaded into cache for future use, replacing some other item
optimal replacem
18.335 Midterm, Fall 2010
generally a problem for the convergence of this
algorithm, but 1 = 2 is not a problem (assume
A is diagonalizable).
You have 2 hours.
(b) Compare and contrast the convergence
18.335 Midterm, Fall 2011
Problem 3: (15+10 points)
(a) The following two sub-parts can be solved independently (you can answer the second part even
if you fail to prove the rst part):
Problem 1: (10+
18.335 Problem Set 2 Solutions
Problem 1: (5+10)
(a) The smallest integer that cannot be exactly represented is n = t + 1 (for base- with a t -digit mantissa). You might be tempted to think that t can
18.335 Problem Set 1 Solutions
Problem 1: (15 points)
The inner loop of LU, the loop over rows, subtracts from each row a dierent multiple of the pivot
row. But this is exactly a rank-1 update U U xy
18.335 Midterm Solutions, Fall 2013
Problem 1: GMRES (20 points)
(a) We assume A is nonsingular, in which case An b = 0 (except in the trivial case b = 0, for which we
already have an exact solution x
18.335 Midterm Solutions, Fall 2012
Problem 1: (25 points)
Note that your solutions in this problem dont require you to know how sin, ln, and are calculated on a
computer, because the answers rely on
18.335 Midterm Solutions, Fall 2011
Problem 1: (10+15 points)
(a) After many iterations of the power method, the 1 and 2 terms will dominate:
x c1 v1 + c2 v2
for some c1 and c2 . However, this is not
18.335 Midterm Solutions, Fall 2010
Problem 1: SVD Stability (20 points)
Consider the problem of computing the SVD A = U V from a matrix A (the input). In this case, we are
computing the function f (A
18.335 Midterm, Fall 2013
Each problem has equal weight. You have 1 hour and 55 minutes.
Problem 1: GMRES (20 points)
From class, the GMRES algorithm iteratively builds up an orthonormal basis Qn for
18.335 Midterm, Fall 2012
(b) Does First = Second, or Second = First,
or both, or neither? Why?
Problem 1: (25 points)
(c) In class, we proved that summation of n
oating-point numbers, in some sequent
Floating Point Formats
Scientic notation:
602
10 19
1.
Lecture 8 - Floating Point Arithmetic,
The IEEE Standard
signicand
sign
MIT 18.335J / 6.337J
Introduction to Numerical Methods
base
exponent