Reducibility
Cover ←
Contents

21 chapters · 63 sections

  1. Chapter I

    Satisfiability

    The mother problem. Cook (1971) proved SAT NP-complete; Karp (1972) fanned out from it to twenty more problems that look nothing alike but turn out to be the same hardness in disguise.

    • 01 The mother problem
    • 02 DPLL in Prolog
    • 03 Why chip companies care
  2. Chapter II

    0-1 Integer Programming

    Karp's first reduction from SAT. Replace each Boolean variable with a 0/1 integer; replace each clause with a linear inequality. SAT becomes "does Ax ≥ b have a 0/1 solution?"

    • 04 Booleans in disguise
    • 05 Modeling in MiniZinc
    • 06 Capital budgeting
  3. Chapter III

    Clique

    Find the largest fully-connected subgraph. Easy to state, brutal to compute, and the gateway from logic problems into graph problems.

    • 07 Friends of friends of friends
    • 08 Bron–Kerbosch in C++
    • 09 Money laundering rings
  4. Chapter IV

    Set Packing

    Pick as many sets as you can without two of them sharing an element. The dual of set cover, and the problem behind every "you can't double-book this resource" rule in the world.

    • 10 Disjoint or bust
    • 11 Branch-and-bound in Python
    • 12 Crew pairings
  5. Chapter V

    Vertex Cover

    Pick the smallest set of vertices that touches every edge. Karp's "Node Cover" — the cleanest demonstration that NP-completeness can be cheap to recognize.

    • 13 Touch every edge
    • 14 Branching in Haskell
    • 15 Where to put the cameras
  6. Chapter VI

    Set Cover

    Cover every element of a universe using as few sets as possible. The greedy ln(n)-approximation is one of the most-used algorithms in industry that nobody calls by its name.

    • 16 Cover the universe
    • 17 Greedy in R
    • 18 Where to advertise
  7. Chapter VII

    Feedback Node Set

    Remove the smallest set of vertices that breaks every cycle. The vertex-deletion problem behind every "this can't deadlock" guarantee.

    • 19 Break every cycle
    • 20 Cycle hunting in Go
    • 21 Deadlock detection
  8. Chapter VIII

    Feedback Arc Set

    Same idea, but you delete edges instead of vertices. Every "rank these things consistently" problem in the world reduces to it.

    • 22 The wrong-way edges
    • 23 Eades–Lin–Smyth in Rust
    • 24 Ranking the unrankable
  9. Chapter IX

    Directed Hamilton Circuit

    Find a cycle that visits every vertex exactly once. The skeleton inside every traveling-salesman variant.

    • 25 Visit every node, exactly once
    • 26 Search in Erlang
    • 27 Telco failover routing
  10. Chapter X

    Undirected Hamilton Circuit

    Drop the directions. Still NP-complete. The undirected case has more structural lemmas (Dirac, Ore) but no general polynomial test.

    • 28 Tours without arrows
    • 29 Concurrent search in Elixir
    • 30 PCB drilling and 3D printing
  11. Chapter XI

    3-Satisfiability

    Restrict SAT to clauses of at most three literals. Still NP-complete. The standard starting point for almost every reduction in the literature.

    • 31 Three is enough
    • 32 WalkSAT in Clojure
    • 33 Verifying the JVM
  12. Chapter XII

    Chromatic Number

    Color the vertices so adjacent vertices differ; use as few colors as possible. The graph problem behind compiler register allocation.

    • 34 Color the map
    • 35 DSATUR in Java
    • 36 Register allocation
  13. Chapter XIII

    Clique Cover

    Partition the vertices of a graph into cliques, using as few as possible. The same as coloring the complement graph.

    • 37 Cliques as colors
    • 38 Reducing in Kotlin
    • 39 Community detection
  14. Chapter XIV

    Exact Cover

    Cover the universe so every element is covered exactly once by your chosen sets. The problem under Sudoku, polyomino tiling, and Knuth's Dancing Links.

    • 40 Exactly once
    • 41 Algorithm X in Ruby
    • 42 Crew assignment, exactly
  15. Chapter XV

    Hitting Set

    Find the smallest set that intersects ("hits") every set in a family. The dual of set cover, but framed from the elements' side.

    • 43 Hit them all
    • 44 Greedy in Perl
    • 45 Test suite minimization
  16. Chapter XVI

    Steiner Tree

    Connect a chosen subset of vertices with the cheapest tree. Other vertices may be used as helpful waypoints — that is the Steiner trick.

    • 46 The cheapest connection
    • 47 Metric closure in TypeScript
    • 48 Wires on a chip
  17. Chapter XVII

    3-Dimensional Matching

    Bipartite matching is in P. Add a third side and it becomes NP-complete — one of complexity theory's cleanest dimensional cliffs.

    • 49 Two sides easy, three sides hard
    • 50 Backtracking in Swift
    • 51 The kidney exchange
  18. Chapter XVIII

    Knapsack

    Pack the most value into a fixed-capacity bag. The textbook NP-complete problem with a famously fast pseudo-polynomial DP.

    • 52 The knapsack
    • 53 DP in C#
    • 54 Capital budgeting and ad slots
  19. Chapter XIX

    Job Sequencing

    Schedule jobs with deadlines and penalties on a single machine. Ada was designed for problems with deadlines that matter.

    • 55 Deadlines on a single machine
    • 56 Moore–Hodgson in Ada
    • 57 Avionics task scheduling
  20. Chapter XX

    Partition

    Split a multiset of integers into two subsets with equal sums. Knapsack's special case, surprisingly hard, surprisingly close to easy.

    • 58 Two equal piles
    • 59 DP and Karmarkar–Karp in OCaml
    • 60 Load balancing across racks
  21. Chapter XXI

    Max Cut

    Partition the vertices into two groups to maximize the edges between the groups. The crown jewel of approximation algorithms — and the canonical benchmark for quantum optimization.

    • 61 The maximum cut
    • 62 Local search in Julia
    • 63 Spin glasses and portfolio risk

Scan to come back to the table of contents