Definition
Approximation Complexity Class
The approximation complexity class consists of NP-optimisation problems that admit a deterministic polynomial-time algorithm with a constant approximation ratio:
The constant and algorithm are fixed for the problem and must work for every feasible instance . Writing
for the value returned by , and , the guarantee is
Here must be feasible, so the inequalities for minimisation and for maximisation follow from optimality. The other inequality is the approximation guarantee. An individual member is an APX optimisation problem.
Quantifier Order
The definition has the order
The factor may depend on the problem , but it cannot depend on the particular instance or its size . For example, a guarantee of
does not prove membership in because the bound grows with the input size.
The running time of must satisfy
Here, uses poly notation. Unlike an approximation scheme, APX does not introduce an accuracy parameter . It asks only whether some fixed constant-factor guarantee can be achieved in polynomial time.
Direction of the Guarantee
For minimisation, the algorithm may return a value larger than the optimum, but by at most a factor :
For maximisation, the algorithm may return a value smaller than the optimum, but not below a fraction of it:
The symmetric factor therefore describes both goals. These inequalities also remain meaningful when the optimum is zero, whereas a quotient such as may be undefined.
Containment
Every problem admitting a PTAS belongs to APX: fix any constant accuracy, such as , and the scheme becomes a polynomial-time constant-factor approximation. By definition, every APX problem is an NP-optimisation problem. Hence,
The first containment compares classes of problems: here denotes the set of NP-optimisation problems that admit a PTAS.
Membership and Hardness
Membership in APX is an algorithmic upper bound: it asserts that a constant-factor approximation exists. It does not assert that the problem is difficult. A problem solvable exactly in polynomial time also belongs to APX by choosing .
APX-hardness is a separate lower-bound notion defined through approximation-preserving reductions. A problem may be:
- in APX without being known to be APX-hard;
- APX-hard without being known to belong to APX;
- APX-complete when both statements hold.
Example
Constant-factor membership
Suppose a polynomial-time algorithm for a minimisation problem always returns a feasible solution satisfying
Taking proves that .
A growing factor is insufficient
Suppose instead that the only known guarantee is
This guarantee alone does not prove that because its factor is not bounded by a constant independent of .