CS417, Summer 2020

# CS417 Outline

General Information

Below are the modules that comprise the course content.

Each module consists of a series of activities.

• Not every assigned activity requires you to submit something for grading. Nonetheless, you are expected to do them all.

• If no due date is specified, you are supposed to complete the assigned activity by the end of the final day allotted for that entire module.

KEYS TO SUCCESS IN THIS COURSE:

The syllabus lays out the basic course policies. It tells you what you must do to earn a passing grade. It tells you how to get in touch with me if you run into problems.

2. HAVE A SCHEDULE

You have some freedom to schedule your own time in this course, but you DO need to set up a schedule. Do not forget that this course exists and that you are registered for it. Do not think you can repeatedly set it aside for days at a time and make up the time later.

3. IF YOU DON’T UNDERSTAND SOMETHING, ASK QUESTIONS

You can ask questions in the course Forums. You can contact me through email. You can contact me during office hours. You will find information on these options in the syllabus and Course Orientation module.

Some people are too shy to ask questions. Some are too proud to ask questions. Part of being educated is knowing how to exploit your available information resources. In this course, I am one of those resources.

Upcoming Events
1 Online Orientation and Course Introductions 05/18/2020 - 05/19/2020
2.1 Real Numbers & Machine Numbers & Rounding 05/18/2020 - 05/19/2020
 Overview In mathematics the impact finite precision is oft dismissed as an artifact of rounding. In most–if not all cases–the solution is to use more decimal places or signifigant digits until precision errors are within an “acceptable threshold” (a nebulous phrase). In this module, we will discuss how to measure and analyze finite precision errors arise from representing a single numerical quantity. Objectives After this module students will be able to: Discuss the impact of finite precision on machine representation of floating-point values. Apply mathematical analysis to examine (i.e., quantify) the magnitudes that can be represented with a finite number of mantissa and exponent bits. Compare the error that arises in finite representation using the well known absolute error and relative error formulae. Explain the difference between absolute and relative error, and discuss how absolute and relative error are mathematically linked. Relevance When developing software of any size machine precision is a consideration. The impact may be something seemingly inconsequential (e.g., a rounding error of less than one cent). Machine precision can result in interesting impacts (e.g., a solar system simulation may compute planets spiraling into the Sun). Activities Read lecture notes: Converting to Base 2 Watch: Precision Intro Lecture Read lecture notes: Review of Machine Precision Read lecture notes: Finite Precision Error - Base 2 Read lecture notes: Finite Precision Error - Generalized Do assignment: Complete Homework 1 Due: 05/26/2020 Do assignment: Complete Machine Assignment 1 Due: 05/26/2020 Do assignment: Review Homework 1 SolutionSummary Read lecture notes: Module Summary
2.2 Rounding & Finite Arithmetic 05/20/2020 - 05/26/2020
 Overview In this module, we will continue our discussion of finite precision and its impact on arithmetic operations. The propagation of error through arithmetic operations will be our primary focus. Objectives After this module students will be able to: Discuss the impact of finite precision on error propagation in arithmetic operations involving two operands. Examine the impact of finite precision on error propagation in arithmetic operations involving three or more operands and one operation (e.g., addition, subtraction, multiplication, and division). Examine the impact of finite precision on error propagation in arithmetic operations involving three or more operands and combinations of two or more operations). Relevance When developing software of any size rounding is a consideration. The impact may be something seemingly inconsequential (e.g., a rounding error of less than one cent). Machine precision can result in interesting impacts (e.g., a solar system simulation may compute planets spiraling into the Sun). Activities Read lecture notes: Review Finite Precision Read lecture notes: Arithmetic Error Read lecture notes: Cancellation Error Read lecture notes: Repeated Arithmetic Operations Read lecture notes: Bounding Arithmetic Error Do assignment: Complete Homework 2 Due: 05/28/2020 Do assignment: Review Homework 2 Solution Do assignment: Complete Machine Assignment 2 Due: 05/28/2020Summary Read lecture notes: Module Summary
