Approximation Algorithms and Linear Programming

Chinese | English

Why Do We Need Approximation Algorithms?

In the previous chapters, we have seen that:

Therefore, we take a step back and ask a practical question:

If I don't pursue the optimal solution, can I quickly find an "approximately" good solution?

This is where approximation algorithms come in. ## What is an Approximation Algorithm?

Definition (informal):

An approximation algorithm is a polynomial-time algorithm that does not necessarily output the optimal solution, but guarantees an upper bound on the "gap" between its solution and the optimal solution.

We usually use the approximation ratio to measure the quality of the algorithm.

Approximation Ratio

For a minimization problem:

Approximation Ratio=Algorithm SolutionOptimal Solution

If an algorithm guarantees:

Algorithm SolutionρOPT

Then it is called a ρ-approximation algorithm.

Load Balancing Problem

This was the first example used to introduce approximation algorithms in Lecture 13 of the 570 course.

Problem Description:

Greedy Balancing

Algorithm:

  1. Process the jobs in the given order.

  2. Assign the current job to the machine with the minimum current load.

This is a very simple greedy approach.

Approximation Ratio Analysis (Core Idea)

Let:

Conclusion: T2T

Therefore, this greedy algorithm is a 2-approximation algorithm.

Intuitively:


Improved Greedy: LPT (1.5-Approximation)

Improved approach:

Sort the jobs by processing time from largest to smallest, then use the same greedy strategy.

This is the famous LPT (Longest Processing Time First). Conclusion

Lecture 13 provides the proof:

T1.5T

Therefore: This is a 1.5-approximation algorithm.

This shows that simple sorting + greedy approach can significantly improve the approximation quality.

2-Approximation Algorithm for Vertex Cover

Let's return to the familiar Vertex Cover problem.

Algorithm (very important)

This algorithm is a 2-approximation. Why?

Therefore: |S|2|OPT|

This is a classic 2-approximation algorithm.

Why can't the approximation algorithm for VC be directly used for Independent Set?

Although:

Independent Set ↔ Vertex Cover

Approximation does not preserve structure.

Conclusion: Reduction ≠ Approximation Transitivity

Approximation Relationship between Set Cover and Vertex Cover

Reason:

Conclusion: ρ-approx for Set Cover ⇒ ρ-approx for Vertex Cover

Approximation Algorithm for Max-3SAT

Problem: Given a set of clauses of length 3, maximize the number of satisfied clauses.

This is an extremely simple 1/2-Approximation

Algorithm:

  1. Set all variables to TRUE

  2. If ≥ 50% of clauses are satisfied, terminate

  3. Otherwise, set all to FALSE

Conclusion: This is a 1/2-approximation

The course also mentioned that more complex methods can achieve an 8/9-approximation, but this will not be discussed in detail. ## Designing Approximation Algorithms using Linear Programming (LP)

ILP Formulation of Weighted Vertex Cover

Define variables:

xi={1iS0iS

Objective function:

miniwixi

Constraints:

xi+xj1(i,j)E

This is an Integer Linear Program (ILP).

LP Relaxation (Key Technique)

Relax:

xi{0,1}

to:

xi[0,1]

This yields a Linear Program (LP), which can be solved in polynomial time.

Constructing an Approximate Solution from the LP Solution

Define:

S={ixi1/2}

Correctness:

Approximation Ratio Analysis:

w(S)2w(OPT)

LP Relaxation + Rounding yields a 2-Approximation.

Relationship between LP, IP, and Complexity Classes

The summary diagram in Lecture 13 is crucial: