Bit encodings of Tree Evaluation instances #
An instance of height h and value length ℓ is encoded by the unary header 1^ℓ 0 1^h 0,
followed by its body in pre-order: a leaf is its ℓ bits, and a gate f is its table, the
4^ℓ * ℓ bits f (α k) (β k) i for k < 4^ℓ and i < ℓ in this order, where α k and β k read
the low and high ℓ bits of k, followed by the bodies of its children.
The body of a subtree of height d has length bodyLength ℓ d, so the node at a path starts at the
offset pathOffset, which a machine can recompute from the path alone.
Main definitions #
Cslib.TreeEval.Tree.body,Cslib.TreeEval.Tree.encode: the body and the full encoding.Cslib.TreeEval.tableBit: the bit of a gate's table at a position.Cslib.TreeEval.pathOffset: the offset of the node at a path within a body.
Main results #
Cslib.TreeEval.two_pow_ell_le_bodyLength,Cslib.TreeEval.two_pow_height_le_bodyLength: exponential lower bounds2 ^ ℓ ≤ bodyLength ℓ H(for1 ≤ ℓ,1 ≤ H) and2 ^ H ≤ bodyLength ℓ H(for1 ≤ ℓ) on the body length.Cslib.TreeEval.Tree.getElem_body_pathOffset: the bits of the node at a path, read off the body at its offset;Cslib.TreeEval.Tree.getElem_body_gateandCslib.TreeEval.Tree.getElem_body_leaffor gates and leaves.
References #
- S. Cook, P. McKenzie, D. Wehr, M. Braverman and R. Santhanam, Pebbles and branching programs for tree evaluation introduce the problem, with gates given by their tables.
The number of bits in the table of a gate on ℓ-bit values.
Instances For
The length of the body of a subtree of height d.
Instances For
A tree of positive height includes at least the root gate table.
For 1 ≤ ℓ and 1 ≤ H, the body has length at least 2 ^ ℓ.
For 1 ≤ ℓ, the body of a height-H tree has length at least 2 ^ H.