MAD 2502 Introduction to Computational Mathematics

MAD 2502 Introduction to Computational Mathematics (Spring 2018)


Instructor:  Dr. Shi Bai
Office:  Science Building (SE43), Room 230.
Email:  sbai@fau.edu
Lecture time and location:  W F 9:30-10:50AM in SE 271.
Office hours:  Wed 2 - 3 pm; and by appointment; and lab session (Wed 4 - 5 pm; Fri 2 - 3 pm).
Syllabus and Textbook: John V. Guttag, Introduction to Computation and Programming Using Python. 2nd Ed. (The FAU library has e-book access available for FAU students.)
Mid-exam: 9:30am-11:00am, Mar 2 (Fri). Room: SE 271.
Final exam: Wed (May 2) 7:45am - 10:15am. Room: SE 271.

General information

Suggestion: please read, review and understand the codes discussed on the lecture. Here are some more detailed suggestions:
  1. After the first several weeks, you should know the basics of Python including: integer, float, string types; print and input functions; conditional argument; for and while loop; lists; functions.
  2. The fundamental barrier is to understand what happens as the computer executes each line of the code (in particular, those in the loops or branches). To pass this course, it is important to understand the algorithms discussed on the class Line-by-Line, ensuring you understand what each line is precisely doing. A vague/imprecise understanding is not enough.
  3. In the beginning, it's not a surprise to expect to spend 6-10 hours to fully understand a tiny piece of program/code consisting of (e.g.) 10 lines. Such efforts/time should be expected.
Here are some more websites for tutorials/exercises.
  Interactive tutorial (snakify.org)
  Python Tutorial
  Project Euler (more mathematical/computational problems)
Tutorials/Lab sessions: Wed 4-5pm and Fri 2-3pm in SE 271. Please consider to come to the tutorial session if you need hands-on guide.
Quizzes: there will be ≥ 5 quizzes. But only your best 5 quizzes will be taken into account towards your final grade; the others will be dropped.
Open Computer Labs: the following open computer labs have Python installed: UN 222 (Student Union), BU 201 (College of Business) and CM 142 (Computer Center).

Schedule

The course covers topics and examples in numerical algorithms, number theoretic algorithms, combinatorics, algebra, cryptography and misc topics.

Chapters Topics Algorithms and extra Codes Annoucements
Week 1 Chap 2.1-2.4 Python basics: numeric data types, strings, variables, IDLE. IDLE
Lecture 1
Operators
Lecture 2
Input
Week 2 Chap 3.1-3.3;
Chap 9
Intro to algorithms,
algorithmic complexity.
Computing/approx square/cubic root.
Lecture 3
Lecture 4
Quiz 1
Week 3 Chap 4.1-4.2 Functions in Python.
Bisection method (read this and this).
Lecture 5
Scope
Bisection
Quiz 2
Week 4 Chap 3.4
Chap 5.1-5.5
Algorithmic complexity;
Python structured types: tuples and lists.

Horner's method (read this).
Horner's method
Bisection with Horner
Assignment 1
(Due Feb 5th, 5pm)
Week 5 Chap 3.5. Root-finding algorithms. Newton's method (read this and animations). Newton's method
Quiz 3
Week 6 Chap 4.3 More numerical algorithms;
Recursion.
Numerical diff. (read this);
Secant method (read this and animations);
Factorial, Fibonacci sequence (read this);
binomial coefficients (read this).
Secant method
Recursion
Quiz 4
Week 7 Floating-point numbers Floating point numbers (read this and this);
Floating-point numbers Assignment 2
(Due Feb 26th, 5pm)
Week 8 Chap 15/16 Random number generator;
simulating games.
Coin flipping;
Birthday paradox (read this);
Monty hall problem (read this).
Coin flipping
Birthday paradox
Monty hall
Mid-exam
(Friday 9:30-11:00am)
Week 9 (spring break)
Week 10 Solution to mid-exam Assignment 3
(Due Mar 21, 5pm)
Week 11 Topics in number theory Detecting primes (read this);
Sieve of Eratosthenes (read this);
Euclidean algorithm (read the procedure).
Primality tests;
Euclidean alg.
Quiz 5
Week 12 Topics in number theory
and cryptography
Modular arithmetic (read this);
Trial division (read this);
Pollard's rho method (read this);
Trial division;
Pollard's rho method.
Quiz 6
Week 13 Chap 10 Search and sort . Binary search (try this);
Selection and merge sort (read this and this).
Binary search;
Sorting.
Assignment 4
(Due Apr 5th, 5pm)
Week 14 Chap 12 Topics in cryptography 0-1 Knapsack Problem (read this);
Meet-in-the-middle attack (read this).
0-1 Knapsack. Quiz 7 (Wed)
Week 15 Review sessions Quiz 8 (Wed)
Exam week (April 26 – May 2)


Documentation:
  Python 3 documentation -- Official Website
  A Gentle Introduction to Programming Using Python MIT Open Courseware.
  Visualize Python Execution
  Mathematical Computation with SageMath
  Differences between Python 2.7.x and Python 3.x
  Python on Windows FAQ

IDLE:
  One Day of IDLE Toying
  Intro to Python IDLE