Lectures and labs

Lectures

Lecture 0 - Course introduction and languages

This is the first lecture of the course. We’ll discuss the course policies and why we model problems as languages.

Read more »

16 Jan

Lecture 1 - Languages and regular expression

We’ll discuss regular languages and representing them as regular expressions (the OG RegEx).

Read more »

18 Jan

Lecture 2 - Deterministic finite automata (DFAs)

Introduction to deterministic finite automata. We’ll also discuss how to use DFAs to prove closure properties.

Read more »

23 Jan

Lecture 3 - Non-deterministic finite automata (NFAs)

Introduction to non-determinism. We’ll talk about how it applies to automata and formalize NFA concepts/definitions.

Read more »

25 Jan

Lecture 4 - DFA/NFA/RegEx equivalence and grammars

DFA/NFA/RegEx’s can be converted from one form to another using the simple methods discussed in this lecture.

Read more »

30 Jan

Lecture 5 - Non-regularity and fooling sets

Now that we’ve exhausted regular languages, it’s time to move onto larger complexity classes. But first, how do we tell if a language isn’t regular?

Read more »

01 Feb

Lecture 6 - Context-Free Languages and Push-down Automata

Now that we know of many non-regular languages, it is time to investigate the next computability class - context-free languages.

Read more »

06 Feb

Lecture 7 - Turing machine

We’ll first briefly talk about context-sensitive languages and then discuss Turing recognizable languages and the most important machine in modern computing: the Turing machine in great detail.

Read more »

08 Feb

Lecture 8 - Universal Turing machine

The goal of this lecture is to have you internalize one truth - that there is a universal Turing machine that can simulate any other Turing machine.

Read more »

13 Feb

No Lecture

(Midterm 1)

15 Feb

Lecture 9 - Recursion and reductions

We’ll begin the algorithms portion of our course with a quick recap of the most fundamental algorithmic technique: recursion. We’ll also briefly go over solving recurrences.

Read more »

20 Feb

Lecture 10 - Divide and conquer and selection algorithms

The next step up from recursion are divide and conquer algorithms. Large objective is to understand linear time selection!

Read more »

22 Feb

Lecture 11 - Backtracking

It is time to optimize your recursive algorithms by storing previously computed instance outputs, a.k.a backtracking. We’ll also introduce the longest increasing sub-sequence (LIS) problem.

Read more »

27 Feb

Lecture 12 - Dynamic programming I

Important one … even though you probably won’t see many instances of dynamic programming in the real world, it is a favorite of FANNG interviews.

Read more »

29 Feb

Lecture 13 - Dynamic programming II

We will continue our discussion of dynamic programming with the edit-distance and common subsequence problem(s). We’ll also discuss the general formula for dynamic programming problems.

Read more »

05 Mar

Lecture 14 - Graphs and basic search

First lecture in our discussion of graphing algorithms. We’ll discuss basic search and introduce the concept of connected components.

Read more »

07 Mar

No Lecture

(Spring Break)

12 Mar

No Lecture

(Spring Break)

14 Mar

Lecture 15 - Directed graphs, DFS, DAGs, TopSort

We’ll begin our graphing algorithms discussion with directed-acyclic graphs which hold quite a few properties we can exploit.

Read more »

19 Mar

Lecture 16 - Shortest paths I - BFS and Dijkstra

Pretty much the de-facto graphing problem, we’ll discuss simple shortest path algorithms including Dijkstra’s algorithm.

Read more »

21 Mar

No Lecture

(Midterm 2)

26 Mar

Lecture 17 - Shortest paths II - Bellman-Ford and Floyd-Warshall

We’ll continue our discussion of shortest path algorithms with two algorithms which use DP principles as well.

Read more »

28 Mar

Lecture 18 - Minimum spanning trees (MSTs)

Lasting, we’ll end the algorithms portion of the course with a discussion on minimum spanning tree algorithms. Will be a nice “cool-down” before the next midterm.

Read more »

02 Apr

Lecture 19 - Reductions

We’ll begin this section of the course with a discussion of reductions, what various reductions imply and why they are useful. The SAT problem will be introduced as well.

Read more »

04 Apr

Lecture 20 - NP-complete problems and reductions I

We now delve into the hard (NP-hard) problems and investigate how to prove if a specific problem is NP, NP-hard, etc.

Read more »

09 Apr

Lecture 21 - NP-complete problems and reductions II

We’ll discuss more NP-complete problems/reductions and specifically focus on reductions requiring gadgets.

