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 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
In computational complexity theory, a function problem is a computational problem where a single output (of a total function) is expected for every input, but the output is more complex than that of a decision problem. For function problems, the ...
.
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.
[. See discussion following Definition 1.30 o]
p. 20
Relation to other complexity classes
All problems in FPTAS are
fixed-parameter tractable with respect to the standard parameterization.
Any
strongly NP-hard In computational complexity, strong NP-completeness is a property of computational problems that is a special case of NP-completeness. A general computational problem may have numerical parameters. For example, the input to the bin packing proble ...
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:
*The input is made of ''n'' vectors, ''x''
1,...,''x
n''.
* Each input vector is made of some
non-negative integers, where
may depend on the input.
* All components of the input vectors are encoded in binary. So the size of the problem is O(''n''+log(''X'')), where X is the sum of all components in all vectors.
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
non-negative integers, where
is independent of the input. The DP works in ''n'' steps. At each step ''i'', it processes the input ''x
i'', and constructs a set of states ''S
i''. Each state encodes a partial solution to the problem, using inputs ''x''
1,...,''x
i''. The components of the DP are:
* A set ''S''
0 of ''initial states''.
* A set ''F'' of ''transition functions.'' Each function ''f'' in ''F'' maps a pair (state,input) to a new state.
* An objective function g, mapping a state to its value.
The algorithm of the DP is:
* Let ''S''
0 := the set of initial states.
* For ''k'' = 1 to ''n'' do:
** Let ''S
k'' :=
* Output min/max .
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 V
b''), 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 X
b''), 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'' = (''d''
1,...,''d
b''), called the ''degree vector'' of the problem. For every real number ''r''>1, we say that two state-vectors ''s''
1,''s''
2 are ''(d,r)-close'' if, for each coordinate ''j'' in 1,...,''b'':
(in particular, if ''d
j''=0 for some ''j'', then
).
A problem is called extremely-benevolent if it satisfies the following three conditions:
# ''Proximity is preserved by the transition functions'': For any ''r''>1, for any transition function ''f'' in ''F'', for any input-vector ''x'', and for any two state-vectors ''s''
1,''s''
2, the following holds: if ''s''
1 is (''d,r'')-close to ''s
2'', then ''f''(''s''
1,''x'') is (''d,r'')-close to ''f''(''s
2,x'').
#*A sufficient condition for this can be checked as follows. For every function ''f''(''s'',''x'') in ''F'', and for every coordinate ''j'' in 1,...,''b'', denote by ''f
j''(s,x) the ''j''-th coordinate of ''f''. This ''f
j'' can be seen as an integer function in ''b''+''a'' variables. Suppose that every such ''f
j'' is a polynomial with non-negative coefficients. Convert it to a polynomial of a single variable ''z'', by substituting ''s''=(z
d1,...,z
db) and ''x''=(1,...,1). If the degree of the resulting polynomial in ''z'' is at most ''d
j'', then condition 1 is satisfied.
#''Proximity is preserved by the value function:'' There exists an integer ''G'' ≥ 0 (which is a function of the value function ''g'' and the degree vector ''d''), such that for any ''r''>1, and for any two state-vectors ''s''
1,''s''
2, the following holds: if ''s''
1 is (''d,r'')-close to ''s
2'', then: ''g''(''s''
1) ≤ ''r
G'' · ''g''(''s
2'') (in minimization problems); ''g''(''s''
1) ≥ ''r
(-G)'' · ''g''(''s
2'') (in maximization problems).
#*A sufficient condition for this is that the function ''g'' is a polynomial function (of ''b'' variables) with non-negative coefficients.
#''Technical conditions'':
#*All transition functions ''f'' in ''F'' and the value function ''g'' can be evaluated in polytime.
#*The number , ''F'', of transition functions is polynomial in ''n'' and log(''X'').
#*The set ''S''
0 of initial states can be computed in time polynomial in ''n'' and log(''X'').
#*Let ''V
j'' be the set of all values that can appear in coordinate ''j'' in a state. Then, the
ln of every value in ''V
j'' is at most a polynomial P
1(n,log(X)).
#*If ''d
j''=0, the cardinality of ''V
j'' is at most a polynomial P
2(''n'',log(''X'')).
For every extremely-benevolent problem, the dynamic program can be converted into an FPTAS. Define:
*
:= the required approximation ratio.
*
, where ''G'' is the constant from condition 2. Note that
.
*
, where ''P''
1 is the polynomial from condition 3 (an upper bound on the ln of every value that can appear in a state vector). Note that
, so it is polynomial in the size of the input and in
. Also,
, so by definition of ''P''
1, every integer that can appear in a state-vector is in the range
L''">,''rL''
* Partition the range
L''">,''rL''into ''L''+1 ''r''-intervals: