Documentation

CslibFrontier.Computability.Complexity.Classes.NQuasiP

Nondeterministic quasi-polynomial time #

Cslib.Complexity.NQuasiP enc is the union of the classes Cslib.Complexity.NTIME enc (2 ^ (Nat.log 2 n + 1) ^ k) over k: the problems decided by a nondeterministic machine in time 2 ^ O((log n) ^ k) for some k, on instances whose encoding under enc has length n [MW18]. It contains NP.

Main definitions #

Main results #

References #

def Cslib.Complexity.NQuasiP {α : Type u_1} (enc : α ↪ List Bool) :
Set (Set α)

The problems decidable by a nondeterministic machine within time O(2 ^ (log₂ n + 1) ^ k) for some k, on instances whose encoding under enc has length n [MW18]. Murray and Williams write it NQP; Cslib.Complexity.NQP is the quantum class.

theorem Cslib.Complexity.mem_NQuasiP_iff {α : Type u_1} {enc : α ↪ List Bool} {A : Set α} :
A ∈ NQuasiP enc ↔ ∃ (k : ℕ), A ∈ NTIME enc fun (n : ℕ) => 2 ^ (Nat.log 2 n + 1) ^ k

A problem is in NQuasiP when it is in NTIME (2 ^ (log₂ n + 1) ^ k) for some k.

theorem Cslib.Complexity.NTIME_subset_NQuasiP {α : Type u_1} {enc : α ↪ List Bool} (k : ℕ) :
(NTIME enc fun (n : ℕ) => 2 ^ (Nat.log 2 n + 1) ^ k) ⊆ NQuasiP enc

Each class NTIME (2 ^ (log₂ n + 1) ^ k) is within NQuasiP.

theorem Cslib.Complexity.pow_succ_le_mul_two_pow_log (d n : ℕ) :
(n + 1) ^ d ≤ 2 ^ d * 2 ^ (Nat.log 2 n + 1) ^ (d + 1)

A polynomial is within quasi-polynomial time. For every n, (n + 1) ^ d ≤ 2 ^ d * 2 ^ ((log₂ n + 1) ^ (d + 1)).

theorem Cslib.Complexity.NP_subset_NQuasiP {α : Type} {enc : α ↪ List Bool} :
NP enc ⊆ NQuasiP enc

Nondeterministic polynomial time is within nondeterministic quasi-polynomial time.

theorem Cslib.Complexity.P_subset_NQuasiP {α : Type} {enc : α ↪ List Bool} :
P enc ⊆ NQuasiP enc

Polynomial time is within nondeterministic quasi-polynomial time.