Closure of space-constructible bounds #
Space-constructible bounds (Cslib.Complexity.SpaceConstructible) are closed under sums and
constant multiples, adding the two values in binary. A bound computed in logarithmic space is
space-constructible when it is at least ⌊log₂ n⌋; so ⌊log₂ n⌋ and its powers are
space-constructible, the bounds of the space hierarchy at the logarithmic threshold.
Main results #
Cslib.Complexity.SpaceConstructible.add,Cslib.Complexity.SpaceConstructible.const_mul: sums and constant multiples.Cslib.Complexity.SpaceConstructible.of_computableInLogSpace: a bound at least⌊log₂ n⌋computed in logarithmic space.Cslib.Complexity.spaceConstructible_log2,Cslib.Complexity.spaceConstructible_log2_pow:⌊log₂ n⌋and its positive powers.
References #
Sums of space-constructible bounds are space-constructible: compute both values in binary and add them.
Constant multiples of space-constructible bounds are space-constructible.
A bound computed in logarithmic space is space-constructible when it is at least
⌊log₂ n⌋: the logarithmic work space is then within O(s n).
⌊log₂ n⌋ ^ (k + 1) is space-constructible: compute ⌊log₂ n⌋ in unary from the length,
multiply in unary and convert to binary, in logarithmic space.
⌊log₂ n⌋ is space-constructible.