A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Approximation Algorithms (LP Relaxation and Primal-Dual)

Research Depth 105 in the knowledge graph ☐ I know this ☆ Set as goal
5topics build on this
534prerequisites beneath it
See this on the map →
Greedy AlgorithmsLinear Programming Algorithms+2 more→→Algorithmic Game TheoryPCP Theorem and Hardness of Approximation+3 more
approximation-algorithms lp-relaxation primal-dual integrality-gap

Core Idea

Approximation algorithms provide provably near-optimal solutions to NP-hard optimization problems in polynomial time. LP relaxation replaces integer constraints with continuous ones, solves the resulting linear program, and then rounds the fractional solution to an integer solution — the integrality gap bounds the worst-case approximation ratio. The primal-dual method constructs feasible primal and dual solutions simultaneously, using complementary slackness conditions to guide the algorithm and weak duality to prove the approximation guarantee. For vertex cover, LP relaxation yields a 2-approximation (round all variables >= 1/2); for set cover, randomized rounding of the LP relaxation gives an O(log n)-approximation matching the hardness of approximation lower bound. These techniques transform optimization problems into algebraic ones where duality theory provides the performance guarantee.

Explainer

NP-hardness tells you that finding optimal solutions is (almost certainly) intractable. Approximation algorithms respond by asking: how close to optimal can we get in polynomial time? The answer depends on the problem, and the most powerful tools for both designing approximation algorithms and proving their guarantees come from linear programming duality.

LP relaxation is the most natural approach. Formulate the optimization problem as an integer linear program (ILP), drop the integrality constraints to get a linear program (LP), solve it, and round the fractional solution to an integer one. The LP optimum is a lower bound on the ILP optimum (for minimization), so if rounding increases the cost by at most a factor alpha, you have an alpha-approximation. For vertex cover, the rounding is simple: every vertex with LP value >= 1/2 enters the cover. Every edge is covered (its LP constraint forces at least one endpoint to >= 1/2), and the cost at most doubles. The factor of 2 is tight for this rounding scheme because the LP's integrality gap is exactly 2.

The primal-dual method is more sophisticated and often yields combinatorial algorithms. Instead of solving the LP, you simultaneously construct a feasible primal solution (the approximate answer) and a feasible dual solution (the lower bound certificate). The algorithm typically grows dual variables until some dual constraint becomes tight, then adds the corresponding primal element. Weak duality guarantees that the dual objective is a lower bound on the optimum, so if the primal cost is at most alpha times the dual objective, you have an alpha-approximation. The beauty is that the LP is never solved — it appears only in the proof. This yields fast, combinatorial algorithms with provable guarantees.

The deepest results in approximation algorithms connect the integrality gap of an LP (or SDP) relaxation to the hardness of approximation. The Unique Games Conjecture, if true, implies that for many problems the integrality gap of the natural SDP relaxation exactly characterizes the best achievable approximation ratio. For set cover, the Theta(log n) approximation ratio matches both the LP integrality gap and the hardness lower bound — the LP relaxation captures the problem's approximability perfectly. Understanding these connections between relaxation strength, rounding techniques, and computational hardness is the central project of modern approximation algorithm theory.

Practice Questions 4 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Two-Way Finite Automata → NFA to DFA Conversion (Subset Construction) → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Pushdown Automata (PDA) → Equivalence of CFGs and Pushdown Automata → Closure Properties of Context-Free Languages → Limitations of Context-Free Languages → Pumping Lemma for Context-Free Languages → Turing Machines → Variants of Turing Machines and Equivalence → Nondeterministic Time Complexity and NP → The P vs. NP Problem → Complexity Class P: Polynomial Time → Complexity Class NP: Nondeterministic Polynomial Time → NP-Completeness and Cook-Levin Theorem → The Cook-Levin Theorem → Boolean Satisfiability, Cook-Levin, and Reductions → 3-SAT and k-SAT Variants → Partition and Subset Sum Problems → Vertex Cover and Clique Problems → Approximation Algorithms and Approximation Ratios → Hardness of Approximation → Approximation Algorithms (LP Relaxation and Primal-Dual)

Longest path: 106 steps · 534 total prerequisite topics

Prerequisites (4)

Leads To (5)