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 moreAlgorithmic 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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesFinite State Machines (FSMs)Deterministic Finite Automata (DFA)Nondeterministic Finite Automata (NFA)Two-Way Finite AutomataNFA to DFA Conversion (Subset Construction)DFA Properties and Minimization AlgorithmsRegular Languages: Definition and CharacterizationContext-Free Grammars (CFGs)Pushdown Automata (PDA)Equivalence of CFGs and Pushdown AutomataClosure Properties of Context-Free LanguagesLimitations of Context-Free LanguagesPumping Lemma for Context-Free LanguagesTuring MachinesVariants of Turing Machines and EquivalenceNondeterministic Time Complexity and NPThe P vs. NP ProblemComplexity Class P: Polynomial TimeComplexity Class NP: Nondeterministic Polynomial TimeNP-Completeness and Cook-Levin TheoremThe Cook-Levin TheoremBoolean Satisfiability, Cook-Levin, and Reductions3-SAT and k-SAT VariantsPartition and Subset Sum ProblemsVertex Cover and Clique ProblemsApproximation Algorithms and Approximation RatiosHardness of ApproximationApproximation Algorithms (LP Relaxation and Primal-Dual)

Longest path: 106 steps · 534 total prerequisite topics

Prerequisites (4)

Leads To (5)