2.3 Condition of a Problem 05/20/2020 - 05/27/2020
 Overview In this module, we will continue our discussion of finite precision and its impact on numerical computations. The propagation of error and the resulting behavior on computations will be our primary focus. Objectives After this module students will be able to: Discuss the sensitivity of computations to errors in input resulting from finite precision. Quantify (i.e., examine/model) through *Condition Number*s the sensitivity of computations to errors in input resulting from finite precision. Explain (through mathematical analysis) when a problem is ill-conditioned or well-conditioned. Leverage the results of Condition Number analysis to develop alternative methods of computation when a problem is ill-conditioned. Relevance Error propagation can result in interesting impacts (e.g., a solar system simulation may compute planets spiraling into the Sun). The ability to quantify the impact of a small change in input on a computation is foundational when building (or selecting) numerical methods (and algorithms) Activities Read lecture notes: Conditioning Read lecture notes: Condition Number Examples Read lecture notes: Read Chapter 1 Section 4 pages 10-12 Do assignment: Complete Homework 3 Due: 06/03/2020, 5:00PM EDTSummary Read lecture notes: Module Summary
2.4 Unit Summary 05/27/2020 - 06/01/2020
 Overview This module serves as a review of Chapter 1. We will revisit finite precision, arithmetic error, and conditioning of problems. This summary module also serves to force another review of requisite principles from Calculus. Objectives After this module students will be able to: Summarize the techniques discussed in this unit. Combine the techniques discussed in this unit to examine non-trivial problems. Utilize various principles from Calculus (e.g., differentiation, integration, limits, sequences, and series) in combination without becoming overwhelmed. Activities Read lecture notes: Chapter 1 Closing Thoughts Read lecture notes: Some Trigonometry (Thinking Assignment) Read lecture notes: Some Trigonometry (Thinking Assignment) - The First Few Steps Do assignment: Review Homework 3 Solution Take the exam: Exam 1: Chapter 1 06/03/2020 - 06/05/2020 Matrices & Vector Functions Read lecture notes: Condition Numbers - Matrices Read lecture notes: Condition Numbers - Vector FunctionsSummary Read lecture notes: Module SummaryAdditional Reading Finite Precission in the Real World
