Polynomial-time approximation schemes #
An NPOptimizationProblem has typed instances and solutions, polynomially bounded feasible
solutions, and polynomial-time feasibility and objective evaluation. Its instance type
supplies the valid inputs. The feasibility certificate starts with a typed instance and
candidate solution. Kann, Definition 1 additionally requires
recognizing valid encoded instances in polynomial time. The typed model permits zero
objective values and requires a feasible solution for every instance.
We use Williamson and Shmoys, Definitions 3.3–3.4. A solution at
accuracy 1 / k for positive integer k is within the factor 1 + 1 / k for minimization,
or achieves at least the fraction 1 - 1 / k for maximization. Comparing with every
feasible solution avoids division and also covers zero-valued optima. Reciprocal integer
accuracies suffice since for any positive error one can choose a reciprocal no larger
than that error. A PTAS supplies a polynomial-time solver for each fixed accuracy.
An FPTAS supplies one polynomial-time solver on the instance paired with unary k.
The direction of an optimization objective.
- minimize : OptimizationGoal
Minimize the objective value.
- maximize : OptimizationGoal
Maximize the objective value.
A typed NP optimization problem with natural-valued objective.
- Feasible : α → β → Prop
Whether a solution is feasible for an instance.
- exists_feasible (a : α) : ∃ (b : β), self.Feasible a b
Every instance has a feasible solution.
Feasibility can be checked in polynomial time.
- solution_length_bound : ∃ (p : Polynomial ℕ), ∀ (a : α) (b : β), self.Feasible a b → (encS b).length ≤ Polynomial.eval (encI a).length p
All feasible solutions have polynomially bounded encoded length.
The objective value of a candidate solution.
- computableInPolyTime_value : Turing.MultiTapeTM.ComputableInPolyTime self.value (Turing.MultiTapeTM.encPair encI encS) Turing.MultiTapeTM.encNat
Evaluating the objective takes polynomial time.
- goal : OptimizationGoal
The direction of optimization.
The solution is feasible and satisfies the multiplicative error guarantee at accuracy
1 / k. The approximation schemes use this predicate only for positive k.