Final Examination. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Fall 2013), Stanford University

Similar documents
Final Examination. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Spring 2016), Stanford University

CS 234 Midterm - Winter

Preliminary Examination, Numerical Analysis, August 2016

Ordinary Differential Equations II

Ordinary Differential Equations II

EE 278 October 26, 2017 Statistical Signal Processing Handout #12 EE278 Midterm Exam

STUDENT NAME: STUDENT SIGNATURE: STUDENT ID NUMBER: SECTION NUMBER RECITATION INSTRUCTOR:

Announce Statistical Motivation Properties Spectral Theorem Other ODE Theory Spectral Embedding. Eigenproblems I

Ordinary Differential Equations I

Q1 Q2 Q3 Q4 Tot Letr Xtra

Department of Mathematics, University of California, Berkeley. GRADUATE PRELIMINARY EXAMINATION, Part A Spring Semester 2019

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

MA EXAM 2 INSTRUCTIONS VERSION 01 March 9, Section # and recitation time

Linear Algebra Review

MA 262, Fall 2017, Final Version 01(Green)

Math/CS 466/666: Homework Solutions for Chapter 3

Announce Statistical Motivation ODE Theory Spectral Embedding Properties Spectral Theorem Other. Eigenproblems I

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

MA EXAM 1 INSTRUCTIONS VERSION 01 September 13, Section # and recitation time

Ordinary Differential Equations I

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

Ordinary Differential Equations

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Math Makeup Exam - 3/14/2018

MthSc 107 Test 1 Spring 2013 Version A Student s Printed Name: CUID:

Question: Total. Points:

Preface. Figures Figures appearing in the text were prepared using MATLAB R. For product information, please contact:

2. Review of Linear Algebra

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Math 2114 Common Final Exam May 13, 2015 Form A

Scientific Computing: An Introductory Survey


PH.D. PRELIMINARY EXAMINATION MATHEMATICS

Fall 2016 Exam 1 HAND IN PART NAME: PIN:

STUDENT NAME: STUDENT SIGNATURE: STUDENT ID NUMBER: SECTION NUMBER AND RECITATION INSTRUCTOR:

Singular Value Decomposition

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Spring 2018 Exam 1 MARK BOX HAND IN PART NAME: PIN:

EXAM MATHEMATICAL METHODS OF PHYSICS. TRACK ANALYSIS (Chapters I-V). Thursday, June 7th,

Preliminary Examination in Numerical Analysis

APPM 2360: Final Exam 10:30am 1:00pm, May 6, 2015.

Math 164-1: Optimization Instructor: Alpár R. Mészáros

This is a closed book exam. No notes or calculators are permitted. We will drop your lowest scoring question for you.

MA162 EXAM III SPRING 2017 APRIL 11, 2017 TEST NUMBER 01 INSTRUCTIONS:

Course Information Course Overview Study Skills Background Material. Introduction. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics

Partial Differential Equations

MATH Exam 2-3/10/2017

Numerical tensor methods and their applications

Numerical Analysis Comprehensive Exam Questions

1 Number Systems and Errors 1

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Contents. Preface for the Instructor. Preface for the Student. xvii. Acknowledgments. 1 Vector Spaces 1 1.A R n and C n 2

STUDENT NAME: STUDENT SIGNATURE: STUDENT ID NUMBER: SECTION NUMBER RECITATION INSTRUCTOR:

Statistical Geometry Processing Winter Semester 2011/2012

I have read and understood the instructions regarding academic dishonesty:

Without fully opening the exam, check that you have pages 1 through 11.

Without fully opening the exam, check that you have pages 1 through 11.

Final Exam May 4, 2016

Without fully opening the exam, check that you have pages 1 through 10.

Introduction to Applied Linear Algebra with MATLAB

Ordinary Differential Equations I

MA 262, Spring 2018, Midterm 1 Version 01 (Green)

Partial Differential Equations II

Without fully opening the exam, check that you have pages 1 through 12.

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

I. Multiple Choice Questions (Answer any eight)

Spring 2016 Exam 1 without number 13.

