Math 9: Introduction to Programming for Numerical Analysis, Winter 2017

Lecture A, course code 44850


Welcome. This course will teach you the basics of programming from a mathematical viewpoint. Programming is an essential skill in modern society, and will open the door for many interesting practical and intellectual endeavours for you. As you will see in the many examples we will consider in this course, computational thinking is a natural extension of mathematical thinking.

We will be using Python in this course. We will rely heavily on Jupyter notebooks for a lot our work. To get started, you should read the guide: Getting set-up for Math 9.

We will not be following a specific textbook in this course. Lecture notes will be made available to give you the information discussed in class. However, if you would like to read a book to help you with the course, I recommend: Scientific Computation: Python Hacking for Math Junkies, by B. Shapiro.

Assessment consists of:
Weekly homeworks (35%)
Weekly lab assignment (15%, worst two lab results dropped)
Midterm (15%, closed book, on paper, February 13)
Final exam (35%, comprehensive, closed book, on paper, March 20)

Plese see the policy page to see the homework and lab collaboration policy.

Homeworks

The biggest and best time investment you will make in this course will be to do the homework, which will be posted here weekly.
Homework 1, starter code
Homework 2
Homework 3
Homework 4
Homework 5
Homework 6
Homework 7
Homework 8, data and starter code

Homework solutions are available on Canvas.

Exams

Practice Midterm
Midterm
Practice Final
Practice Final Solutions

Piazza page

Please post your questions about the course and homework on Piazza http://piazza.com/uci/winter2017/math9

Lectures

You will need to download the notebooks to your computer and open them in Jupyter.

Lecture 1 Jupyter notebooks, expressions, operations, variables notebook html
Lecture 2 Variables, Types, Defining your own functions, local vs global variables notebook html
Lecture 3 Swapping variables, global keyword, if-else, booleans notebook html
Lecture 4 While loops, checking for primeness notebook html
Lecture 5 Don’t use == on floats, thinking about algorithm first, division with remainder example notebook html
Lecture 6 Checking primes more efficiently, Euclidean Algorithm notebook html
Lecture 7 Break and continue, lists, for loops notebook html
Lecture 8 List comprehension, mutable vs. immutable notebook html
Lecture 9 More on mutables, binary numbers, selection-sort notebook html
Lecture 10 Sorting, complexity, big-O notation notebook html
Lecture 11 Recursion notebook html
Lecture 12 Flattening lists with recursion, map, reduce, filter notebook html
Lecture 13 More functional programming methods, map, reduce, filter notebook html
Lecture 14 Classes notebook html
Lecture 15 Lists of lists, Numpy arrays, matplotlib notebook html
Lecture 16 More numpy and matplotlib, plot, showimg, apply along axis notebook html
Lecture 17 More about slicing numpy arrays, working with images, historams notebook html
Lecture 18 Probability and randomness, random(), randomint notebook html
Lecture 19 Choice, mean and std of data-set, random simulations notebook html
Lecture 20 Random walks notebook html
Lecture 21 Law of large numbers and the central limit theorem notebook html
Lecture 22 Minimizing/maximizing functions, Gradient Descent notebook html
Lecture 23 Linear Regression notebook html
Lecture 24 Solving linear regression by gradient descent notebook html
Lecture 25 Singular Value Decomposition, Principal Component Analysis, Eigenfaces notebook html
Lecture 26 Matlab tutorial, key differences with Python notebook html

###Office Hours

  • Office Location: 510P Rowland Hall (5th floor, turn right when you exit the elevator, then left, 510 is a door on the right past the tutoring center)
  • Office hours: Wednesdays 11-12, Thursdays 1-2

###Contact Information

  • Umut Isik
  • Email: misik@uci.edu
  • Phone: (949) 824-3153

###Your TA

  • Eric Puttock
  • Office hours: Tuesdays 4-6pm at MSTB 226 Lab
  • Office: 480 Rowland Hall

###Campus Resources