Approximation algorithms are a central subfield of theoretical computer science concerned with the design and analysis of efficient algorithms for computationally hard optimization problems. The field addresses a fundamental trade-off: when finding an optimal solution is computationally intractable, how well can we do in a reasonable amount of time, and how can we prove that our solution is close to optimal?
Many practical optimization problems, such as the Traveling Salesperson Problem (TSP), the Knapsack Problem, and various scheduling and network design problems, belong to a class of problems known as NP-hard. For these problems, no algorithm is known that can find an optimal solution in time that scales polynomially with the input size, and it is widely believed that no such algorithm exists. This means that for large instances, finding the exact optimum is often infeasible.
The central question of approximation algorithms is: if we relax the requirement of optimality, what can we achieve efficiently? Instead of asking for the best possible answer, we ask for a solution that is guaranteed to be within a certain factor of the best possible answer. The field's primary goals are to design algorithms that produce such near-optimal solutions quickly and to prove formal guarantees about their quality. A secondary, equally important goal is to establish the limits of what is achievable, showing that for certain problems, no efficient algorithm can guarantee a solution better than a specific factor (unless a major complexity-theoretic collapse occurs).
The central formal concept is the approximation ratio (or approximation factor). For a minimization problem, an algorithm has an approximation ratio of ρ if, for every instance, the cost of the solution it produces is at most ρ times the cost of an optimal solution. For a maximization problem, the ratio is inverted: the algorithm's solution must be at least 1/ρ times the optimal value. In both cases, ρ ≥ 1, and the closer ρ is to 1, the better the guarantee.
This ratio provides a rigorous, worst-case performance guarantee. It is a promise that holds for all possible inputs, not just typical ones. The field distinguishes between several classes of guarantees. A constant-factor approximation has a ratio that is a fixed number, independent of the input size. A polynomial-time approximation scheme (PTAS) is a family of algorithms that, for any fixed ε > 0, can achieve a ratio of (1 + ε) for minimization (or (1 − ε) for maximization) in time that is polynomial in the input size, though the time may grow exponentially with 1/ε. A fully polynomial-time approximation scheme (FPTAS) is a stronger version where the running time is also polynomial in 1/ε.
The field is not organized around a single unified theory but rather around a set of powerful, distinct design techniques. These approaches are not mutually exclusive; many algorithms combine elements from several, and the choice of technique often depends on the structure of the problem at hand.
The most intuitive approach is to build a solution incrementally, making the choice that seems best at each step. Greedy algorithms are often the first attempt at a hard problem. For example, for the Set Cover problem, a greedy algorithm that repeatedly picks the set covering the most uncovered elements achieves an approximation ratio of ln(n), where n is the number of elements. This is a classic result, and it is known that no polynomial-time algorithm can achieve a significantly better ratio unless $P = NP$.
Local search is a related but distinct strategy. It starts with an arbitrary feasible solution and then iteratively makes small, local improvements until no such improvement is possible. The final solution is a local optimum. The key to analyzing such algorithms is to show that any local optimum is not too far from the global optimum. For example, for the Max-Cut problem, a simple local search algorithm that flips a single vertex to increase the cut size is guaranteed to find a cut with at least half the total possible edge weight, a 2-approximation.
These methods are valued for their simplicity and practical speed, but their analysis can be intricate. Their main limitation is that the guarantee is often weak, and for many problems, a simple greedy or local search approach cannot achieve the best-known ratios.
Linear programming (LP) is a powerful tool for optimization with continuous variables. The key insight is to formulate the discrete problem as an integer program, then relax the integrality constraints to obtain a linear program that can be solved optimally in polynomial time. The optimal solution to this relaxed LP is a lower bound (for minimization) on the true optimum. The challenge is to convert this fractional solution into a valid integer solution without losing too much quality.
Rounding is the direct approach: take the fractional solution and round each variable to an integer. The difficulty lies in doing this while maintaining feasibility and a good approximation ratio. For example, in the Vertex Cover problem, a simple rounding scheme that rounds up all variables with value ≥ 1/2 yields a 2-approximation.
A more sophisticated variant is the primal-dual method. Instead of solving the LP to optimality, this approach works simultaneously on the primal problem and its dual, building a feasible integer solution and a feasible dual solution in tandem. The dual solution provides a certificate of the quality of the primal solution. This method often yields faster algorithms and sometimes better combinatorial insights than explicit rounding.
Randomized rounding is a technique where the fractional solution from an LP relaxation is converted to an integer solution using randomization. Each fractional variable is rounded to an integer with a probability proportional to its fractional value. The analysis then uses probabilistic tools to show that the resulting solution is, with high probability, both feasible and close to optimal.
This approach is particularly powerful for problems with complex constraints. A landmark achievement is the Goemans–Williamson algorithm for Max-Cut, which uses randomized rounding on a semidefinite programming (SDP) relaxation. SDP is a generalization of LP where the variables are vectors in a high-dimensional space. The algorithm achieves an approximation ratio of about 0.878, which is a significant improvement over the simple 0.5 guarantee from local search. This result was a major breakthrough, demonstrating the power of SDP and randomized rounding, and it opened up a new research direction.
While often grouped with LP-based techniques, the primal-dual method deserves separate mention because its philosophy differs. It does not solve a relaxation to optimality. Instead, it maintains a feasible solution to the primal problem and a feasible solution to the dual problem, improving both iteratively. The dual solution acts as a lower bound, and the algorithm stops when the primal solution's cost is within a certain factor of the dual's value. This method has been highly successful for network design and facility location problems, often yielding combinatorial algorithms that are faster and more intuitive than those based on full LP solving.
A complete understanding of approximation requires knowing not just what is achievable but also what is not. The field of hardness of approximation studies the limits of approximability. A major breakthrough was the PCP Theorem (Probabilistically Checkable Proofs), proved in the early 1990s. This deep result implies that for many problems, even approximating the optimal solution within a certain factor is NP-hard. For example, it shows that it is NP-hard to approximate the Max-Cut problem better than the Goemans–Williamson ratio of 0.878, assuming P ≠ NP.
This creates a rich interplay between algorithmic design and complexity theory. For some problems, the best-known approximation ratio matches the best-known hardness result, meaning the problem is considered "solved" in the approximation sense. For others, a gap remains, and closing this gap is a major open research question. The PCP theorem and its consequences have transformed the field, turning it from a purely algorithmic discipline into one that is deeply intertwined with computational complexity.
The field today is a mature and active area of research. The core techniques—greedy, local search, LP rounding, primal-dual, and randomized rounding—are now standard tools taught in advanced algorithms courses. Research continues along several fronts.
One major direction is the search for better algorithms for specific problems, often using more sophisticated relaxations. SDP relaxations, once a novelty, are now a standard tool. Another direction is the development of approximation algorithms for new models of computation, such as online algorithms (where the input arrives over time) and sublinear-time algorithms (where the algorithm cannot even read the entire input). These models introduce new constraints and require new techniques.
A significant modern trend is the focus on beyond worst-case analysis. The traditional approximation ratio is a worst-case guarantee, but worst-case instances may be rare or contrived. Researchers are increasingly interested in algorithms that perform well on typical instances, or that can be shown to work well under specific assumptions about the input distribution. This includes work on smoothed analysis and on algorithms with instance-dependent guarantees.
Another important area is the study of fixed-parameter tractable approximation, where the goal is to find algorithms whose running time is polynomial in the input size but may be exponential in a small parameter, while also providing a good approximation. This is useful for problems where the parameter is small in practice.
The field remains unified by its central question: how to cope with intractability through provable, efficient approximation. The techniques are diverse, but they are all judged by the same rigorous standard of the approximation ratio, and they are all informed by the fundamental limits established by complexity theory. The interplay between algorithmic ingenuity and computational hardness continues to drive the field forward, making it a vibrant and essential part of theoretical computer science.