Tree Evaluation in small space #
Cook and Mertz: Tree Evaluation of value length ℓ and height H is computable on
multi-tape Turing machines in space O((ℓ + H + 1) · log (ℓ + 2) + log (n + 2)), where n
is the length of the encoded instance. On nontrivial instances (1 ≤ ℓ and 1 ≤ H), both 2 ^ ℓ
and 2 ^ H are at most n, so ℓ, H < |n| and |ℓ| ≤ ||n|| (writing |m| for the binary length
of m), which yields the headline input-size space bound O(|n| · ||n||) = O(log n · log log n).
The step machine simulating the read machine Cslib.TreeEval.Reader.machine has a resource
certificate. Its run on an instance halts with the value of the tree. The states along the run
follow those of the read machine together with the head position and stay within the space bound.
Main definitions #
Cslib.TreeEval.NontrivialInstance: Tree Evaluation instances with1 ≤ ℓand1 ≤ H.Cslib.TreeEval.encNontrivialInstance: the encoding of nontrivial instances.
Main results #
Cslib.TreeEval.computableInSpace_eval: Tree Evaluation in spaceO(spaceBound ℓ H + log (n + 2)), with the value not charged to the space bound (Turing.MultiTapeTM.ComputableInBigO).Cslib.TreeEval.spaceBound_add_length_le_log_mul_log_log: on nontrivial instances,spaceBound ℓ H + |n + 1| ≤ 6 · |n| · ||n||.Cslib.TreeEval.computableInSpace_eval_log_mul_log_log: Tree Evaluation on nontrivial instances in spaceO(|n| · ||n||) = O(log n · log log n).
References #
A nontrivial Tree Evaluation instance: both the value length ℓ and the height H are
positive.
Instances For
The encoding of nontrivial Tree Evaluation instances.
Instances For
Tree Evaluation in small space (Cook–Mertz): the value of the tree of an instance of value
length ℓ and height H is computable from its encoding in space
O((ℓ + H + 1) · log (ℓ + 2) + log (n + 2)); the value is not charged to the space bound.
On a nontrivial instance (1 ≤ ℓ and 1 ≤ H), the parameter space bound plus the head-counter
length is at most 6 · |n| · ||n||, where n = (encInstance I).length and
|m| = (encNat m).length.
Tree Evaluation in space O(log n · log log n) (Cook–Mertz): on nontrivial instances
(1 ≤ ℓ and 1 ≤ H), the value of the tree is computable from its encoding in space
O(|n| · ||n||), where n is the length of the encoded instance and |m| = (encNat m).length;
the value is not charged to the space bound.