Documentation

Complexity.Computability.TreeEval.Space

Tree Evaluation in small space #

Cook and Mertz: Tree Evaluation of value length ℓ and height H is tidily 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 is tidy, its run on an instance halts with the value of the tree, and its states along the run, which follow the states of the read machine together with the position of the head, stay within the space bound.

Main definitions #

Main results #

References #

@[reducible, inline]

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 tidily computable from its encoding in space O((ℓ + H + 1) · log (ℓ + 2) + log (n + 2)).

      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 tidily computable from its encoding in space O(|n| · ||n||), where n is the length of the encoded instance and |m| = (encNat m).length.