Read more »

11 Apr

Lecture 22 - Decidability I

Stepping away from algorithms, it is time to ask what problems are not decidable and cannot be solved by a Turing machine. We’ll introduced the halting problem.

Read more »

16 Apr

Lecture 23 - Decidability II

We’ll go over some more undecidable problems and how to prove their (un-)decidability. We’ll use our familiar reduction method in novel ways.

Read more »

18 Apr

Lecture 24 - MT3 Review

Let’s take a breather before the third midterm and simply go over some lingering questions and/or some practice problems. We’ll also begin with a brief overview of classic decidability problems.

Read more »

23 Apr

No Lecture

(Midterm 3)

25 Apr

Lecture 25 - Final Review

Last lecture. We’ll go over all the concepts discussed in the course using some simple practice problems. Special emphasis on topics not covered the the other exams (MSTs and TMs).

Read more »

30 Apr

Labs

No Lab

17 Jan

Lab 1 - Languages & recursive definitions & regular expression

Some quick problem involving recursive definitions and regular expressions.

19 Jan

Lab 2 - DFA construction & other automata

Going over how to construct DFAs and how to create formal definitions of other automata.

24 Jan

Lab 3 - Language transformation

Now that NFAs are understood, we can easily prove regular closure for a variety of operations.

26 Jan

Lab 4 - RegEx -> NFA -> DFA -> RegEx

This lab will help you understand that RegEx’s, DFAs and NFAs all represent the same languages.

31 Jan

Lab 5 - Proving non-regularity

Not all languages are regular. We practice a simple proof technique for proving this.

02 Feb

Lab 6 - CFGs and PDAs

The next computability class: context-free languages. Will discuss context-free grammars, push-down automata and how they relate to eachother.

07 Feb

Lab 7 - Turing machines

The most complex computing machine we know of, we’ll go through examples of Turing machines and how they can be used to recognize languages.

09 Feb

No Lab

MT1 Review (OHs)

14 Feb

No Lab

Post MT1 break

16 Feb

Lab 8 - Binary Search

We’ll start our investigation of recursion through binary search and the many variations of the binary search problem.

21 Feb

Lab 9 - Divide and Conquer

We’ll discuss one of the OG divide and conquer algorithms: Kartsuba’s algorithm.

23 Feb

Lab 10 - Backtracking

We’ll continue our work on recursion by practicing how to use backtracking to create optimal recursions. Special emphasis on writing recurrences.

28 Feb

Lab 11 - Dynamic Programming I

Now that we’ve formulated our solutions as recurrences, let’s turn them into efficient algorithms.

01 Mar

Lab 12 - Dynamic Programming II

Second dynamic programming lab. We take classic DP problems and explain them in a new way.

06 Mar

Lab 13 - Graph Modeling

Our first graph algorithms lab. This first lab will be on formulating logic puzzles as graphing problems that can be solved using simple search algos.

08 Mar

No Lab

(Spring Break)

13 Mar

No Lab

(Spring Break)

15 Mar

Lab 14 - Graph Modeling II

A second graph algorithms lab focusing on formulating problems as graphs and using BFS/DFS to solve them.

20 Mar

Lab 15 - Shortest Paths I

Having learned our first shortest path algorithm (Dijkstra’s) we’ll discuss the shortest path problem in a variety of contexts.

22 Mar

No Lab

Post MT2 break

27 Mar

Lab 16 - Shortest Paths II

A few more shortest path problem that include both negative edges and cycles potentially requiring algorithms other than Dijkstra’s.

29 Mar

Lab 17 - Minimum Spanning Trees

The OG graphing problem, we’ll take a moment to discuss minimum spanning tree problems.

03 Apr

Lab 18 - Reductions

We begin with a discussion of reductions and show how one can solve novel problems using known solutions from standard problems.

05 Apr

Lab 19 - NP-completeness I

We explore a few simple reductions to prove that a problem is NP-hard. Special emphasis on the SAT problem.

10 Apr

Lab 20 - NP-completeness II

The second lab on using reductions to show NP-hardness. Emphasis will be placed on gadget-based reductions.

12 Apr

Lab 21 - Decidability I

First lab on decidability. We’ll be testing the waters on some simple problems provable using the standard reduction template.

17 Apr

Lab 22 - Decidability II

The second lab on decidability. We’ll prove some other languages are undecidable using slightly more complex proof structures.

19 Apr

No Lab

MT3 Review (OHs)

24 Apr

No Lab

Post MT3 break

26 Apr