Exponential time #
Cslib.Complexity.EXP enc is the union of the deterministic time classes
Cslib.Complexity.DTIME enc (2 ^ n ^ k) over k, and Cslib.Complexity.E enc the union of the
classes DTIME enc (2 ^ (k * n)), as in the classes proposed upstream in cslib pull request #767.
Their nondeterministic counterparts Cslib.Complexity.NEXP enc and Cslib.Complexity.NE enc are
the unions of the classes Cslib.Complexity.NTIME enc (2 ^ n ^ k) and NTIME enc (2 ^ (k * n))
Arora and Barak, Sections 2.1 and 2.6.
P is the union of the classes DTIME (n ^ k) (Cslib.Complexity.mem_P_iff_exists_mem_DTIME)
and NP that of the classes NTIME (n ^ k) (Cslib.Complexity.mem_NP_iff_exists_mem_NTIME), so
P ⊆ E ⊆ EXP, NP ⊆ NE ⊆ NEXP, and each deterministic class is within its nondeterministic
counterpart (Cslib.Complexity.DTIME_subset_NTIME).
The inclusion P ⊆ EXP is strict for problems on bit words (Cslib.Complexity.P_ssubset_EXP):
the diagonal problem of Cslib.Complexity.diagonal is decided within time O(2 ^ (4 * n)), which
is within 2 ^ n ^ 2 from n = 4 on, and is not in P by the diagonal argument of the time
hierarchy theorem Arora and Barak, Theorem 3.1, Sipser, Theorem 9.10.
Polynomial-time computation on a bit word y paired with unary padding 2 ^ |y| gives a problem
in E (Cslib.Complexity.setOf_mem_E_of_computableTidilyInPolyTime_pad), by writing the padding
in exponential time and applying the timed-reduction API.
Main definitions #
Cslib.Complexity.E,Cslib.Complexity.EXP: deterministic exponential time.Cslib.Complexity.NE,Cslib.Complexity.NEXP: nondeterministic exponential time.
Main results #
Cslib.Complexity.P_subset_E,Cslib.Complexity.E_subset_EXP,Cslib.Complexity.P_subset_EXP: polynomial time is within exponential time.Cslib.Complexity.NP_subset_NE,Cslib.Complexity.NE_subset_NEXP,Cslib.Complexity.NP_subset_NEXP: the same for nondeterministic time.Cslib.Complexity.E_subset_NE,Cslib.Complexity.EXP_subset_NEXP: determinism is a special case.Cslib.Complexity.P_ssubset_EXP: polynomial time is strictly within exponential time.Cslib.Complexity.setOf_mem_E_of_computableTidilyInPolyTime_pad: polynomial time on inputs padded to length2 ^ ngivesE.
References #
The problems decidable within time O(2 ^ n ^ k) for some k, on instances whose encoding
under enc has length n Arora and Barak, Section 2.6.
Instances For
The problems decidable by a nondeterministic machine within time O(2 ^ n ^ k) for some k,
on instances whose encoding under enc has length n
Arora and Barak, Section 2.6.
Instances For
Polynomial time is strictly within exponential time, for problems on bit words: the
diagonal problem is in EXP and not in P Arora and Barak, Theorem 3.1.
Exponential padding #
Padding to exponential length. If Ψ is polynomial-time on pairs of a bit word and a
unary number, then the words y with Ψ (y, 2 ^ |y|) form a problem in E: the padding
y ↦ (y, 2 ^ |y|) is written within time O(4 ^ |y|), and the problem decided by Ψ is in
DTIME (n ↦ c (n + 1) ^ d) (preimage_mem_DTIME).