/discrete-maths-classes

Primary LanguageJupyter NotebookGNU General Public License v2.0GPL-2.0

Discrete Mathematics classes

Class notebooks for Imperial College ELEC50006 by Dan Goodman.

My recommended way of running code is to use Google Colab with a Google account (links below). Other good options are running locally with Jupyter notebook server or VSCode (instructions below for Python) or Replit.

Week by week

Week 1. Intro and Fibonacci.

Open In Colab GitHub

Week 2. Complexity Notation

Open In Colab GitHub

Week 3. Divide and Conquer

Open In Colab GitHub

Week 4. Divide and Conquer 2

Open In Colab GitHub

Week 5. Dynamic Programming

Open In Colab GitHub

Week 6. Greedy Algorithms

Open In Colab GitHub

Week 7. Graphs

Open In Colab GitHub

Week 8. Various topics

Open In Colab GitHub

Installing Python locally

If you're comfortable with Python, you can install and run Python locally. My recommended technique is as follows:

Firstly, install Miniconda for Python 3.

Next, set up Conda to use conda-forge for binary distributions, by running this at the terminal.

conda config --add channels conda-forge 
conda config --set channel_priority strict

Create a virtual environment:

conda create --name dmclass python=3 jupyter matplotlib numpy scipy networkx

Running local Jupyter notebook server

Now activate the environment and run the Jupyter server in the directory where you downloaded the notebooks or cloned the repository.

conda activate dmclass
jupyter notebook

Running via VSCode

Install Python as above and follow the instructions here.