Math 2.0

Computer science Definition

Approximation algorithm

Builds on AlgorithmPVertex coverMatching

Definition

Consider a minimization problem in which each instance II has a nonempty finite set of feasible solutions. Each feasible solution SS has a cost c(S)>0c(S) > 0, and OPT(I)\mathrm{OPT}(I) is the least cost of a feasible solution of II. Let ρ≥1\rho \ge 1 be a real number. A ρ\rho-approximation algorithm for the problem is an algorithm AA with these properties:

  1. AA runs in time polynomial in the size of II, as for problems in P.
  2. For every instance II, AA outputs a feasible solution A(I)A(I).
  3. For every instance II, c(A(I))≤ρ⋅OPT(I)c(A(I)) \le \rho \cdot \mathrm{OPT}(I).

For a maximization problem, clause 3 becomes c(A(I))≥OPT(I)/ρc(A(I)) \ge \mathrm{OPT}(I) / \rho. The number ρ\rho is called the approximation ratio of AA.

Remarks

Example: for minimum vertex cover in a graph, take a maximal matching MM greedily and output both ends of each edge of MM. The output covers every edge, since an uncovered edge could be added to MM. Every vertex cover contains an end of each edge of MM, and these ends are distinct, so OPT≥∣M∣\mathrm{OPT} \ge \abs{M}, while the output has 2∣M∣2 \abs{M} vertices. So this is a 22-approximation algorithm.

Non-example: an exact algorithm that tries all subsets of vertices satisfies clauses 2 and 3 with ρ=1\rho = 1, but it fails clause 1, since it takes exponential time.

A polynomial-time approximation scheme is a family of (1+ε)(1 + \varepsilon)-approximation algorithms, one for each ε>0\varepsilon > 0.

Reading path

To understand this page from the ground up, read these 5 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Algorithm concept
  2. Matching concept
  3. P concept
  4. Vertex cover concept
  5. Approximation algorithm definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Approximation_algorithm
About this page
TagP50N7QXQSF
URIm2://P50N7QXQSF
Kinddefinition
WritingW0 stub
MSC68W25, 90C27, 68Q25
DefinesApproximation algorithm
UsesAlgorithm, P, Vertex cover, Matching
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.