Shall I tell you, my friend, how you will come to understand it?
Go and write a book on it.
— Henry Home, Lord Kames (1696–1782), to Sir Gilbert Elliot
You know, I could write a book.
And this book would be thick enough to stun an ox.
— Laurie Anderson, “Let X=X”,
Big Science
(1982)
I’m writing a book. I’ve got the page numbers done,
so now I just have to fill in the rest.
— Stephen Wright
About These Notes
This course packet includes lecture notes, homework questions, and exam questions from algorithms
courses I taught at the University of Illinois at Urbana-Champaign in Spring 1999, Fall 2000, Spring
2001, Fall 2002, Spring 2004, Fall 2005, Fall 2006, Spring 2007, Fall 2008, Spring 2009, Spring 2010,
and Fall 2010. These lecture notes and my videotaped lectures were also offered over the web in Summer
1999, Summer 2000, Summer 2001, Fall 2002, and Fall 2005 as part of the UIUC computer science
department’s online master’s program. Lecture notes were posted to the course web site a few days (on
average) after each lecture. Homeworks, exams, and solutions were also distributed over the web.
Most (but not all) of the exercises at the end of each lecture note have been used at least once in
a homework assignment, discussion section, or exam. You can also find a near-complete collection of
homeworks and exams from past semesters of my class online at
http:
//
www.cs.illinois.edu
/
~jeffe
/
teaching
/
algorithms
/
. A large fraction of these exercises were contributed by some amazing teaching
assistants:
Aditya Ramani, Alina Ene, Amir Nayyeri, Asha Seetharam, Ben Moseley, Brian Ensink, Chris
Neihengen, Dan Bullok, Dan Cranston, David Morrison, Johnathon Fischer, Ekta Manaktala,