Linear Multistep Methods I: Adams and BDF Methods

PHYS 7411 Spring 2015 Computational Physics Homework 4

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

Reduction to the associated homogeneous system via a particular solution

Without fully opening the exam, check that you have pages 1 through 13.

MA EXAM 1 INSTRUCTIONS VERSION 01 FEBRUARY 8, Section # and recitation time

Student s Printed Name:

Math 160 Calculus for Physical Scientists I Exam 1 February 11, 2016, 5:00-6:50 pm

GOOD LUCK! 2. a b c d e 12. a b c d e. 3. a b c d e 13. a b c d e. 4. a b c d e 14. a b c d e. 5. a b c d e 15. a b c d e. 6. a b c d e 16.

MA EXAM 3 INSTRUCTIONS VERSION 01 April 14, Section # and recitation time

MA EXAM 3 INSTRUCTIONS VERSION 01 April 18, Section # and recitation time

Without fully opening the exam, check that you have pages 1 through 11.

Without fully opening the exam, check that you have pages 1 through 12.

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

MTH 133 Solutions to Exam 2 November 15, Without fully opening the exam, check that you have pages 1 through 13.

MA EXAM 3 INSTRUCTIONS VERSION 01 April 17, Section # and recitation time

AM205: Assignment 3 (due 5 PM, October 20)

EK102 Linear Algebra PRACTICE PROBLEMS for Final Exam Spring 2016

Math 224, Fall 2007 Exam 3 Thursday, December 6, 2007

MA EXAM 2 INSTRUCTIONS VERSION 01 March 10, Section # and recitation time

Lecture 10: Finite Differences for ODEs & Nonlinear Equations

Without fully opening the exam, check that you have pages 1 through 12.

minimize x subject to (x 2)(x 4) u,

Student s Printed Name: _Key_& Grading Guidelines CUID:

Numerical Methods for Engineers and Scientists

Without fully opening the exam, check that you have pages 1 through 11.

Singular Value Decomposition

Midterm for Introduction to Numerical Analysis I, AMSC/CMSC 466, on 10/29/2015

MA 126 CALCULUS II Wednesday, December 10, 2014 FINAL EXAM. Closed book - Calculators and One Index Card are allowed! PART I

Ordinary differential equations - Initial value problems

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Solving linear systems (6 lectures)

Math 51 Second Exam May 18, 2017

Transcription:

Final Examination CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Fall 2013), Stanford University The exam runs for 3 hours. The exam contains eight problems. You must complete the first problem and six of problems 2-8. CIRCLE THE PROBLEMS YOU WANT GRADED ON THE CHART BELOW; OTHERWISE WE WILL GRADE THE FIRST SIX QUESTIONS ON WHICH YOU HAVE PROVIDED ANY WRITTEN ANSWER. The exam is closed-book. You may use two double-sided 81/2 11 sheets of notes. Write your solutions in the space provided. If you need more space, write on the back of the sheet containing the problem and indicate that you have done so. Do not spend too much time on any problem. Read them all before beginning. Show your work, as partial credit will be awarded. Circle the six additional problems you want graded. Problem 1 2 3 4 5 6 7 8 EC Total Score The Stanford Honor Code 1. The Honor Code is an undertaking of the students, individually and collectively: (a) that they will not give or receive aid in examinations; that they will not give or receive unpermitted aid in class work, in the preparation of reports, or in any other work that is to be used by the instructor as the basis of grading; (b) that they will do their share and take an active part in seeing to it that others as well as themselves uphold the spirit and letter of the Honor Code. 2. The faculty on its part manifests its confidence in the honor of its students by refraining from proctoring examinations and from taking unusual and unreasonable precautions to prevent the forms of dishonesty mentioned above. The faculty will also avoid, as far as practicable, academic procedures that create temptations to violate the Honor Code. 3. While the faculty alone has the right and obligation to set academic requirements, the students and faculty will work together to establish optimal conditions for honorable academic work. Signature Name SUID 1

