FAST-NUCES · BS Computer Science · Numerical Computing

Numerical Computing

My Numerical Computing course work – nine lectures with Jupyter notebooks, Python assignments, exams, quizzes, study notes and an HPCG optimisation project.

Course: Numerical Computing FAST-NUCES CS-2008 Python: NumPy, SciPy Jupyter: Notebooks
9Lectures
9Jupyter notebooks
3Python files
36PDF documents
3Study notes
61Files in total

Overview

Numerical Computing (CS-2008) at FAST-NUCES Islamabad. The repository has nine lecture sets with their Python notebooks, assignments and a home task in Python, sessional exams, quizzes, the HPCG final project, supporting material and my study notes.

Unit 1

Errors

Number representation, floating-point arithmetic, round-off, truncation and catastrophic cancellation.

Unit 2

Roots & interpolation

Bisection, fixed-point, Newton and secant methods; Lagrange, Newton, Hermite, splines and least squares.

Unit 3

Calculus & ODEs

Numerical differentiation and integration, Euler and Runge–Kutta methods for initial value problems.

Unit 4

Linear algebra

Gaussian elimination, LU, iterative solvers, Gram–Schmidt, QR and SVD; HPCG project.

Lectures

Nine lectures from floating-point errors to QR and SVD. Every file opens on GitHub, where PDFs and notebooks preview in the browser.

01Computer arithmetic and sources of errorFixed and floating point, IEEE 754, machine epsilon, round-off and truncation error · 1 files
02Catastrophic cancellationLoss of significance when subtracting nearly equal numbers, and how to rewrite formulas · 1 files
03Roots of equationsBisection, fixed-point iteration, Newton–Raphson and secant methods, with a Python notebook · 3 files
04Interpolation and approximationLinear, quadratic, Lagrange and Newton interpolation, least squares, splines · 4 files
05Numerical integrationRectangle, midpoint, trapezoidal and Simpson rules, Newton–Cotes, Richardson extrapolation · 2 files
06Numerical differentiation and ODEsFinite differences, Euler, improved Euler and Runge–Kutta methods · 3 files
07Systems of linear equationsGaussian elimination, LU factorisation, pivoting, iterative methods · 2 files
08Approximations and QR decompositionGram–Schmidt process, QR, SVD and low-rank approximation (slides, notebook, video) · 4 files
09Python basicsPython, NumPy and Matplotlib refresher notebook · 1 files

Books & Notes

My study notes in Markdown, supporting material and the course textbook.

NStudy notesBit shifting, and maps in C++ and Python · 2 files
SSupporting materialInterpolation notebook, integration notes, worked examples and a video · 7 files
BTextbooksNumerical Methods for Engineers and a Python programming link · 2 files

Assignments, Exams & Project

Assignments and the home task with my Python solutions, sessional exams, quizzes and the final project.

A1Assignment 1Root-finding methods compared for accuracy and time (Jupyter notebook) · 2 files
A2Assignment 2Interpolation – statement, my report and interpolation.py · 5 files
A3Assignment 3Python solution (Visual Studio Python project) · 3 files
HTHome taskPython home task (Visual Studio Python project) · 3 files
EExamsSessional I and II papers, the S2 solution and sample answer sheets · 6 files
QQuizzesQuiz 0–6 papers and solutions · 7 files
PFinal projectHPCG kernel optimisation project: brief, rubric and setup guide · 3 files

Folder Structure

Folder structure
Numerical_Repo/
├── Assignments/
│   ├── Assignment_01/                    (2 files)
│   ├── Assignment_02/                    (5 files)
│   └── Assignment_03/                    (3 files)
├── Books/                                (2 files)
├── Exams/                                (6 files)
├── HomeTask/                             (3 files)
├── Lecture #01/                          (1 file)
├── Lecture #02/                          (1 file)
├── Lecture #03/                          (3 files)
├── Lecture #04/                          (4 files)
├── Lecture #05/                          (2 files)
├── Lecture #06/                          (3 files)
├── Lecture #07/                          (2 files)
├── Lecture #08/                          (4 files)
├── Lecture #09/                          (1 file)
├── NC_Final_Project/                     (3 files)
├── Notes/                                (2 files)
│   └── Supporting Material/              (7 files)
├── Quiz & Sessional/                     (7 files)
├── assets/
│   ├── screenshots/   30 images
│   ├── thumbs/        gallery previews
│   └── css/  js/      website
├── index.html
├── .gitattributes
├── .gitignore
├── .nojekyll
├── LICENSE
└── README.md

Get the Files

Clone everything with Git, then open the notebooks in Jupyter.

Clone the repository

Command
git clone https://github.com/rohaan2802/Numerical_Repo.git

Install the Python packages

Command
pip install numpy scipy matplotlib jupyter

Open the notebooks

Command
jupyter notebook

The .py files run with python file.py; the .sln files open the same code in Visual Studio. The 136 MB Computational Mathematics textbook is too large for Git and is attached to Release v1.0.

License

Lecture slides, exam papers, assignment statements and textbooks belong to their instructors at FAST-NUCES and to their authors and publishers. They are shared here only for learning and revision – see LICENSE. My own notes, code and the organisation of this repository are free to use for study.