Index / 001 EN
Algorithms Illuminated: Omnibus Edition cover

Computer Science

Computer Science

Algorithms Illuminated: Omnibus Edition

Tim Roughgarden

A single-volume edition of a four-part introduction to algorithms that grew out of the author's online courses. It explains the standard design paradigms and analysis techniques in a conversational style, with each algorithm motivated by a concrete problem, and it is supported by free video lectures, test cases and programming problems on the companion website.

Prerequisites: Some programming experience and basic familiarity with mathematical proofs, such as induction, at the level of a first discrete mathematics course.

Difficulty Level
Intermediate
Academic Level
Undergraduate
Algorithmsalgorithm analysisgraph algorithmsdynamic programmingnp-hardnessTextbook

01 / Reading Guide

Reading Guide

Citation

Roughgarden, T. (2022). Algorithms Illuminated: Omnibus Edition. Soundlikeyourself Publishing (distributed by Cambridge University Press).

Chapter Summary

The Omnibus Edition (September 2022) collects the four separately published parts of Algorithms Illuminated into a single hardcover of about 690 pages, with duplicated material removed. It has 24 chapters in four parts, two appendices, an epilogue ("A Field Guide to Algorithm Design") and hints and solutions. The preface describes the book as a transcript of what an expert tutor would say over a year of one-on-one lessons, based on the author's online courses (running since 2012) and his undergraduate course at Stanford. Starred sections are the most advanced and can be skipped on a first reading without loss of continuity, and each chapter ends with an "Upshot" summary and problems.

Part I, Chapters 1–2: Introduction; Asymptotic Notation

The book opens with integer multiplication and Karatsuba's algorithm, then MergeSort and its analysis, and closes the chapter with guiding principles for analysing algorithms. Chapter 2 develops big-O, big-Omega and big-Theta notation, explained in the preface as a deliberate choice to ignore constant factors and lower-order terms.

Part I, Chapters 3–6: Divide-and-Conquer Algorithms; The Master Method; QuickSort; Linear-Time Selection

Divide and conquer applied to counting inversions, Strassen's matrix multiplication and the closest pair of points; the master method for analysing such recurrences, with six examples and a starred proof; randomized QuickSort, including why good pivots matter and a starred proof that sorting needs Ω(n log n) comparisons; and linear-time selection with the randomized RSelect and deterministic DSelect algorithms.

Part II, Chapters 7–9: Graphs: The Basics; Graph Search and Its Applications; Dijkstra's Shortest-Path Algorithm

Graph vocabulary, applications, size and representations; breadth-first search and shortest paths, connected components, depth-first search, topological sort, strongly connected components and the structure of the web; then Dijkstra's algorithm with a starred correctness proof and its running time.

Part II, Chapters 10–12: The Heap Data Structure; Search Trees; Hash Tables and Bloom Filters

The preface's aim here is to make the reader an "educated client" of data structures, with implementation in optional starred sections. Heaps include their use to speed up Dijkstra's algorithm; search trees move from sorted arrays to balanced search trees; hash tables are followed by Bloom filters and a heuristic analysis of their error rate.

Part III, Chapters 13–15: Introduction to Greedy Algorithms; Huffman Codes; Minimum Spanning Trees

The greedy paradigm through a scheduling problem and its proof of correctness; Huffman's algorithm for optimal prefix-free codes viewed as trees; and Prim's and Kruskal's minimum spanning tree algorithms, sped up with heaps and union-find, with an application to single-link clustering.

Part III, Chapters 16–18: Introduction to Dynamic Programming; Advanced Dynamic Programming; Shortest Paths Revisited

Dynamic programming introduced through weighted independent set in paths, with a reconstruction algorithm, the principles of the method and the knapsack problem; then sequence alignment and optimal binary search trees; and finally Bellman-Ford for negative edge lengths and Floyd-Warshall for all-pairs shortest paths.

Part IV, Chapters 19–21: What Is NP-Hardness?; Compromising on Correctness: Efficient Inexact Algorithms; Compromising on Speed: Exact Inefficient Algorithms

Part IV starts from the contrast between minimum spanning trees and the travelling salesman problem, explains easy and hard problems, strategies for NP-hard problems, a simple recipe for proving NP-hardness and common "rookie mistakes". Chapter 20 covers fast inexact algorithms: makespan minimization, maximum coverage, influence maximization, the 2-OPT heuristic and the principles of local search. Chapter 21 covers exact but slow methods: the Bellman-Held-Karp algorithm, color coding for long paths, and when to use mixed integer programming and satisfiability solvers.

Part IV, Chapters 22–24: Proving Problems NP-Hard; P, NP, and All That; Case Study: The FCC Incentive Auction

Reductions, 3-SAT and the Cook-Levin theorem, a template for reductions and NP-hardness proofs for independent set, directed Hamiltonian path, the TSP and subset sum; an entirely starred chapter on P, NP, the P ≠ NP conjecture, the exponential time hypothesis and NP-completeness; and a case study of the US spectrum auction, where greedy heuristics and feasibility checking with solvers were used in practice.

