Contents
Fully polynomial-time approximation scheme
A fully polynomial-time approximation scheme (FPTAS) is an algorithm for finding approximate solutions to function problems, especially optimization problems. An FPTAS takes as input an instance of the problem and a parameter ε > 0. It returns as output a value which is at least times the correct value, and at most times the correct value. In the context of optimization problems, the correct value is understood to be the value of the optimal solution, and it is often implied that an FPTAS should produce a valid solution (and not just the value of the solution). Returning a value and finding a solution with that value are equivalent assuming that the problem possesses self reducibility. Importantly, the run-time of an FPTAS is polynomial in the problem size and in 1/ε. This is in contrast to a general polynomial-time approximation scheme (PTAS). The run-time of a general PTAS is polynomial in the problem size for each specific ε, but might be exponential in 1/ε. The term FPTAS may also be used to refer to the class of problems that have an FPTAS. FPTAS is a subset of PTAS, and unless P = NP, it is a strict subset.
Relation to other complexity classes
All problems in FPTAS are fixed-parameter tractable with respect to the standard parameterization. Any strongly NP-hard optimization problem with a polynomially bounded objective function cannot have an FPTAS unless P=NP. However, the converse fails: e.g. if P does not equal NP, knapsack with two constraints is not strongly NP-hard, but has no FPTAS even when the optimal objective is polynomially bounded.
Converting a dynamic program to an FPTAS
Woeginger presented a general scheme for converting a certain class of dynamic programs to an FPTAS.
Input
The scheme handles optimization problems in which the input is defined as follows:
Extremely-simple dynamic program
It is assumed that the problem has a dynamic-programming (DP) algorithm using states. Each state is a vector made of some b non-negative integers, where b is independent of the input. The DP works in n steps. At each step i, it processes the input xi, and constructs a set of states Si. Each state encodes a partial solution to the problem, using inputs x1,...,xi. The components of the DP are: The algorithm of the DP is: The run-time of the DP is linear in the number of possible states. In general, this number can be exponential in the size of the input problem: it can be in O(n Vb), where V is the largest integer than can appear in a state. If V is in O(X), then the run-time is in O(n Xb), which is only pseudo-polynomial time, since it is exponential in the problem size which is in O(log X). The way to make it polynomial is to trim the state-space: instead of keeping all possible states in each step, keep only a subset of the states; remove states that are "sufficiently close" to other states. Under certain conditions, this trimming can be done in a way that does not change the objective value by too much. To formalize this, we assume that the problem at hand has a non-negative integer vector d = (d1,...,db), called the degree vector of the problem. For every real number r>1, we say that two state-vectors s1,s2 are (d,r)-close if, for each coordinate j in 1,...,b: (in particular, if dj=0 for some j, then ). A problem is called extremely-benevolent if it satisfies the following three conditions: For every extremely-benevolent problem, the dynamic program can be converted into an FPTAS. Define: The FPTAS runs similarly to the DP, but in each step, it trims the state set into a smaller set Tk, that contains exactly one state in each r-box. The algorithm of the FPTAS is: The run-time of the FPTAS is polynomial in the total number of possible states in each Ti, which is at most the total number of r-boxes, which is at most R, which is polynomial in n, log(X), and 1/\epsilon. Note that, for each state su in Uk, its subset Tk contains at least one state st that is (d,r)-close to su. Also, each Uk is a subset of the Sk in the original (untrimmed) DP. The main lemma for proving the correctness of the FPTAS is: For every step k in 0,...,n, for every state ss in Sk, there is a state st in Tk that is (d,rk)-close to ss. The proof is by induction on k. For k=0 we have Tk=Sk; every state is (d,1)-close to itself. Suppose the lemma holds for k-1. For every state ss in Sk, let ss- be one of its predecessors in Sk-1, so that f(ss−,x)=ss. By the induction assumption, there is a state st- in Tk-1, that is (d,rk-1)-close to ss−. Since proximity is preserved by transitions (Condition 1 above), f(st−,x) is (d,rk-1)-close to f(ss−,x)=ss. This f(st−,x) is in Uk. After the trimming, there is a state st in Tk that is (d,r)-close to f(st-,x). This st is (d,rk)-close to ss. Consider now the state s* in Sn, which corresponds to the optimal solution (that is, g(s*)=OPT). By the lemma above, there is a state t* in Tn, which is (d,rn)-close to s*. Since proximity is preserved by the value function, g(t*) ≥ r(-Gn) · g(s*) for a maximization problem. By definition of r,. So. A similar argument works for a minimization problem.
Examples
Here are some examples of extremely-benevolent problems, that have an FPTAS by the above theorem.
- Multiway number partitioning (equivalently, Identical-machines scheduling) with the goal of minimizing the largest sum is extremely-benevolent. Here, we have a = 1 (the inputs are integers) and b = the number of bins (which is considered fixed). Each state is a vector of b integers representing the sums of the b bins. There are b functions: each function j represents inserting the next input into bin j. The function g(s) picks the largest element of s. S0 = {(0,...,0)}. The conditions for extreme-benevolence are satisfied with degree-vector d=(1,...,1) and G=1. The result extends to Uniform-machines scheduling and Unrelated-machines scheduling whenever the number of machines is fixed (this is required because R - the number of r-boxes - is exponential in b). Denoted Pm||\max C_j or Qm||\max C_j or Rm||\max C_j.
- Sum of cubed job completion time on any fixed number of identical or uniform machines - the latter denoted by Qm||\sum C_j^3 - is ex-benevolent with a=1, b=3, d=(1,1,3). It can be extended to any fixed power of the completion time.
- Sum of weighted completion time on any fixed number of identical or uniform machines - the latter denoted by Qm||.
- Sum of completion time on any fixed number of identical or uniform machines, with time-dependent processing times: Qm|time-dep|\sum C_j. This holds even for weighted sum of completion time.
- Weighted earliness-tardiness about a common due-date on any fixed number of machines: m||.
Simple dynamic program
Simple dynamic programs add to the above formulation the following components: The original DP is modified as follows: A problem is called benevolent if it satisfies the following conditions (which extend conditions 1, 2, 3 above): For every benevolent problem, the dynamic program can be converted into an FPTAS similarly to the one above, with two changes (boldfaced):
Examples
Here are some examples of benevolent problems, that have an FPTAS by the above theorem.
- The 0-1 knapsack problem is benevolent. Here, we have a=2: each input is a 2-vector (weight, value). There is a DP with b=2: each state encodes (current weight, current value). There are two transition functions: f1 corresponds to adding the next input item, and f2 corresponds to not adding it. The corresponding filter functions are: h1 verifies that the weight with the next input item is at most the knapsack capacity; h2 always returns True. The value function g(s) returns s2. The initial state-set is {(0,0)}. The degree vector is (1,1). The dominance relation is trivial. The quasi-dominance relation compares only the weight coordinate: s quasi-dominates t iff s1 ≤ t1. The implication of this is that, if state t has a higher weight than state s, then the transition functions are allowed to not preserve the proximity between t and s (it is possible, for example, that s has a successor and t does not have a corresponding successor). A similar algorithm was presented earlier by Ibarra and Kim. The run-time of this FPTAS can be improved to operations on integers. The exponent was later improved to 2.5.
- Minimizing the weighted number of tardy jobs, or maximizing the weighted number of early jobs, on a single machine; denoted 1||.
- Batch scheduling for minimizing the weighted number of tardy jobs: 1|batch|.
- Makespan of deteriorating jobs on a single machine: 1|deteriorate|\max C_j.
- Total late work on a single machine: 1||\sum V_j.
- Total weighted late work on a single machine: 1||.
Non-examples
Despite the generality of the above result, there are cases in which it cannot be used.
- In the total tardiness problem 1||\sum T_j, the dynamic programming formulation of Lawler requires to update all states in the old state space some B times, where B is of the order of X (the maximum input size). The same is true for a DP for economic lot-sizing. In these cases, the number of transition functions in F is B, which is exponential in the log(X), so the second technical condition is violated. The state-trimming technique is not useful, but another technique - input-rounding - has been used to design an FPTAS.
- In the variance minimization problem 1||CTV, the objective function is, which violates Condition 2, so the theorem cannot be used. But different techniques have been used to design an FPTAS.
FPTAS for approximating real numbers
A different kind of problem in which FPTAS may be useful is finding rational numbers that approximate some real numbers. For example, consider the infinite series. The sum is an irrational number. To approximate it by a rational number, we can compute the sum of the first k elements, for some finite k. One can show that the error in approximation is about. Therefore, to get an error of ε, we need about elements, so this is an FPTAS. Note that this particular sum can be represented by another sum in which only O(log(ε)) elements are needed, so the sum can actually be approximated in polynomial time in the encoding length of ε.
Some other problems that have an FPTAS
This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.
Wikipedia® is a registered trademark of the
Wikimedia Foundation, Inc.
Bliptext is not
affiliated with or endorsed by Wikipedia or the
Wikimedia Foundation.