CS357
CS357 (Numerical Methods I) is a 3-credit-hour class that satisfies the Technical Electives requirement for ECE majors. It also satisfies an Advanced Computing Elective for CEs, and it is a required course for CS majors. It is offered in both fall and spring semesters.
Content Covered
- Linear Algebra and Python review
- Error correction and estimation, Big-O notation
- Rounding, cancellation, IEEE-754 standard, Floating-point approximation
- Taylor Series review
- Random Number/Vector generation, approximation of area/volume using randomization and Monte Carlo methods
- Vector/Matrix norms, Linear Systems of Equations
- Matrix Conditioning, Sparse Matrices, Eigenvalues
- Finite Difference Methods for approximation of derivatives
- Newton's Method, Bisection Method, Secant Methods (for nonlinear system of equations)
- Optimization, Gradient Descent, Golden Section Search, Steepest Descent Search
- Linear Least Squares and Singular Value Decomposition (SVD)
- Principal Component Analysis (PCA)
The course is an introduction to numerical methods, studied from a purely mathematical point of view. Students will learn the theoretical foundations of numerical methods used to solve complex mathematical problems. The course starts with a review of fundamental concepts, such as Taylor series, approximation of numbers, and binary to decimal conversion. The main part of the course includes floating-point computation, characteristics of square matrices, and systems of linear equations. The final part covers approximation of functions and integrals, nonlinear equations, interpolation, numerical solutions of ordinary differential equations, and eigenvalues and eigenvectors. There is a fair bit of coding you will do in the class, but it involves Python for numerical problems, and the coding is more applied than theoretical, being very similar to the amount/context of coding required for MATH257.
Prerequisites
When to Take It
This course is offered in both spring and fall semesters, and the prerequisites are pretty light (an ECE major would need only ECE220 and MATH257), so the earliest one could take the class is a Fall semester during Sophomore Year. It is not a prerequisite for too many technical electives in the CS or ECE departments, so anytime is good to take this class. However, it would be wise to take it alongside a loaded semester (one with ECE391 or ECE385) as it isn't terribly difficult and is good to take alongside more difficult/busy workloads.
Course Structure
Technically, the course is scheduled for two lectures on TR 12:30 PM to 1:45 PM. However, the only lecture you must attend is the Thursday lecture for the GAs; actual lectures are entirely asynchronous.
The grade breakdown for the course is
- 4% post-lecture-video PrairieLearn questions
- 11% group activities (GAs) held every Thursday during lecture
- 10% PrairieLearn MPs (5 total)
- 25% PrairieLearn Homeworks
- 35% PrairieTest/CBTF bi-weekly quizzes
- 15% Final exam
Lectures are watched via PrairieLearn asynchronously. There are usually one or two MCQs following each lecture video for you to answer. They are released along the lecture videos every Tuesday/Thursday and due for full-credit by the following Tuesday/Thursday. They are infinite-attempt until you answer correctly. Four of them are dropped.
Homeworks are also assigned on PrairieLearn and usually come with a set of theory questions and one or two coding questions. Homeworks are also due within a week of release, and the lowest two scores are dropped. In this regard, the homework format is very similar to that for MATH257.
Group activities (GAs) are similar to Friday labs for MATH257. Each Thursday, students get together in groups of 3 and work through a Jupyter Notebook assignment on PrairieLearn. The assignment is due at 11:59 PM that same day, and the lowest scored GA is dropped.
There are also biweekly quizzes. Each quiz alternates between being held at the CBTF or being proctored online via PrairieTest during Thursday lecture, in which there is no GA. The quizzes cover a comprehensive amount of the prior two weeks (usually covering 3-5 topics). They are similar to MATH257 midterms, again consisting of mostly theory/conceptual questions and one or two coding questions. It can be a rush to complete all questions in the 50-minute period, especially if you are getting bugs in the coding questions. The lowest quiz grade is dropped. Prioritize these quizzes, as they're worth 35% of the course grade.
There are 5 MPs given through the semester, which involve a series of applications of the concepts learned in class to various engineering and science problems. MPs are given on PrairieLearn and consist of a series of cumulative coding questions, where in order to move on to the later questions, you need to score full points on the previous questions first. These MPs can be time-consuming, as rather than being given a numerical problem to solve and told which method/concept to use, you need to figure out which method/concept can be used to solve the problem in question. Different applications are explored in the MPs, including construction/truss support, gambling/card games, etc. MPs cannot be dropped.
The course has one final exam scheduled at CBTF. The final exam is similar to the quizzes in terms of question organization, but has a unique format where you are given groups of coding questions, and must complete a question from each group but can choose which question in that group to complete. For example, if you are given 3 questions in a group, you can complete just one of the questions, but completing two of the questions in that group can't substitute for a different group.
The assignments all have generous late policies. If not completed by the 100% deadline, homeworks and MPs can be attempted for 96% late credit, and then 50% late credit. Similarly, if not completed by the 100% deadline, lecture questions can be attempted for 80% late credit, and then 50% late credit.
All assignments, quizzes, and the final exam allow you a Jupyter Notebook workspace where you can do "scratch" work via code to save you the tedious work of solving the numerical problems (e.g, finding eigenvectors/eigenvalues) by hand (thus, why we have computers so we don't need to tediously solve by hand).
Instructors
The primary instructor for this course is Professor Marianna Silva. She provides a very supportive learning environment for her students and is always accommodating of the needs of her students and staff. A unique thing she offers are "Happy Hours" (no drinking involved), where students can stop by her office at Siebel Center for CS and have a conversational chat about school or life. This is not office hours but rather a place to connect and for you to get to know her as a person and for her to get to know you as a person.
Course Tips
- Don't fall behind on lectures, even if you have other classes that take more priority. The lectures aren't too long usually and can be completed in a few minutes, which allows you to get through them quickly.
- Keep up with the pace of the homeworks; they can be time-consuming but really reinforce the content.
- Use the Jupyter Notebook Workspace! It is super helpful and can make most calculations very quick, and this is useful for time-crunched quizzes.
- Ask questions during GAs. CAs, TAs, and Prof. Marianna are all present during the GAs, so if you finish the GA early, ask them for help on conceptual questions or quick homework questions, especially if attending office hours is a time risk for your schedule.
Life After
This course is not a prerequisite for most classes, but is SUPER helpful for reinforcing understanding of Linear Algebra. If you want to go into any field requiring understanding of Linear Algebra concepts, definitely take this class. Relevant coursework that correlate to the material include ECE490 (Introduction to Optimization) and ECE449/CS446 (Machine Learning). This course can also be used as a prerequisite for ECE491/CS450 (Numerical Analysis) and ECE540 (Computational Electromagnetics)
Infamous Topics
- PCA: This is when a dataset's dimensionality is reduced by looking at which components/features have the most variance. This is one of the more conceptually challenging topics. However, it is also one of the last topics covered, so relative to the final exam and the whole course, it's not a big deal if you don't completely understand it. The concept is explained well in the lecture notes.
- Finite Difference Methods: These methods for approximation of derivatives with respect to computational methods are more tedious to memorize than they are conceptually difficult. You just need to plug and chug for these.
- Eigenvalue/vector iteration: This is a method of finding/approximating eigenvectors using an iterative process when you are prohibited on a homework/quiz from using
numpy.linalg.eig()
to find eigenvectors for high-dimensional matrices. As such, the process can be tedious. - Taylor Series: You probably never thought you'd see this appear again after MATH231. The course covers it in enough detail to get you back to speed, but memorizing the expansion of a function and using Taylor Series approximation to estimate points is tedious, especially when you have to code it out in Python and have the risk of typos.
- Error correction and rounding: This concept is more tedious on the programming side due to the (sometimes) high precision PrairieLearn will want your answers as. Distinguishing between absolute error and relative error can be difficult, especially when the precision criteria is very demanding.