MATH-GA.2043 or CSCI-GA.2112

Scientific Computing

Warren Weaver Hall, room 101, Thursdays, 5:10 - 7 pm
Courant Institute of Mathematical Sciences
New York University
  Spring Semester, 2012

Notes about Homework Submissions

There will be regular (approximately bi-weekly) assignments that will be posted here and announced via email. Blackboard will only be used for collecting files from students and grading. Assignments may be posted before we have covered all the material, allowing you to start working on some of the problems early.

Logistics

Please read and follow these rules carefully as we use automated scripts to process the large number of files. Submissions that do not conform (e.g., submitting PDF files directly instead of a zip archive) will be rejected by the graders.
  1. Submit a PDF of your writeup and all of the source codes. Put all files in a zip archive.
  2. Do not include top-level folders/subfolders, that is, when we unpack the archive it should give a pdf file and matlab sources, not a directory hierarchy.
  3. Submit only the archive file as a solution via BlackBoard. Make sure to press the submit button on BlackBoard as otherwise we cannot access the file. Blackboard does not allow you to correct a submissions -- be careful and contact the instructor and he can clear your submission.
  4. Homeworks must be submitted by 8am on the morning after the listed due date. Late submissions will only be accepted if you send a justification to the instructor at least two days before the due date.
  5. If you use any external source, even Wikipedia, make sure you acknowledge it by referencing all help. Group work is discouraged: you may discuss the problems with your colleagues but each student must do the actual programming and writeup independently.

Organize your files

  1. Name files sensibly (e.g., not "A.m" or "script.m" but also not "Solution of Problem 1 by Me.m"). Include your name in the filename and in the text of the PDF writeup.
  2. In general, one should be able to grade without looking at all the codes. The reports should be mostly self-contained, e.g., the figures should be included in the writeup along with legends, explanations, calculations, etc. Do not include MATLAB codes in the writeup, only the results.
  3. Package the files so that the MATLAB codes can be run by us -- do not put all the sources in one long text file, for example. Also, we do not need your tex, lyx, Word, svn files etc., only a PDF of the final product. Please make it easy for us to find and examine the files quickly.
  4. If you are using Octave, do not use double quotes for strings, use single quotes instead for compatibility with MATLAB.
  5. For pen-and-pencil problems you can submit hand-written solutions if you prefer.

Present your information effectively

  1. Plot figures with thought and care! For example, errors should be plotted on a logarithmic scale, not linear, so you can see it going down instead of flat lines. The plots should have axes labels and be easy to understand at a glance.
  2. A picture is worth a thousand words! Instead of large tables, or printouts of Matlab matrices, make a plot. Do not submit pages of numbers unless there is a really good reason -- it is not an effective way to present the information.
  3. However, a picture by itself is not enough! You must write a concise explanation of the figure, especially what you learn from the figure (think of figure captions in scientific papers).
  4. If you do print things, use fprintf to format the output nicely instead of printing large matrices. Also use format compact and other format commands to control how MATLAB prints things.

Academic Integrity and Honesty

NYU academic integrity policies will be strictly enforced for homework assignments. Students in the Mathematics in Finance program should be aware of the strict academic integrity policy of their program.
  1. It is encouraged to discuss with other students the mathematical aspects, algorithmic strategy, code design, techniques for debugging, and compare results.
  2. Each student must write the solutions independently. Copying of any portion of someone else's solution or allowing others to copy your solution is considered cheating.
  3. Code sharing is not allowed. You must type (or create from things you've typed using an editor, script, etc.) every character of code you use.
  4. The assignments are meant to challenge you: It is not expected that you will get all of the points. If you spend more than 10-12 hours on an assignment consider talking to the instructor.
These rules not only ensure fairness but will also help you get the most out of this course. Learning how to apply the methods we discuss in class in practice is a critical part of this course and the main component of your grade. Scientific programming can only be learned by doing it. What programmers call "debugging" is an integral part of programming. You type something, and you think the code does something, but then you run and it does not run or produces numbers that do not look right. You learn by fixing it. It is a process that cannot be replaced by examining someone else's code.

Assignments

0. (Due ASAP) Questionnaire

Please submit the following information to donev@cims.nyu.edu:
  1. Name, degree you are working on now, and any prior degree(s) or professional experience you deem relevant to this course.
  2. List all programming languages/environments that you have used, and your level of experience (just starting, beginner, intermediate, advanced, wizzard).
  3. Why did you choose this course (e.g., program requirement, your advisor suggested it)? Have you taken or plan to take any other course in applied mathematics or computing (e.g., Numerical Methods)?
  4. Is there a specific area or application you are interested in (e.g., theoretical numerical analysis, finance, computational genomics)?

1. [Posted Feb 1st, due Feb. 16th] Numerical Computing

Take a look at lectures 1 and 2 for some examples and possible hints

2. [Posted Feb 16th, due March 1st] Linear Systems

Take a look at lectures 3 and 4 for some examples and possible hints.

3. [Posted Feb 29th, due March 25th] SVD, Nonlinear Equations and Optimization

This homework is longer because of Spring break. Take a look at lectures 5, 6 and 7 for some examples and possible hints.

4. [Posted March 28th, due April 12th] Function Approximation

Take a look at lectures 8 and 9 for some examples and possible hints.

5. [Posted April 11th, due April 22nd] Monte Carlo

Take a look at lecture 10 for some examples and possible hints.