3 Chapter 2 Approximation
3.1 Introduction to Approximation 06/01/2020 - 06/07/2020
 Overview Approximation has numerous applications throughout all disciplines. This can be something as simple as plotting data in Excel and computing a line of best fit or something more domain specific (e.g., transforming raw data for use in A.I. applications. In this Module we will explore Least Squares Approximation at an introductory level in preparation for a more rigorous and thorough derivation in later modules. Objectives After this module students will be able to: Locate and review web-based resources covering Least Squares Approximation at an introductory level. Explain how approximation methods can be employed for trend analysis for simple data (e.g., grade projection and price analysis). Manually (i.e., by hand on paper) build a solution for discrete data. Relevance To apply approximation methods to discrete (and later continuous) data, one must analyze (possibly) unfamiliar mathematical notation. Application of approximation methods requires a solid foundation in linear algebra. Activities Watch: Least Squares Introduction Lecture Read lecture notes: Least Squares - A Whirlwind Introduction Read lecture notes: Least Squares - A Quick First Example Read lecture notes: Least Squares - Quadratic Example Read lecture notes: Least Squares - More Formal Notation Read lecture notes: A Tedious Problem? Do assignment: Implement a Matrix Solver Due: 06/12/2020 Do assignment: Start working on CPU Temperature Semester ProjectSummary Read lecture notes: Module Summary
3.2 Approximation Proper 06/08/2020 - 06/15/2020
 Overview The previous module discussed the XTX|XTY method for computing polynomial approximation functions for discrete data. This Module will formalize the process and discuss how to generalize Least Squares approximation to both discrete and continuous data sets. Objectives After this module students will be able to: Explain the differences between the Riemann Integral and Riemann-Stieltjes Integral. Apply the weighted L2-Norm, properties of inner products, derivatives, and integrals to explain derivations of Least Squares Approximation. Explain the impact of basis functions. Manually (i.e., by hand on paper) build a solution for continuous functions/data. Discuss the motivation for a single Least Squares notation to reconcile the discrete and continuous cases. Explain how the [XTX|XTY] and [Ac|b] notations are related. Construct a mathematical proof to show [XTX|XTY] is equivalent to [Ac|b] for discrete data. Relevance There are many applications in which one must approximate a combination of discrete and continuous data sets. This includes applications in A.I (e.g., hill climbing), Medical Imaging, and Aerospace applications. Activities Read lecture notes: Least Squares Derivation - Foundations Read lecture notes: Least Squares Derivation - The Fun Part Read lecture notes: Least Squares Examples Read lecture notes: Least Squares Closing Thoughts Read lecture notes: Reconcile the XTX|XTY and Ab Methods Do assignment: Continue working on CPU Temperature Semester Project Due: 06/22/2020 Do assignment: Complete Homework 4 Due: 06/12/2020 Do assignment: Complete Homework 5 Due: 06/12/2020 Do assignment: Complete Homework 6 Due: 06/15/2020 Take the exam: Complete Exam 2 06/15/2020 - 06/16/2020 Reference Materials Watch: Integration by Parts DI MethodSummary Read lecture notes: Module SummaryHomework Review Read lecture notes: Homework 4 Review Read lecture notes: Homework 5 Review Read lecture notes: Homework 6 Review
4 Selected Topics
4.1 Chapter 3: Interpolation 06/10/2020 - 06/18/2020
 Overview Interpolation has applications throughout many (if not all) disciplines. This can be something as simple as resizing an image in GNU Image Manipulation Program (GIMP). Interpolation can also be viewed as a complement to approximation. Just like approximation, we need to find a function of best fit. However, interpolation has a stronger invariant: the computed interpolation function must pass through all input points. Objectives After this module students will be able to: Locate and review web-based resources covering interpolation at an introductory level. Explain how interpolation methods can be employed for trend analysis for simple data (e.g., price analysis and temperature analysis). Summarize the differences between approximation and interpolation. Apply Lagrange Interpolation and Newton Interpolation. Apply piecewise linear interpolation (e.g., in the Semester Project). Compute interpolation error. Compare interpolation error to approximation error. Relevance To apply interpolation methods to discrete data, one must analyze (possibly) unfamiliar mathematical notation. Interpolation has applications in various everyday activities (e.g., photo editing, video upscaling, and mesh generation). ActivitiesSemester Project Do assignment: Continue working on CPU Temperature Semester ProjectInterpolation Methods Read lecture notes: Interpolation - The Beginning Read lecture notes: Lagrange Interpolation Read lecture notes: Newton’s MethodInterpolation Error Read lecture notes: Interpolation Error Examples Read lecture notes: Interpolation Error Derivation (Guest Lecture by Christos) Read lecture notes: Interpolation Error DerivationInterpolation Taking Stock Read lecture notes: Taking Stock Do assignment: Complete Homework 7 Due: 06/23/2020Piecewise Interpolation Read lecture notes: (Spring 2020) Piecewise Interpolation & Cubic SplinesSummary Read lecture notes: Module Summary
4.2 Chapter 4: Non-Linear Solvers 06/19/2020 - 06/24/2020
 Overview There exist many problems that can not be solved analytically. Such problems include finding zeroes (i.e., solutions), computing derivatives, and evaluating integrals. In this module we will discuss for first problem (i.e., computing numerical solutions to equations). Objectives After this module students will be able to: Discuss the requirements for each of the Bisection method, False Position (Regula Falsi) method, Secant method, and Newton’s method. Manipulate provided pseudocode and refine it into a form suitable for implementation in a selected language (e.g., C, C++, Python 3, or Rust). Identify the considerations inherent in converting pseudocode (theory) into usable code (application)–with particular emphasis on the impact of finite precision. Relevance There exist various numerical methods for solving problems, including finding zeroes of a function, performing numerical integration, and performing numerical differentiation. The ability to select the appropriate method, interpret pseudocode, and design an implementation (using best an appropriate language) is foundational when building numerical software. Activities Watch: Solver Discussion Read lecture notes: Non-Linear Solvers Read lecture notes: Polynomial Examples Read lecture notes: cos(x) Example Read lecture notes: (Typed) Solver Discussion Notes Do assignment: Complete Homework 8 (TBD)Summary Read lecture notes: Module SummaryFinal Exam Take the exam: Complete the Final Exam 06/24/2020 - 06/27/2020
5 Future Work
 Overview Computational Methods and Software covers a broad range of topics. In this course, we covered a few selected topics. This section contains resources and references for topics not covered this semester. ActivitiesReference Materials
6 Special Events and Dates
Activities

All times in this schedule are given in Eastern Time.

Symbol Key