e01 : First Midterm
exam date | description | ready? | info |
---|---|---|---|
01/30 09:30AM | First Midterm | true | e01 |
The midterm exam will be in class on Wednesday, January 30 from 9:30am to 10:45am.
Rules
Phones off!
Closed book exam. You may bring one sheet of paper with notes on both sides, and you must turn that sheet in with your exam. No electronic devices of any kind. You won’t need to do any complicated numerical calculations, and if we ask you for Python code we won’t mark it off for exact syntax or details of argument lists.
Use a dark pen (preferred) or dark soft pencil, and write your answers legibly within the boxes provided.
Syllabus
The exam covers everything discussed in class through conjugate gradient and sparse matrices, which finishes in Lecture 7 on January 28. It does not cover the material on data fitting that begins on January 28.
You should review all of the readings, topics, interesting matrices, numpy/scipy routines, and lecture codes listed in the lecture outlines. To find the lecture outlines, click on “Calendar” at the top of the course web page and then on “lect01”, “lect02”, etc. on the calendar.
You should also review (download and run) the Jupyter transcripts from all of the lectures, and understand what’s going on in them. To find Jupyter transcripts, click on “Lecture Files” at the top of the course web page, and then on the date of the lecture. The lecture files also contain the slides I used in the lectures on 01.07 (temperature problem), 01.21 (interesting matrices), and 01.28 (conjugate gradient).
You should review all the problems on homeworks h01 through h03.
Summary of assigned readings:
- NCM sections 2.1-2.6, 2.8, 5.5, problem 2.5
- Templates sections on Jacobi and conjugate gradient.
Summary of topics:
- Numpy arrays, indexing, and matrix/vector arithmetic
- All the numpy/scipy routines listed in the lecture notes
- Matrices and systems of linear equations
- The temperature problem
- Residual, relative residual norm
- Solving triangular systems
- Solving Ax=b with the three matrix factorizations:
- LU factorization with and without partial pivoting
- Cholesky factorization of SPD matrices
- QR factorization (for now, square matrices only)
- Complexity analysis of matrix and vector operations
- Using permutation vectors and permutation matrices
- Solving Ax=b with Jacobi and conjugate gradient (but not their theory)
Summary of interesting matrices:
- Identity matrix
- Diagonal matrix
- Triangular and unit triangular matrices
- Permutation matrices (and permutation vectors)
- Symmetric positive definite (SPD) matrices
- Orthogonal matrices
- Sparse matrices
Summary of numpy/scipy routines (not complete):
- npla.norm()
- npla.solve()
- spla.lu()
- npla.cholesky()
- npla.qr()
- scipy.sparse.csr_matrix()
- scipy.sparse.linalg.spsolve()
- scipy.sparse.linalg.cg()
- np.diag()
Summary of lecture codes:
- make_A()
- make_b()
- LUfactor()
- Lsolve()
- Usolve()
- LUsolve()
- Jsolve()
- CGsolve()
Sample problems
-
Shlomi will answer questions about the sample problems in section on Wednesday before the exam, but you will have to work them yourself before section in order to be prepared!
-
We won’t ask you to do any coding on the exam (more than one line), but the exam may ask questions related to any of the homework problems. The following homework problems are in the format of exam problems as they stand:
- h01 problems 1 through 7
- h02 problems 2, 3, 4, and 5
- h03 problems 1, 2, and 5
-
Here are some other sample problems.