Lecture 9
Randomized Algorithms II
Supplemental reading in CLRS: Appendix C; Section 7.3
After Lecture 8, several students asked whether it was fair to compare randomized algorithms to
deterministic algorithms.
Randomized algorithm:
may sometimes not out

Lecture 21
Clustering
Supplemental reading in CLRS: None
Clustering is the process of grouping objects based on similarity as quantied by a metric. Each
object should be similar to the other objects in its cluster, and somewhat different from the objects

Lecture 17
Complexity and NP-completeness
Supplemental reading in CLRS: Chapter 34
As an engineer or computer scientist, it is important not only to be able to solve problems, but also to
know which problems one can expect to solve efciently. In this lect

Lecture 16
Disjoint-Set Data Structures
Supplemental reading in CLRS: Chapter 21 (21.4 is optional)
When implementing Kruskals algorithm in Lecture 4, we built up a minimum spanning tree T by
adding in one edge at a time. Along the way, we needed to keep

Lecture 19
Compression and Huffman Coding
Supplemental reading in CLRS: Section 16.3
19.1
Compression
As you probably know at this point in your career, compression is a tool used to facilitate storing
large data sets. There are two different sorts of goa

Lecture 18
Polynomial-Time Approximations
Supplemental reading in CLRS: Chapter 35 except 35.4
If you try to design algorithms in the real world, it is inevitable that you will come across NP-hard
problems. So what should you do?
1. Maybe the problem you

Lecture 4
Minimum Spanning Trees II
Supplemental reading in CLRS: Chapter 23; Section 16.2; Chapters 6 and 21
4.1
Implementing Kruskals Algorithm
In the previous lecture, we outlined Kruskals algorithm for nding an MST in a connected, weighted
undirected

Lecture 5
Fast Fourier Transform
Supplemental reading in CLRS: Chapter 30
The algorithm in this lecture, known since the time of Gauss but popularized mainly by Cooley and
Tukey in the 1960s, is an example of the divide-and-conquer paradigm. Actually, the

Lecture 3
Minimum Spanning Trees I
Supplemental reading in CLRS: Chapter 4; Appendix B.4, B.5; Section 16.2
3.1
Greedy Algorithms
As we said above, a greedy algorithm is an algorithm which attempts to solve an optimization
problem in multiple stages by ma

Lecture 22
Derandomization
Supplemental reading in CLRS: None
Here are three facts about randomness:
Randomness can speed up algorithms (e.g., sublinear-time approximations)
Under reasonable assumptions, we know that the speed-up cant be too large. Adva

Lecture 23
Computational geometry
Supplemental reading in CLRS: Chapter 33 except 33.3
There are many important problems in which the relationships we wish to analyze have geometric
structure. For example, computational geometry plays an important role in

Lecture 7
All-Pairs Shortest Paths II
Supplemental reading in CLRS: Section 25.3
7.1
Johnsons Algorithm
The FloydWarshall algorithm runs in V 3 time. Recall that, if all edge weights are nonnegative,
then repeated application of Dijkstras algorithm using

Lecture 11
Amortized Analysis
Supplemental reading in CLRS: Chapter 17
Data structures typically support several different types of operations, each with its own cost (e.g.,
time cost or space cost). The idea behind amortized analysis is that, even when e

Lecture 12
Competitive Analysis
Supplemental reading in CLRS: None
12.1
Online and Ofine Algorithms
For some algorithmic problems, the optimal response to a sequence of calls to a procedure depends
not just on each input separately, but on the sequence of

Lecture 10
Hashing and Amortization
Supplemental reading in CLRS: Chapter 11; Chapter 17 intro; Section 17.1
10.1
Arrays and Hashing
Arrays are very useful. The items in an array are statically addressed, so that inserting, deleting,
and looking up an ele

Lecture 14
Interlude: Problem Solving
Supplemental reading in CLRS: None
This lecture was originally given as a pep talk before the take-home exam. In note form, this chapter
will be light reading, a break in which we look back at the course material as v

Lecture 13
Network Flow
Supplemental reading in CLRS: Sections 26.1 and 26.2
When we concerned ourselves with shortest paths and minimum spanning trees, we interpreted the
edge weights of an undirected graph as distances. In this lecture, we will ask a qu

Lecture 15
van Emde Boas Data Structure
Supplemental reading in CLRS: Chapter 20
Given a xed integer n, what is the best way to represent a subset S of cfw_0, . . . , n 1 in memory,
assuming that space is not a concern? The simplest way is to use an n-bit

Lecture 20
Sublinear-Time Algorithms
Supplemental reading in CLRS: None
If we settle for approximations, we can sometimes get much more efcient algorithms. In Lecture 18,
we saw polynomial-time approximations to a few NP-hard problems. In what follows, we

Lecture 8
Randomized Algorithms I
Supplemental reading in CLRS: Chapter 5; Section 9.2
Should we be allowed to write an algorithm whose behavior depends on the outcome of a coin ip?
It turns out that allowing random choices can yield a tremendous improvem