YOU MUST COMPLETE THIS PROBLEM. Problem 1 (Short answer). (a) Do all square matrices A R n n admit a factorization A = LU? Explain. [2 points] (b) Recall Heun s method for time-stepping ODEs: y k+1 = y k + h 2 (F[ y k] + F[ y k + hf[ y k ]]). For the one-variable model ODE y = ay with a < 0, calculate the restriction on h for stability of Heun s method. [2 points] Note: Justin got this bound slightly wrong in lecture, so double-check your work! 2

(c) Suppose A, B R n n and a, b R n. Find a linear system of equations satisfied by minima of the energy A x a 2 2 + B x b 2 2 with respect to x. [2 points] (d) Propose a method for finding the least-norm projection of a vector v onto the column space of A R m n with m > n. [2 points] (e) Recall the Rayleigh quotient iteration strategy for finding eigenvectors of a matrix: σ k = v k 1 A v k 1 v k 1 2 2 w k = (A σ k I) 1 v k 1 v k = w k w k We showed that this strategy can converge much more quickly than the basic power method. Why, however, might it still be more efficient to use the power method in some cases? [2 points] 3

Problem 2 (Optimization for deconvolution). Suppose we take a grayscale photograph of size n m and represent it as a vector v R nm of values in [0, 1]. We used the wrong lens, however, and our photo is blurry! We wish to use deconvolution machinery to undo this effect. (i) Find the KKT conditions for the following optimization problem: [5 points] minimize x R nm A x b 2 2 such that 0 x i 1 i {1,..., nm} (ii) Suppose we are given a matrix G R nm nm taking sharp images to blurry ones. Propose an optimization in the form of (i) for recovering a sharp image from our blurry v. [2 points] (iii) We do not know the operator G, making the model in (ii) difficult to use. Suppose, however, that for each r 0 we can write a matrix G r R nm nm approximating a blur with radius r. Using the same camera, we now take k pairs of photos ( v 1, w 1 ),..., ( v k, w k ), where v i and w i are of the same scene but v i is blurry (taken using the same lens as our original bad photo) and w i is sharp. Propose a nonlinear optimization for approximating r using this data. [3 points] 4

Problem 3 (Quantum mechanics). Suppose we wish to write simulation software for quantum physics. The Schrödinger equation and others involve complex numbers in C, so we must extend the machinery we have developed in CS 205A to this case. Recall that a complex number x C can be written as x = a + bi, where a, b R and i = 1. (a) Suppose we wish to solve A x = b, but now A C n n and x, b C n. Explain how a linear solver that takes only real-valued systems can be used to solve this equation. [5 points] Hint: Write A = A 1 + A 2 i, where A 1, A 2 R n n. Similarly decompose x and b. In the end you will solve a 2n 2n real-valued system. (b) Suppose we discretize Schrödinger s equation for a particular quantum simulation yielding an ODE x = A x, for x(t) C n and A C n n. Furthermore, suppose that A is self-adjoint and negative definite, that is, A satisfies the following properties: Self-adjoint: a ij = ā ji, where a + bi = a bi. Negative definite: x A x 0 (and is real) for all x C n \{ 0}. Here we define ( x) i x i. Derive a backward Euler strategy for solving this ODE and show that each step can be carried out using conjugate gradients. [5 points] Hint: Before discretizing, convert the ODE to a real-valued system by applying the same decomposition as suggested for (a) to x(t) and A. 5

Problem 4 (Polar decomposition). In this problem we will add one more matrix factorization to our linear algebra toolbox and derive an algorithm by N. Higham for its computation. The decomposition is used in animation applications interpolating between motions of a rigid object while projecting out undesirable shearing artifacts. (a) Show that any matrix A R n n can be factored A = WP, where W is orthogonal and P is symmetric and positive semidefinite. This factorization is known as the polar decomposition. [2 points] Hint: Write A = UΣV and show VΣV is positive semidefinite. (b) The polar decomposition of an invertible A R n n can be computed using a simple iterative scheme: X 0 A X k+1 = 1 2 (X k + (X 1 k ) ) (i) Use the SVD to write A = UΣV, and define D k = U X k V. Show D 0 = Σ and D k+1 = 1 2 (D k + (D 1 ) ). [2 points] k (ii) From (i), each D k is diagonal. If d ki is the i-th diagonal element of D k, show [2 points] d (k+1)i = 1 ( d 2 ki + 1 ). d ki (iii) Assume d ki c i as k (this convergence assumption requires proof in real life!). Show c i = 1. [2 points] (iv) Use (iii) to show X k UV. [2 points] 6

