Midterm
You may use whatever reading materials you want – the course notes should be sufficient, but you may also look online or at books. Make sure you cite any sources beyond the course notes. For this exam, you may ask questions of the course staff, but you should not work with others, whether inside or outside the class.
1: Efficient operations (5 points)
Rewrite each expression to have the indicated complexity.
p1d (generic function with 1 method)
2: Floating point fiddling (5 points)
Rewrite each expression or better floating point error.
p2c (generic function with 1 method)
3: Normwise nonsense (5 points)
(1 point) Argue that
.(2 points) If
is computed using the usual partial pivoting strategy, argue that .(2 points) The matrix exponential can be defined formally as
. Argue that for any operator norm, .
4: Delightful derivatives (4 points)
Let
deriv_ls (generic function with 1 method)
check_deriv_ls (generic function with 1 method)
Inf
5: Extending Cholesky (3 points)
Consider the block matrix
Complete the following code to extend a Cholesky factorization
extend_cholesky (generic function with 1 method)
You may use the following code to sanity check your solution.
test_extend_cholesky (generic function with 1 method)
5.581511538241275e-17
6: Least squares limbo (5 points)
Consider the least squares problem of minimizing
and suppose you are given a code solveAls
such that solveAls(d)
computes
(1 point) Write the normal equations for the least squares problem as a block 2-by-2 system.
(1 point) Do block Gaussian elimination to write a Schur complement system that can be solved for
(1 point) Rewrite the Schur complement system so that
is not used directly – only use the combinations and appear (and anything involving on its own is fine).(2 points) Complete the following Julia code to solve the least squares problem.
solveABls (generic function with 1 method)
You may use the following test to sanity check your solution.
test_solveABls (generic function with 1 method)
1.0249950910118462
7: Your turn
(1 point) Share one thing in the class you think is working well.
(1 point) Share one thing you think could work better (concrete recommendations are great!).
(1 point) What do you consider the most difficult concept from the first part of the course?