CS 416: Foundations of Scientific Computing
Spring 2007

This is a BRAND NEW course. It is intended to provide an introduction to important topics in scientific computing for CS students, including topics in numerical analysis and optimization. It will include material from the current course offerings CS 412 and CS 525, along with a few new topics.
CS 416 can be used to satisfy the CS Major requirement as one of the two mathematical courses beyond basic calculus  in fact, it is recommended for this purpose. It can also be used to satisfy requirement (3c), which requires one of CS 412, 416, 425, 513, 514, 515, 525, 540, 547, 559 to be taken as part of a CS Major study plan.

Schedule
In general, there will be either three 60minute lectures each week, starting at 1:10pm, 10 minutes earlier than the time in the official schedule. By extending most lectures to 60 minutes, we can take a few days off when we need to.
The current lecture schedule is posted here. It's subject to occasional modification. In particular, some lectures will be dropped.
 Week 1: Mon 1/22 (50 min), Wed 1/24 (50 min), Fri 1/26 (50 min)
 Week 2: Mon 1/29 (60 min), Wed 1/31 (60 min), Fri 2/2 (60 min)
 Week 3: Mon 2/5 (60 min), Wed 2/7 (60 min), Fri 2/9 (60 min)
 Week 4: Mon 2/12 (60 min), Wed 2/14 (60 min), Fri 2/16 (60 min)
 Week 5: Mon 2/19 (60 min), Wed 2/21 (60 min), Fri 2/23 (60 min)
 Week 6: Mon 2/26 (60 min), Wed 2/28 (60 min), Fri 3/2 (60 min)
 Week 7: Mon 3/5 (60 min), Wed 3/7 (60 min), Fri 3/9 (60 min)
 Week 8: Mon 3/12 (60 min (review for Midterm, which is held 7:159:15 this evening), Wed 3/14 (60 min), Fri 3/16 (60 min)
 Week 9: Mon 3/19 (60 min), Wed 3/21 (60 min), Fri 3/23 (60 min)
 Week 10: Mon 3/26 (60 min), Wed 3/28 (60 min), Fri 3/30 (NO LECTURE)
 Spring Break 3/314/8
 Week 11: Mon 4/9 (60 min), Wed 4/11 (60 min), Fri 4/13 (60 min)
 Week 12: Mon 4/16 (60 min), Wed 4/18 (60 min), Fri 4/20 (50 min)
 Week 13: Mon 4/23 (60 min), Wed 4/25 (60 min), Fri 4/27 (50 min)
 Week 14: Mon 4/30 (60 min), Wed 5/2 (50 min), Fri 5/4 (60 min)
 Week 15: Mon 5/7 (50 min; review), Wed 5/9 (50 min; review), Fri 5/11 (NO LECTURE)


Office: 
4379 CS&S 
Phone: 
2624838 
Email: 

Office Hours: 
Wednesday 1112, Thursday 45. 


Office: 
3395 CS&S 
Email: 

Office Hours: 
Tuesday 34, Friday 910. 


General Course Information
Prerequisites
 The timetable says "consent of instructor" and you'll get my consent only if you've taken {Math 222}, {CS 240 or Math 234}, and {CS 302}.
Lecture Notes
 Unit 1: introduction to numerical methods, loss of significance.
 Unit 2: finding roots of a scalar equation.
 Unit 3: Polynomial interpolation.
 Unit 4: Splines. Here are the short Matlab codes we covered in class that compare polynomial interpolation and spline interpolation on the Runge function: rungeCub.m, interPoly.m, interPolyCheby.m
 Unit 5: Basic Linear Algebra. We're covering the topics listed in the syllabus (they don't appear in the text, but you can find them in any basic linear algebra text). You can also find good information on the web using google, especially at sites such as Wikipedia and Mathworld. For example, here are Wikipedia's entries on Vector Space and Linear Independence.
 Linear Programming Introduction. Here is Chapter 1 from a forthcoming book "Linear Programming with MATLAB" by Ferris, Mangasarian, and Wright. Here is the diet problem demo from the NEOS Guide.
 Linear Programming: Formulate and Solve. Here is the interiorpoint matlab code pathfollow.m and another code steplength.m which it calls. Here's a short code pathfollowTest.m to demonstrate how pathfollow is called.
 Linear Programming: Duality. Chapter 4 from the book mentioned above will be handed out. (We'll cover a subset of this chapter in class.)
Text
 W. Cheney and D. Kincaid, Numerical Mathematics and Computing, Fifth Edition. ThomsonBrooksCole, 2004.
References
 J. D. Faires and R. Burden, Numerical Methods, Second Edition, Brooks/Cole, 1998.
 J. H. Mathews and K. D. Fink, Numerical Methods Using Matlab, Fourth Edition, PearsonPrenticeHall, 2004.
 S. D. Conte and C. de Boor, Elementary Numerical Analysis: An Algorithmic Approach. McGrawHill, 1980.
 M. Heath, Scientific Computing: An Introductory Survey, McGrawHill, 2001.
 K. Sigmon and T. A. Davis, MATLAB Primer, 7th edition, 2004.


Course Outline
 Floatingpoint numbers, loss of significance, introduction to Matlab (1 week)
 Rootfinding for scalar functions: bracketing methods, Newton's method. (1 week)
 Polynomial interpolation: Vandermonde, Lagrange, and Newton. Divided differences, nested multiplication, error analysis. (1 week)
 Spline fitting: linear, quadratic, cubic. (2 weeks)
 Linear algebra: matrices and vectors; matrix algebra; identity matrix and matrix inverse; transpose and symmetry; positive definiteness and semidefiniteness; vector spaces and subspaces; linear dependence and independence; spanning sets, basis, and dimension; matrix range space, null space, and rank; systems of linear equations (they have 0, 1, or infinitely many solutions); use of matrix inverse to express solution of square nonsingular systems. (2 weeks)
 Numerical linear algebra: Solving diagonal, bidiagonal, and triangular systems; "naive" Gaussian elimination; Gauss transformations and their inverses; LU factorization; Gaussian elimination with pivoting; permutation matrices; LU with row partial pivoting; matrix and vector norms; define concepts of conditioning and stability, and specialize these concepts to linear systems and the algorithms that solve them. Operation counts for LU factorization, with and without pivoting. (2 weeks)
 Linear least squares, regression, solution via normal equations. (1 week)
 Linear programming introduction: applications, conversion to standard form, geometric/graphical motivation via simple examples and sample applications. (1 week)
 Duality for linear programming. Dual formulation, motivation via a practical example, weak and strong duality, KKT optimality conditions (1 week).
 Formulating and solving linear programs and interpreting solutions. Formulating network optimization problems (minimumcost flow, assignment problems, shortestpath etc), and l1 and linfty norm approximation problems. Solve problems using a given software tool. Show effects of problem scale and constraint types on solution times. Zerosum games as dual linear programs. (2 weeks)
 Quadratic programming: formulation and simple examples. Relationship to leastsquares and spline approximation. Use of a software tool to solve simple instances. (1 week)


Assessment
Keep track of your grades through the learn@uw system.
 Approximately one homework assignment per week, 40% of grade.
 The electronic handin system will be used for some homeworks  see here for details
 Homework is due at the beginning of class on the designated date.
 No homeworks will be accepted by TAs, in mailbox or in person.
 No homework or project is accepted in mailbox of instructor.
 You may discuss homework with classmates, but the submitted version must be worked out, written, and submitted alone.
 Submitting someone else's work as your own is academic misconduct. Such cheating and plagiarism will be dealt with in accordance with University procedures (see the Academic Misconduct Guide).
 Assignments will generally be submitted both as hard copy and electronically. Here are the Electronic Handin Instructions for this course.
 MIDTERM, 20% of grade. To be held on Mon, March 12, 7:15pm9:15pm, Room 1207 CS Building.
 FINAL, 40% of grade. To be held on Wed, May 16, 7:25pm, Room 1257 CS&S (same room as lectures).


Homework Assignments
 Homework 0, due Wednesday January 31. Hand in hard copy only, at the start of class.
 Homework 1, due Friday February 9. Hand in hard copy at the start of class, and also submit your Matlab codes electronically before class.
 Homework 2, due Friday February 16 at the start of class. Here are the Matlab routines you'll need for this assignment, including the initial lines of the Newton and bisection codes: newtonstub.m, bisectionstub.m, fq1.m, fdq1.m, fq2.m, fdq2.m
 Homework 3, due Friday February 23 at the start of class.
 Homework 4, due Friday March 2 at the start of class.
 Homework 5, due Friday March 9 at the start of class.
 Homework 6, due Friday March 23 at the start of class. Stubs for your codes: lunaive_stub.m, lsol_stub.m, usol_stub.m
 Homework 7, due Friday April 13 at the start of class. Stubs for your codes: lupp_stub.m, lutri_stub.m
 Homework 8, due Friday April 20 at the start of class. Here's the Iowa Wheat data file.
 Homework 9, due Friday April 27 at the start of class. This is a written assignment.
 Homework 10, due Friday May 4 at the start of class.
 Homework 11, for practice only, no need to submit.


Computing Information
Use the CS Unix Labs on the first floor of CS&S: Locations here.
For new users of Unix and the CS Unix facilities, orientation sessions will be held in CS&S 1325 according to the following schedule.
Here is some basic information about setting up your MATLAB environment for this course. In particular, there are instructions for setting up a startup file that defines a search path for Matlab that includes the public directory for the course.


Handouts and Examples


Miscellaneous




