Constant-time full-key fusion-node queries #
This width-indexed standard-basis RAM program returns the true inclusive rank of every bounded query in a sorted internal node. Its constants are actual preprocessing witnesses, loaded from the contiguous eighteen-word header. The program charges header loads, all register transfers, both stride-two full-key neighbor loads, multiword highest-bit arithmetic, and the second compression and rank. Memory and the original query and pointer are preserved.
The large-width branch assumes 2 ≤ n ≤ branching w and 9 ≤ Nat.log 2 w. Leaves,
small-width binary nodes and tree traversal are separate. No preprocessing-time bound is
claimed. No correctness or execution oracle is a parameter of the representation.
Main definitions #
NodeProgram.code: the actual node query, depending only on physical width.
Main results #
NodeProgram.exec: true inclusive full-key rank within 201000 standard instructions.NodeProgram.exists_preprocessing: actual fitting preprocessing witnesses for this query.
References #
The zero query bit needs a strict upper-boundary rank; the one bit needs an inclusive lower-boundary rank. Both calls include query compression and all transfers.
Instances For
On a miss, compute the highest differing bit and query its sibling boundary.
Instances For
Exact hits return the first cut. Misses execute the actual full-key correction.
Instances For
Complete width-indexed internal-node query. Node-dependent constants occur only in RAM.
Instances For
Registers 31 through 38 belong to the outer traversal. They are outside every node
workspace; the terminal self-copy used by moves occupies register 39 instead.
Every actual execution frames the caller's eight traversal registers.
The same caller frame for bounded-time executions, directly usable by traversal.
A miss executes the concrete highest-bit and boundary programs, returning the mathematical sibling-boundary rank. All incoming workspace registers may be arbitrary.
Every bounded query receives its true inclusive full-key rank. The physical program
depends only on w, and 201000 bounds the actual instruction count uniformly in w, n,
the keys, their preprocessing witnesses and the query. Registers 0 and 1 and all memory
are preserved. The address premise covers the last full key in the stride-two table.
Real preprocessing witnesses exist, all fifteen stored words fit, and the same width-indexed program answers every bounded query on every memory realizing those witnesses. The witness construction has no preprocessing-time assertion.