Appendices, Epilogue and Hints

Quick reviews of proofs by induction and of discrete probability, the field guide to algorithm design, and hints or solutions to the end-of-chapter problems.

Key Concepts

Part I: The Basics

  • Asymptotic notation: big-O, big-Omega and big-Theta, describing how running time scales with input size.
  • Divide and conquer: split into subproblems, solve recursively, combine quickly.
  • Master method: a formula for the running time of many divide-and-conquer recurrences.
  • Randomized algorithms: algorithms that "flip coins", such as randomized QuickSort and RSelect.

Part II: Graph Algorithms and Data Structures

  • Linear-time graph search: breadth-first and depth-first search and their applications to connectivity and ordering.
  • Dijkstra's algorithm: single-source shortest paths with non-negative edge lengths.
  • Heaps, search trees and hash tables: structures chosen by the operations an application needs; Bloom filters trade space for occasional errors.

Part III: Greedy Algorithms and Dynamic Programming

  • Greedy paradigm and correctness proofs: myopic, irrevocable decisions that are optimal only for special problems.
  • Minimum spanning trees and union-find: Prim's and Kruskal's algorithms and the data structure that speeds up Kruskal's.
  • Dynamic programming: solving overlapping subproblems systematically, as in knapsack, sequence alignment and Bellman-Ford.

Part IV: Algorithms for NP-Hard Problems

  • NP-hardness and reductions: recognizing problems unlikely to have always-correct, always-fast algorithms.
  • Heuristics and local search: fast algorithms that compromise on correctness.
  • Exact exponential algorithms and solvers: improving on exhaustive search with dynamic programming, MIP and SAT solvers.

Critical Analysis

Strengths

  • Built for teaching. The preface describes over 100 quizzes with solutions in the text, end-of-chapter problems running from straightforward checks to open-ended challenges with hints or solutions to all of them, and programming problems with test cases on the companion website.
  • Clear routes through a large book. Starred sections mark advanced material that can be skipped, each chapter ends with an "Upshot", and the preface explains which chapter groups are independent (divide and conquer, greedy algorithms and dynamic programming can be taught in any order).
  • Free video course. The author has recorded over 200 videos covering every section, plus extra topics such as Karger's contraction algorithm and Johnson's algorithm, which suit a flipped classroom or self-study.
  • A practical treatment of NP-hardness. Part IV goes beyond proving hardness to what to do next: heuristics, local search, exact exponential algorithms, MIP and SAT solvers, and a real case study.

Limitations

  • Pseudocode, not code. The book describes algorithms in pseudocode and leaves implementation to the programming problems; readers wanting ready-made code in a specific language need other sources.
  • Mathematical prerequisites. The preface assumes some programming and comfort with proofs by induction and by contradiction; the appendices give only quick reviews. Readers without that background can follow the designs but not the analyses.
  • Selective coverage. Topics such as network flow and linear programming do not appear in the table of contents, and some advanced topics are only in the online videos.
  • Length. At about 690 pages, the omnibus holds more than one course; the preface itself suggests splitting it between an undergraduate course (Parts I–III) and a master's course (Parts III–IV).

Where It Fits in the Course

This is the course's main teaching text for a first algorithms course. Cormen's Algorithms Unlocked is a short, low-mathematics introduction for readers not yet ready for a textbook and can serve as a preview of Parts I–II. Skiena's The Algorithm Design Manual covers similar techniques with a practical slant and a catalogue of algorithmic problems, useful alongside or after Roughgarden when applying algorithms. Cormen, Leiserson, Rivest and Stein's Introduction to Algorithms is the comprehensive textbook and reference, suited to students who want rigorous treatment and wider coverage, including topics this book leaves out.

Part IV leads into the specialist books in the course. Vazirani's Approximation Algorithms and Williamson and Shmoys's The Design of Approximation Algorithms take up the "compromising on correctness" theme of Chapter 20 with guaranteed approximation ratios, and Mitzenmacher and Upfal's Probability and Computing develops the probability behind randomized QuickSort, RSelect and Bloom filters.

How to Use This Book

The book suits computer science undergraduates around the second or third year, self-learners who programme and can follow a proof, and software engineers preparing for interviews. Review induction and probability in Appendices A and B first if needed.

A practical plan:

  • First course (core): Parts I–III, Chapters 1–18, skipping starred sections on a first pass. The preface notes that the data structure chapters (10–12) can come before or after the graph chapters (7–9), except Section 10.4.
  • Second course or self-study: Part IV, beginning with Chapter 19, then Chapters 20–21 for practical techniques and Chapter 22 for reductions. Chapter 23 is entirely starred and optional; Chapter 24 is a case study for motivation.
  • Starred sections: return to them for proofs (master method, QuickSort analysis, Dijkstra's correctness) once the main ideas are clear.

Stop at each quiz and answer it before reading on. Attempt the end-of-chapter problems and check the hints and solutions only afterwards. Implement at least one algorithm per chapter using the test cases on the companion website, and use the videos for sections that are hard on the page. Read the "Upshot" sections and the Field Guide before exams.