Constructible resource bounds #
A time- or space-constructible bound is computed in binary from a word of length n by one
finite-state binary-alphabet machine, within O(t n) time or O(s n) work space respectively.
The input tape is read-only and the output tape write-only. Neither definition imposes a lower
bound on the resource function; hierarchy theorems state the lower bounds they need separately.
The shared length and arithmetic routines give concrete constructible bounds, without importing
any hierarchy theorem. The length of a word in binary, computed in linear time
(Turing.MultiTapeTM.ComputableInO.lengthNat), and the bounds on binary digits
(Turing.MultiTapeTM.exists_pow_length_encNat_le) are in
CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.BigO.Constructible; unary word
length is supplied by the quantitative API (Turing.MultiTapeTM.ComputableInO.lengthUnary).
Main definitions #
Cslib.Complexity.TimeConstructible: time-constructible bounds.Cslib.Complexity.SpaceConstructible: space-constructible bounds.
Main results #
Cslib.Complexity.TimeConstructible.spaceConstructible: time constructibility implies space constructibility.Cslib.Complexity.timeConstructible_const,Cslib.Complexity.timeConstructible_id,Cslib.Complexity.timeConstructible_succ,Cslib.Complexity.timeConstructible_two_pow,Cslib.Complexity.timeConstructible_two_pow_two_pow,Cslib.Complexity.timeConstructible_succ_pow,Cslib.Complexity.TimeConstructible.succ,Cslib.Complexity.TimeConstructible.succ_mul: time-constructible bounds.Cslib.Complexity.spaceConstructible_const,Cslib.Complexity.spaceConstructible_id,Cslib.Complexity.spaceConstructible_succ,Cslib.Complexity.spaceConstructible_succ_pow,Cslib.Complexity.spaceConstructible_two_pow,Cslib.Complexity.spaceConstructible_two_pow_two_pow: space-constructible bounds.
References #
A bound t is time-constructible when some machine with a binary alphabet and finitely many
states computes t n in binary from any word of length n within time O(t n). Arora and Barak
also ask for n ≤ t n Arora and Barak, Section 1.3; this definition omits that
condition, and the results that need it, such as Cslib.Complexity.DTIME_ssubset_DTIME, assume it
separately.
Instances For
A time-constructible bound is computed within time and space O(t n).
A computation of t n in binary within time O(t n) makes t time-constructible.
Adding one to a time-constructible bound preserves time constructibility.
Constant bounds are time-constructible.
n is time-constructible: count the length of the word in binary, in linear time.
n + 1 is time-constructible.
2 ^ n is time-constructible: its binary digits are n zeros followed by a one.
2 ^ (2 ^ n) is time-constructible: count 2 ^ n in unary and then write 2 ^ (2 ^ n) in
binary as 2 ^ n zeros followed by a one.
If f n is computed in binary from words of length n within time O((n + 1) * f n) and
n ≤ f n, then (n + 1) * f n is time-constructible: writing the length of the word in binary
takes linear time, and the product time polylogarithmic in the factors.
If f is time-constructible and n ≤ f n, then so is (n + 1) * f n.
(n + 1) ^ k is time-constructible.
(n + 1) ^ 2 is time-constructible.
Space-constructible bounds #
A bound s is space-constructible when some machine with a binary alphabet and finitely many
states computes s n in binary from any word of length n within space O(s n), halting
Sipser, Definition 9.1. Unlike Sipser, Definition 9.1, s n ≥ log n
is not required here; the space hierarchy theorem asks for ⌊log₂ n⌋ ≤ s n separately.
Instances For
A space-constructible bound is computed within space O(s n), within some time.
A time-constructible bound is space-constructible, since space is at most time.
A computation of s n in binary within space O(s n) makes s space-constructible:
it halts within a time bound of n, its number of configurations.
n is space-constructible: count the length of the word in binary.
n + 1 is space-constructible.
Constant bounds are space-constructible, in zero space.
(n + 1) ^ k is space-constructible.
2 ^ n is space-constructible.
2 ^ (2 ^ n) is space-constructible.