Problem 5 (Conjugate gradients). (a) If we use infinite-precision arithmetic (so rounding is not an issue), can the conjugate gradients algorithm be used to recover exact solutions to A x = b for symmetric positive definite matrices A? Why or why not? [3 points] (b) Suppose A R n n is invertible but not symmetric or positive definite. (i) Show that A A is symmetric and positive definite. [1 point] (ii) Propose a strategy for solving A x = b using the conjugate gradients algorithm based on your observation in (i). [3 points] (iii) How quickly do you expect conjugate gradients to converge in this case? Why? [3 points] 7

Problem 6 (Interpolation). (a) List one advantage and one disadvantage of each of the following bases for polynomials of degree n: (i) Monomial basis [1 point]: (ii) Lagrange basis [1 point]: (iii) Newton basis [1 point]: (b) Suppose we wish to interpolate a function f : R R given k data points (x i, f (x i )). When might it be preferable to use piecewise polynomial interpolation over a single polynomial of degree k? What is a possible drawback? [4 points] (c) Write the degree-four polynomial interpolating between the data points ( 2, 15), (0, 1), (1, 0), and (3, 2). [3 points] Hint: Your answer does not have to be written in the monomial basis. 8

Problem 7 (Quadrature). (a) Derive α, β, and x 1 such that the following quadrature rule holds exactly for polynomials of degree 2 : [5 points] 2 f (x) dx α f (0) + β f (x 1 ) 0 (b) What is a composite quadrature rule? When are composite quadrature rules useful? [2 points] (c) Suppose we are given a quadrature rule of the form 1 f (x) dx a f (0) + b f (1) for some 0 a, b R. Propose a composite rule for approximating 1 f (x) dx given n + 1 closed sample 0 points y 0 f (0), y 1 f ( 1 /n), y 2 f ( 2 /n),..., y n f (1). [3 points] 9

Problem 8 (ODE). (a) Suppose we wish to simulate a spring by solving the ODE d2 y/dt 2 = y with y(0) = 0 and y (0) = 1. We obtain the three plots of y(t) below by using forward Euler, backward Euler, and symplectic Euler. Label which plot is which. [3 points] (b) Suppose we wish to solve the ODE dy /dt = sin y numerically. For time step h > 0, write the implicit backward Euler equation for approximating y k+1 at t = (k + 1)h given y k at t = kh. [3 points] (c) Write the Newton iteration for solving the equation from part (b) for y k+1. [4 points] 10

THIS EXTRA CREDIT PROBLEM IS COMPLETELY OPTIONAL. Extra credit. A few open-ended conceptual problems on partial differential equations. (a) Suppose we wish to solve the Laplace equation 2 f = 0 on the unit disc D = {(x, y) : x 2 + y 2 1}. We will impose Dirichlet boundary conditions f (x, y) g(x, y) for all (x, y) with x 2 + y 2 = 1, where g(x, y) is given as input. The two-dimensional Laplacian operator we introduced in lecture was based on a grid structure: ( 2 y) ij 1 h (y (i 1)j + y i(j 1) + y (i+1)j + y i(j+1) 4y ij ) Obviously this grid does not align with the boundary of the disc D! Propose a way to discretize and solve this equation on D by changing our discretization of 2 y and/or working out reasonable boundary conditions on the grid. [5 points] (b) In CS 205A we studied solutions of differential equations, but another more advanced area of analysis involves integral equations. A Fredholm equation of the first type is given by: f (x) = b a K(x, t)φ(t) dt, where K : [a, b] [a, b] R and f : [a, b] R are given and φ : [a, b] R is unknown. Propose a discretization for approximating φ. Is your matrix sparse? [5 points] 11