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(machine ) A is the backwards error. [Note that we cannot
u
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)R = R R. But the singular values of A and R are the sq
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 by recalling the expression for determinants in terms o
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 update U U xy T , where x is the column-vector of multiplier
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 B = C.
We will do this using the Schur decompositions o
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:/math-atlas.sourceforge.net/
A trivial problem?
Cp =mA
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 that t cannot be represented, since a t -digit number, a
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) Cache-Oblivious
Matrix Multiply
=
C
mp
A
mn
B
np
divi
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 replacement: on cache miss, loaded item replaces item that will
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 properties and computational cost of the following
two
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+15 points)
Suppose A is a diagonalizable matrix with ei
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 cannot be represented, since a t -digit number, at rst
gla
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 T , where x is the column-vector of multipliers
and y T
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 = 0 to Ax = b). Now, we are told to suppose An b Kn =
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 properties of the functions (and of oating-point arithm
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 an eigenvector. Multiplying this by A gives 1 c1 v1 + 2
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) = (U , , V ): the outputs are of the SVD are 3 matric
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 the Krylov space Kn =
span b, Ab, . . . , An1 b and the
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 sequential order, is backwards stable. Suppose we sum m + n
oa