Documentation

CslibFrontier.Computability.Complexity.Classes.LogSpace.Savitch

Savitch's theorem for logarithmic space: NL ⊆ DSPACE(log² n) #

A problem in Cslib.Complexity.NL is decided by a deterministic machine within space O((log₂ n) ^ 2) [Sav70]. This is the case s = log₂ of Savitch's theorem Cslib.Complexity.NSPACE_subset_DSPACE_sq, through Cslib.Complexity.NL_eq_NSPACE; logspace recognizers, whose branches may run forever, are covered by Cslib.Complexity.mem_DSPACE_sq_of_recognizesInSpace. Since one-sided-error randomized logspace is within NL (Cslib.Complexity.RL_subset_NL), the same bound holds for Cslib.Complexity.RL Hoza, Section 4.3.

The space classes are Cslib.Complexity.DSPACE enc fun n => Nat.log2 n ^ 2, the problems decided within space c₁ * (log₂ n) ^ 2 + c₂ on encoded instances of length n.

Main results #

References #

theorem Cslib.Complexity.NL_subset_DSPACE_log2_sq {α : Type} {enc : α ↪ List Bool} :
NL enc ⊆ DSPACE enc fun (n : ℕ) => n.log2 ^ 2

Savitch's theorem for logarithmic space: NL ⊆ DSPACE(log² n) [Sav70], the case s = log₂ of Cslib.Complexity.NSPACE_subset_DSPACE_sq.

theorem Cslib.Complexity.RL_subset_DSPACE_log2_sq {α : Type} {enc : α ↪ List Bool} :
RL enc ⊆ DSPACE enc fun (n : ℕ) => n.log2 ^ 2

RL ⊆ DSPACE(log² n), through RL ⊆ NL Hoza, Section 4.3.