Parameterized time bounds for functions #
Cslib.Complexity.DecidableInTimeO, DecidableInExpTime and DecidableInSubexpTime measure the
running time of decision problems in a structural parameter μ : α → ℕ of the instance rather than
in the bit length L = (encIn a).length alone. This module develops the same three notions for
functions: f is computable within time O(T a), within time 2 ^ (δ * μ a) times a polynomial in
L, and within that time for every δ > 0. It bridges them to Cslib.Complexity.FTIME and to
decision, and transfers them along polynomial-time reductions that change the parameter linearly.
Main definitions #
Cslib.Complexity.ComputableInTimeO,Cslib.Complexity.ComputableInExpTime,Cslib.Complexity.ComputableInSubexpTime: parameterized time bounds for functions.
Main results #
Cslib.Complexity.mem_FTIME_iff_computableInTimeO: agreement withFTIMEon length bounds.Cslib.Complexity.decidableInTimeO_iff_exists_computableInTimeO: decision as computation of a Boolean indicator.Cslib.Complexity.ComputableInTimeO.ite_polyTime_of_le,Cslib.Complexity.DecidableInTimeO.of_computableInTimeO_polyBounded: guarding by a polynomial-time test, and deciding a polynomial-time test on a function value, withinO(2 ^ x a * (L + 1) ^ e)for any nonnegative exponentx. The exponential-rate and single-machine subexponential versions are both corollaries.Cslib.Complexity.DecidableInExpTime.of_computableInExpTime_polyBounded: a polynomial-time test on a function value with polynomially bounded output length is decided at the function's rate.Cslib.Complexity.ComputableInExpTime.of_reduction,Cslib.Complexity.ComputableInSubexpTime.of_reduction: transfer along linear-parameter polynomial-time reductions.
Parameterized function time bounds #
f is computable within time O(T a) on the instance a: within time c * T a + c, for a
constant c, by a native multi-tape machine reading encIn a and writing encOut (f a) with some
workspace bound.
Weakening the bound of ComputableInTimeO up to constants.
f is computable in subexponential time in μ: within time 2 ^ (δ * μ a) times a polynomial
in the encoded input length for every δ > 0 (the machine and polynomial degree may depend on
δ).
Larger exponents allow more functions.
Rescaling the parameter linearly rescales the exponential rate.
Subexponential computability transfers to any parameter at least linear in μ.
DecidableInTimeO is ComputableInTimeO of a Boolean indicator function.
FTIME in terms of ComputableInTimeO. For a bound depending only on the encoded input
length, ComputableInTimeO agrees with membership in FTIME.
A function computable within time O(T) has a ComputableInO certificate within time and
charged workspace O(t), for a natural clock t within O(T).
A ComputableInO certificate within time t ≤ T gives ComputableInTimeO within T.
A ComputableInO certificate within c * (2 ^ (δ * μ a) * (L + 1) ^ e) gives
ComputableInExpTime.
Every polynomial-time computable function has exponential rate 0 in any parameter μ.
Guarding by a polynomial-time test. If f is computable within time
O(2 ^ x a * (L + 1) ^ e) and p, g are computable in polynomial time, then
if p a then f a else g a is computable within time O(2 ^ y a * (L + 1) ^ e') for some e',
for any nonnegative exponent y that is at least x wherever the test p passes.
Guarding an exponential-time function by a polynomial-time test and fallback preserves rate
δ ≥ 0.
Decision from function computation. If f is computable within time
O(2 ^ x a * (L + 1) ^ e) for a nonnegative exponent x and its encoded output length is
polynomially bounded in L, then any polynomial-time test on f a decides
{a | test (f a) = true} within time O(2 ^ x a * (L + 1) ^ e') for some e'.
Exact-rate decision from function computation. If f is computable in time
2 ^ (δ * μ a) · poly(|a|) (δ ≥ 0) and its encoded output length is polynomially bounded in
|a|, then any polynomial-time test on f a decides {a | test (f a) = true} at the same
exponential rate δ.
Subexponential function computation with polynomially bounded output length transfers to subexponential decision for any polynomial-time output predicate.
Transfer along linear-parameter parsimonious reductions. If r : α → β is computable in
polynomial time with μB (r a) ≤ c * μA a + c, and g : β → γ is computable in time
2 ^ (δ * μB b) · poly(|b|) (δ ≥ 0), then g ∘ r is computable in time
2 ^ (c * δ * μA a) · poly(|a|).
Subexponential function computation transfers along linear-parameter polynomial-time reductions.