Introduction
Modern language-model agents are computational systems built around a model, not isolated model calls: a harness manages context, persistent state, tools, verification, and repeated execution [2 ] , [3 ] , [4 ] , [5 ] . Existing theory largely characterizes what models or agentic extensions can compute: additional reasoning steps, external memory, tool access, and verifier interaction can all change computational power [6 ] , [7 ] , [8 ] , [9 ] , [10 ] . What it does not characterize is the resource cost of realizing that computation through a harness.
Harness architecture is itself a source of computational complexity. Two agents using the same underlying model can have the same semantic capability yet require asymptotically different numbers of model calls, context–memory transfers, memory operations, or verification steps. We therefore ask a different theoretical question: holding semantic capability fixed, what resources must a harness spend to execute a computation, and what is the optimal tradeoff among model calls, context, persistent storage, communication, and verification?
We introduce the Language Model Agent Machine (LAM), a resource theory for model–harness execution. LAM fixes semantic-oracle power and makes context, persistent storage, state movement, model calls, tools, and verification explicit computational resources. Its value-provenance principle allows the harness to move, store, and reuse semantic state but prevents it from creating task-relevant content for free. This separation is essential: it lets us attribute differences in execution cost to harness design rather than to a stronger underlying model.
This viewpoint exposes resource questions that are invisible to computability alone. How much communication is forced by bounded context? Does the interface to the same amount of memory change complexity? When can persistent state replace repeated semantic computation? How expensive is correctness when model transitions are imperfect? Classical complexity theory provides important ingredients for each question, but harness executions introduce complications absent from the classical abstractions: values may be copied or recomputed, only active-context values can directly enter a model call, the controller must not store semantic information for free, and an incorrect model transition may be committed before its error can be detected. We resolve these complications in four resource laws:
Communication is exactly characterized by pebbling (§ 4 ). Red–blue pebbling provides the classical abstraction for fast–slow memory communication, but a harness execution contains physical block copies, recomputation, and controller-managed state that do not correspond one-to-one with graph vertices. Using value provenance, we quotient block occurrences by computational origin and prove an instancewise, resource-preserving correspondence: for every L L L -realizable DAG, memory-initialized vertex-granular LAM evaluations and red–blue pebblings have exactly the same feasible call–transfer budgets. The result therefore preserves the full discrete Pareto frontier, not only an asymptotic I/O lower bound or a single weighted optimum (Theorem 1, Corollary 9 and Corollary 10). Classical pebbling lower bounds consequently become harness-communication lower bounds. On a sequential chain, dependency-only prompting uses Θ ( n b ) \Theta(nb) Θ ( nb ) logical input symbols, versus Θ ( n 2 b ) \Theta(n^{2}b) Θ ( n 2 b ) for full-history replay (Proposition 12).
The memory interface changes computational complexity (§ 5 ). Memory capacity alone does not determine harness cost. For FIFO retrieval through a single stack, arbitrary buffering and copying defeat the usual stack-order argument; we prove a single-copy normal form that removes this freedom without increasing context, and from it derive the exact context–storage–traffic frontier, including the precise feasibility region and optimal transfer cost (Theorem 17 , Corollary 19). Random access solves the same routing task with constant active context. On pointer chasing, random access follows k k k pointers in k k k reads, whereas every always-correct non-speculative sequential execution requires Ω ( k n ) \Omega(kn) Ω ( k n ) expected head movements; even unrestricted always-correct read-only sequential execution retains an Ω ( n ) \Omega(n) Ω ( n ) lower bound (Theorem 2 , Proposition 14).
Persistent state trades directly against semantic recomputation (§ 6 ). The classical bit-reversal graph has a known call–space tradeoff, but the LAM setting separates active context from persistent storage: only context participates directly in a model call, while stored values must be explicitly recovered, and the input source is delivered only once. We lift the classical tradeoff to this asymmetric execution model and obtain a complete harness-level characterization: optimal model-call complexity Θ ( n 2 / ( C + S ) + n ) \Theta(n^{2}/(C+S)+n) Θ ( n 2 / ( C + S ) + n ) , explicit two-sided constants, the exact feasibility region, and a matching schedule with linear context–memory traffic (Theorem 3). In particular, linear model-call complexity is achievable if and only if total semantic capacity C + S C+S C + S is linear in n n n ; without persistence, the same computation incurs a Θ ( n / C ) \Theta(n/C) Θ ( n / C ) multiplicative recomputation overhead when C = o ( n ) C=o(n) C = o ( n ) .
Correctness feedback changes the cost of reliable execution (§ 7 ). Classical noisy-query bounds describe the cost of distinguishing a correct answer locally, but an agent commits to a sequence of dependent states. We construct a hidden-tree family in which an erroneous commitment produces no later diagnostic signal, allowing adaptive within-stage stopping while making mistakes irreversible. On this family, stage-local sampling without correctness feedback requires
Θ ( n γ − 2 log ( n / δ ) ) \Theta(n\gamma^{-2}\log(n/\delta)) Θ ( n γ − 2 log ( n / δ )) model calls, and the order is tight (Theorem 21 and Theorem 4 ). Perfect local verification removes the logarithmic amplification overhead, while imperfect verification admits an exact accepted-error and retry-cost law (Theorem 5 ). Classical checkpointing supplies the square-root intuition, but under LAM we derive the exact rollback cost for semantic transitions and a closed-form optimal checkpoint interval k ∗ k^* k ∗ (Theorem 6 ).
What the lam abstraction adds.
The resource laws above do not follow from their classical counterparts by renaming memory or checkpoint variables. Each requires an execution-level bridge between a harness trace and the corresponding mathematical object. Table 1 summarizes the resulting theory.
Table 1. Harness-level content of the four resource laws. Each row identifies the execution feature that must be handled to obtain an exact resource statement for a fixed semantic model.
The theory is also evaluated prospectively on GPT-6 Astra [1 ] , a frontier reasoning model. Quantitative forecasts are determined from development or calibration data and evaluated on disjoint held-out data with the forecast quantities held fixed. Checkpoint-cost forecasts identify the observed optimal interval at every tested verification price, and a separately frozen tournament prospectively tests cost-aware checkpoint-policy selection, conditional on a programmatic segment check that is not priced as a semantic call. Held-out chained MATH confirms the input-traffic advantage of dependency-aware routing within stepwise execution while exposing an important boundary:
whole-task model calls can collapse many logical steps into a single call, with substantially lower input traffic but lower observed held-out reliability in our experiment. Prescribed schedules are reported separately as implementation checks rather than empirical tests of lower bounds (§ 8 ).
Related Work
Agent computability and harness complexity.
Prior theory largely asks what language models and agentic extensions can compute, including the effects of additional reasoning, external memory, tools, and verification [2 , 3 , 4 , 6 , 7 , 8 , 10 , 11 ] . Closest in spirit, MemGPT [12 ] manages a bounded context window by paging state to external storage, an operating-system analogy that our active context X X X and persistent memory M M M formalize. Differently, LAM asks a question: holding semantic-oracle power fixed, what resources must the harness spend to realize a computation? This makes model calls, context, persistent storage, memory traffic, and verification explicit computational resources, and exposes complexity differences between harnesses with the same semantic capability. Structured procedures handed to a model, such as program-guided transformers [13 ] or routines discovered from a single demonstration [14 ] , structure-aware planning with a world model [15 ] , or natural-language skills that a frozen model evolves from its own experience and verifier feedback [16 ] , are harness-level objects in this sense: they change the execution schedule without changing the model. Research-level mathematics agents such as RMA [17 ] , with persistent proof state, bounded per-call context, and verifier feedback, are concrete harnesses of the kind LAM is designed to account for.
Communication, access, and recomputation.
Red–blue pebbling [18 ] and classical bit-reversal tradeoffs [19 ] provide lower-bound machinery for abstract computations. LAM establishes the bridge to harness execution: the pebbling correspondence preserves simultaneous call and transfer budgets and therefore the full discrete Pareto frontier, while the bit-reversal theorem gives the joint law Θ ( n 2 / ( C + S ) + n ) \Theta(n^2/(C+S)+n) Θ ( n 2 / ( C + S ) + n ) for active context and persistent memory, including explicit constants and the exact feasibility region. Our access results further show that memory capacity alone is insufficient: the access interface itself can change asymptotic complexity. Search-augmented agents meet the same constraint empirically: uncontrolled retrieval can saturate the context, which motivates adaptive control of what evidence enters it [20 ] ; LAM prices this context–memory traffic explicitly.
Reliability and cost-aware execution.
Noisy-query theory, reliable computation, verifier-assisted generation, selective prediction [21 ] , capacity-constrained review [22 ] , and checkpointing study different aspects of computation under uncertainty [10 , 23 , 24 , 25 , 26 , 27 , 28 ] . LAM treats correctness feedback as a priced computational resource, yielding tight sampling bounds without feedback, exact error–cost laws for imperfect verification, and a closed-form checkpoint optimum under rollback. Empirical work measures deployment-specific accuracy–cost tradeoffs [29 ] , [30 ] and evaluates agents beyond one-shot task success, for example with workflow-aware episodes [31 ] or teaching-over-solving diagnostics [32 ] ; our theory instead predicts feasible resource tradeoffs and harness choices before execution, which we test prospectively in § 8 .
Language Model Agent Machines
The LAM is designed to separate two quantities that existing agent abstractions often conflate: semantic capability and the resources required to orchestrate that capability (Figure 1 a). It models the harness-level execution around a fixed semantic interface—context construction, persistent state, memory access, tools, verification, and repeated calls—rather than the model’s internal computation.
Vector (PDF) (a) From deployed LM system to agent system
An LM agent interacts with context, memory, tools, and verifiers to accomplish user tasks.
User / Task
Goal, instruction, query, environment
Context
Prompts, external data
Language Model
Reasoning, planning, tool use, memory, checking
Action/Output
Answer, action, plan, or tool use
Tools
APIs, code, external systems
Checks / Verifier
Checks candidate states or transitions
Memory
Short- & long-term memory
(b) LAM formalization
L A M = ( L , c t r l , X , M , O t o o l , O v e r ) LAM=(L,\mathit{ctrl},X,M,O_{\mathrm{tool}},O_{\mathrm{ver}}) L A M = ( L , ctrl , X , M , O tool , O ver )
L L L = model interface
Language model that maps contexts to outputs (next-token oracle).
c t r l \mathit{ctrl} ctrl = controller
Routing controller that orchestrates calls, tool use, memory, and verification.
X X X = active context
Active context / working set. Bounded model-facing state used for the current operation.
M M M = memory
Persistent memory retaining blocks across calls.
O t o o l O_{\mathrm{tool}} O tool = tools
External tools (e.g., search, code execution, databases).
O v e r O_{\mathrm{ver}} O ver = verifier
Verification and checking (e.g., self-critique, external verifiers, reward models).
(c) Tracked resources
(d) Red–blue pebbling interpretation
A computation can be viewed as placing and removing pebbles on intermediate results.
(i) Computation DAG
Z Z Z depends on A A A and B B B .
(ii) Pebble A A A
A A A is stored in persistent memory, represented by a blue pebble.
(iii) Pebble B B B
Loading A A A and B B B into active context changes their pebbles from blue to red.
(iv) Pebble Z Z Z
With A A A and B B B in active context, the model can compute Z Z Z , placing a red pebble on Z Z Z .
(v) Remove A A A and B B B
A A A and B B B may be evicted from active context, while Z Z Z may be stored in persistent memory.
Figure 1. Overview of the LAM: (a) an agent with active context, persistent memory, tools and verifiers; (b) the LAM components; (c) the charged quantities (calls N N N , token traffic T i n , T o u t T_{\mathrm{in}}, T_{\mathrm{out}} T in , T out , memory operations, capacities, target failure probability δ \delta δ ); (d) red–blue pebbling (context blocks red, memory blocks blue, transfers communication).
Semantic block.
Fix an input size n n n and a finite alphabet Σ \Sigma Σ . A semantic block , a fixed-width unit of task-relevant information, is an element of B n ≔ Σ b ( n ) \mathcal{B}_n \coloneqq\Sigma^{b(n)} B n : = Σ b ( n ) , where b ( n ) b(n) b ( n ) is the block width.
Machine model.
A LAM is a tuple Λ = ( L , c t r l , X , M , O t o o l , O v e r ) \Lambda= (L, \mathrm{ctrl}, X, M, O_{\mathrm{tool}}, O_{\mathrm{ver}}) Λ = ( L , ctrl , X , M , O tool , O ver ) , drawn in Figure 1 b, where L L L is the model interface, ctrl is the harness controller, X X X is the active context, M M M is the persistent memory, and O t o o l O_{\mathrm{tool}} O tool and O v e r O_{\mathrm{ver}} O ver are the tool and verifier interfaces. The active context X X X holds at most C C C blocks available to the next model call; the persistent memory M M M holds at most S S S blocks across calls outside X X X , and a stored block must be retrieved into X X X before a call can use it, the persistent copy staying in place. A call to L L L consumes blocks in X X X and inserts its output as a new block of X X X , so a call takes at most C − 1 C - 1 C − 1 argument blocks. A tool returns a semantic block through an explicitly charged operation. A verifier returns a tag (e.g. accept/reject in § 7 ), inserts no block, and may inspect all C C C resident blocks. Each of L L L , O t o o l O_{\mathrm{tool}} O tool and O v e r O_{\mathrm{ver}} O ver is a fixed map of its opcode and argument blocks alone (the interface clause ): no interface sees the input, M M M , or a block not passed to it. The controller is a finite control with tag and address registers that see block contents only through returned tags and decoded addresses, plus the occupancy pattern of X X X and public step counters; Definition 3 (Appendix § 13 ) fixes the step rule and the operation set that every lower bound below quantifies over.
Definition 1 (Value provenance). A LAM execution satisfies value provenance (VPA) if every semantic block originates from an input, a declared constant, or a charged model or tool call. Copying, movement, and storage preserve this origin, while recomputation creates a new occurrence of the same computational value. The controller cannot create semantic blocks otherwise.
Communication: Moving State Across Bounded Context
Communication cost.
For model-facing traffic, let T i n T_{\mathrm{in}} T in be the total number of symbols supplied to model calls over an execution and T o u t T_{\mathrm{out}} T out the number produced by them; for context–memory traffic, let Q b l k Q_{\mathrm{blk}} Q blk be the number of semantic blocks transferred between X X X and M M M , that is Θ ( Q b l k b ( n ) ) \Theta(Q_{\mathrm{blk}}b(n)) Θ ( Q blk b ( n )) symbols.
Computation graph.
We represent dependencies among semantic blocks by a DAG G = ( V , E ) G = (V,E) G = ( V , E ) with one block per vertex. A source (no incoming edge) is an input block; an internal vertex is produced by a model call from the blocks of its predecessors, an edge u → v u \to v u → v meaning that u u u ’s block is required to compute v v v ’s. G G G is L L L -realisable if every internal vertex can be computed by the same interface L L L from its predecessor blocks.
Red–blue pebbling.
The red–blue pebble game [18 ] represents block movement between X X X and M M M (Figure 1 d): a red pebble on v v v means its block is in X X X , a blue pebble that a copy is in M M M , and a vertex may carry both. A load adds a red pebble to a blue-pebbled vertex, a store adds a blue pebble to a red-pebbled vertex, a compute places a red pebble on an internal vertex whose predecessors are all red, and either pebble may be deleted. Red pebbles are bounded by C C C , blue pebbles by S S S , and each load or store adds one to Q b l k Q_{\mathrm{blk}} Q blk . A pebbling starts with a blue pebble on every source and no red pebble, and ends with every designated sink (output vertex) red or blue; IO C , S ( G ) \operatorname{IO}_{C,S}(G) IO C , S ( G ) is the least number of loads and stores of such a pebbling (IO C ( G ) \operatorname{IO}_{C}(G) IO C ( G ) when S S S is not binding). The analogy is not yet an equivalence: a LAM execution may copy and recompute semantic values, so physical block occurrences do not correspond one-to-one with DAG vertices. Value provenance lets us quotient these occurrences by computational origin while preserving both model-call and transfer budgets.
Definition 2 (Vertex-granular G G G -evaluation). A vertex-granular evaluation of an L L L -realisable DAG G G G is a VPA-respecting LAM execution that produces the designated sinks of G G G , where each charged semantic call implements at most one declared vertex operation of G G G . The execution may copy, move, store, retrieve, evict, and recompute values arbitrarily. Under the memory-initialized convention, all source blocks are initially stored in M M M , the context is initially empty, and every designated sink is resident in X X X or M M M at termination. Under the input-delivered convention, each source is instead delivered exactly once by Input.
Theorem 1 (Red–blue pebbling correspondence). Let G G G be an L L L -realisable computation DAG with designated sinks. Every memory-initialized vertex-granular G G G -evaluation with capacities ( C , S ) (C,S) ( C , S ) induces a legal red–blue pebbling with at most C C C red and S S S blue pebbles, exactly one Compute move per model call, and at most one Load/Store move per context–memory transfer. Conversely, every such pebbling induces a
vertex-granular evaluation on a RAM–LAM with no larger call or transfer budget. Hence the two models have the same feasible call–transfer budget pairs and the same discrete Pareto frontier.
The theorem identifies the full resource region, not merely an individual classical I/O lower bound. Every red–blue pebbling lower bound therefore becomes a harness-communication lower bound; weighted cost objectives follow immediately (Corollary 9). For example, the classical n × n n \times n n × n grid bound yields Q b l k = Θ ( n 2 / C ) Q_{\mathrm{blk}} = \Theta(n^2/C) Q blk = Θ ( n 2 / C ) for 3 ≤ C ≤ n 3 \le C \le n 3 ≤ C ≤ n when persistent storage is nonbinding (Corollary 11).
Access: Retrieving Information from External State
Memory-access interfaces.
A random-access interface reads a block directly from a specified address; a sequential interface stores blocks in an ordered stream accessed through a movable head. Let Q m o v e Q_{\mathrm{move}} Q move be the number of unit head movements and Q m e m ≔ Q b l k + Q m o v e Q_{\mathrm{mem}} \coloneqq Q_{\mathrm{blk}} + Q_{\mathrm{move}} Q mem : = Q blk + Q move the equal-weight memory-interface operation count (written Q Q Q in the appendices); for random access Q m o v e = 0 Q_{\mathrm{move}} = 0 Q move = 0 (separate deployment weights in Appendix § 17 ).
Pointer chasing.
A memory table has n n n entries, entry i i i storing an index π ( i ) ∈ [ n ] \pi(i) \in[n] π ( i ) ∈ [ n ] for a permutation π \pi π of [ n ] [n] [ n ] . Starting from a 0 a_0 a 0 , the agent reads entry a j a_j a j to obtain a j + 1 = π ( a j ) a_{j+1} = \pi(a_j) a j + 1 = π ( a j ) for k k k steps and outputs a k a_k a k . One semantic block holds one index in [ n ] [n] [ n ] , so b ( n ) = ⌈ log ∣ Σ ∣ n ⌉ b(n) = \lceil\log|\Sigma|^n \rceil b ( n ) = ⌈ log ∣Σ ∣ n ⌉ , and a 0 = 1 a_0 = 1 a 0 = 1 is fixed. For the sequential interface the table is read-only, entry i i i occupies cell i i i and the head starts at cell 1; we consider non-speculative executions: every Read is of cell a 0 a_0 a 0 or of a cell whose index is the content of a block previously read into X X X .
Theorem 2 (Demand-following pointer chasing). For the pointer-chasing task above, let π \pi π be uniformly random over permutations of [ n ] [n] [ n ] , and let 2 ≤ k ≤ n / 4 2 \le k \le n/4 2 ≤ k ≤ n /4 . A random-access LAM follows the k k k pointers with Q b l k = k Q_{\mathrm{blk}} = k Q blk = k and Q m o v e = 0 Q_{\mathrm{move}} = 0 Q move = 0 : at C = 1 C = 1 C = 1 with no model call when SetAddr decodes each entry, at C = 2 C = 2 C = 2 with k k k calls when an oracle call decodes each entry instead. Every always-correct, non-speculative sequential LAM, deterministic or zero-error randomised, satisfies E [ Q m o v e ] ≥ 3 256 k n \mathbb{E}[Q_{\mathrm{move}}] \ge\frac{3}{256}kn E [ Q move ] ≥ 256 3 k n over π \pi π and its random tape, hence E [ Q m e m ] = Ω ( k n ) \mathbb{E}[Q_{\mathrm{mem}}] = \Omega(kn) E [ Q mem ] = Ω ( k n ) .
Proof idea. Non-speculation forces first reads to follow the pointer orbit, whose next address is uniform over the unvisited cells, so each of the k ≤ n / 4 k \le n/4 k ≤ n /4 hops moves the head Ω ( n ) \Omega(n) Ω ( n ) in expectation (Appendix § 15 .§ 1 ). Beyond this class, Proposition 14 gives Ω ( n ) \Omega(n) Ω ( n ) for every always-correct read-only sequential execution, and Remark 3 a speculative bounded-workspace machine with O ( min { k n , ( n 2 / C ) log C } ) O(\min\{kn,(n^2/C)\log C\}) O ( min { k n , ( n 2 / C ) log C }) expected head movements for C ≥ 12 C \ge12 C ≥ 12 .
Exact one-stack frontier (Corollary 19).
In FIFOn _n n , blocks arrive in order during a write phase and must be emitted in order after all arrivals. Consider a one-stack LAM with no model or tool call, tag-only verifiers, arbitrary finite control and ∣ S ∣ ≥ n + ∣ K 0 ∣ |\mathcal{S}| \ge n + |K_0| ∣ S ∣ ≥ n + ∣ K 0 ∣ for its constant set K 0 K_0 K 0 (Theorem 17 ). Its exact worst-case frontier is feasible ⇔ C ≥ ⌈ ( n + 1 ) / 2 ⌉ \Leftrightarrow C \ge\lceil(n+1)/2\rceil ⇔ C ≥ ⌈( n + 1 ) /2 ⌉ and S ≥ ( n − C ) + S \ge(n-C)_+ S ≥ ( n − C ) + , Q b l k ⋆ = 2 ( n − C ) + Q_{\mathrm{blk}}^\star= 2(n-C)_+ Q blk ⋆ = 2 ( n − C ) + , with lower bounds valid under arbitrary write-phase buffering, whereas copy-free streaming requires C ≥ n C \ge n C ≥ n (Theorem 17 (iii)). A content-blind schedule attains the frontier (Corollary 19, Appendix § 15 .§ 3 ), and random access works at C = 1 C = 1 C = 1 , S ≥ n S \ge n S ≥ n . Proof idea. At the last push of the bottom block every block of smaller index is resident, at its first pop every block of larger index, and the bottom block at both instants, so n + 1 ≤ 2 C n+1 \le2C n + 1 ≤ 2 C ; a single-copy normal form makes the count independent of buffering (Lemma 18, Appendix § 15 .§ 3 ).
Recomputation: Persistence versus Regeneration
Persistence and recomputation.
In the bit-reversal DAG many intermediate results are reused after leaving active context. Let n = 2 m n = 2^m n = 2 m and let rev ( i ) \operatorname{rev}(i) rev ( i ) reverse the m m m -bit binary string of i ∈ { 0 , … , n − 1 } i \in\{0,\ldots,n-1\} i ∈ { 0 , … , n − 1 } . The DAG Δ n r e v \Delta_n^{\mathrm{rev}} Δ n rev consists of two length-n n n chains u 0 , … , u n − 1 u_0,\ldots,u_{n-1} u 0 , … , u n − 1 and v 0 , … , v n − 1 v_0,\ldots,v_{n-1} v 0 , … , v n − 1 with edges u i → w r e v ( i ) u_i \to w_{\mathrm{rev}(i)} u i → w rev ( i ) , so the first chain’s results are reused by the second in a different order.
Theorem 3 (Persistence versus recomputation). Let Δ n r e v \Delta_n^{\mathrm{rev}} Δ n rev be L L L -realisable and n n n a power of two. Over input-delivered vertex-granular evaluations of Δ n r e v \Delta_n^{\mathrm{rev}} Δ n rev (Definition 2) with context C ≥ 3 C \ge3 C ≥ 3 , random-access persistent memory of capacity S ≥ 0 S \ge0 S ≥ 0 and C + S ≥ 4 C + S \ge4 C + S ≥ 4 , the least number of model calls is N = Θ ( n 2 / ( C + S ) + n ) N = \Theta(n^2/(C+S) + n) N = Θ ( n 2 / ( C + S ) + n ) , explicitly 1 2 ( n 2 / ( C + S ) + n ) ≤ N ≤ 4 ( n 2 / ( C + S ) + n ) \frac{1}{2}(n^2/(C+S) + n) \le N \le4(n^2/(C+S) + n) 2 1 ( n 2 / ( C + S ) + n ) ≤ N ≤ 4 ( n 2 / ( C + S ) + n ) , the upper bound attained by a RAM–LAM with Q b l k ≤ 2 n Q_{\mathrm{blk}} \le2n Q blk ≤ 2 n ; the displayed lower bound also holds for every input-delivered vertex-granular G-evaluation with C ≥ 2 C \ge2 C ≥ 2 and S ≥ 0 S \ge0 S ≥ 0 . For n ≥ 4 n \ge4 n ≥ 4 , an input-delivered vertex-granular G-evaluation exists if and only if C ≥ 3 C \ge3 C ≥ 3 and C + S ≥ 4 C + S \ge4 C + S ≥ 4 . Thus S ≥ n S \ge n S ≥ n gives Θ ( n ) \Theta(n) Θ ( n ) calls with Q b l k = O ( n ) Q_{\mathrm{blk}} = O(n) Q blk = O ( n ) , under the memory-initialized convention as well, and S = 0 S = 0 S = 0 requires Θ ( n 2 / C + n ) \Theta(n^2/C + n) Θ ( n 2 / C + n ) .
Within the feasible region, N = Θ ( n ) N = \Theta(n) N = Θ ( n ) if and only if C + S = Ω ( n ) C + S = \Omega(n) C + S = Ω ( n ) : sublinear total semantic capacity forces superlinear calls however it is split between context and persistence, the split setting the transfer cost (Appendix § 15 ; Appendix § 19 .§ 3 ). Proof idea. For C + S ≤ n / 2 C + S \le n/2 C + S ≤ n /2 , the u u u -arguments of L = Θ ( C + S ) L = \Theta(C + S) L = Θ ( C + S ) consecutive outputs lie n / L n/L n / L apart and at most C + S C + S C + S of the gaps hold a pebble, so each window forces n / 4 n/4 n /4 fresh first-row placements (Lemma 20); n / L n/L n / L disjoint windows give the n 2 / ( C + S ) n^2/(C + S) n 2 / ( C + S ) term, and evenly spaced checkpoints attain it.
Reliability: Verification and Checkpointing
Consider a chain of n n n semantic transitions in which, given a correct state, a model call returns the intended successor with probability 1 − ε 1-\varepsilon 1 − ε ; an undetected error propagates to the end; we ask how sampling and verification change the cost of an overall failure probability at most δ \delta δ .
Sampling without correctness feedback.
For independent repeated calls at a fixed state, let γ > 0 \gamma>0 γ > 0 denote the probability gap between the correct successor and the most likely incorrect alternative. We call a strategy stage-local sampling-only if it may draw an adaptive number of samples at each step and aggregate them arbitrarily, but receives no correctness signal and cannot revise a committed transition after moving to the next step. Plurality implements self-consistency [26 ] : under independent samples, if at most A A A incorrect alternatives have nonzero probability at each correct state, each with probability at most p c − γ p_c-\gamma p c − γ , a plurality vote over m = O ( γ − 2 log ( A n / δ ) ) m=O(\gamma^{-2}\log(An/\delta)) m = O ( γ − 2 log ( A n / δ )) samples per transition reaches overall failure probability at most δ \delta δ with N = O ( n γ − 2 log ( A n / δ ) ) N=O(n\gamma^{-2}\log(An/\delta)) N = O ( n γ − 2 log ( A n / δ )) model calls (Theorem 21, Appendix § 16 ); on the binary hard family (A = 1 A=1 A = 1 ) this order is optimal, so the upper and lower orders match for bounded A A A .
Theorem 4 (Stage-local sampling lower bound). There exists a depth-n n n binary-tree family of γ \gamma γ -separated transition distributions, γ ≤ 1 / 2 \gamma\leq1/2 γ ≤ 1/2 , its nodes encoded as blocks of width b ( n ) = Θ ( n ) b(n)=\Theta(n) b ( n ) = Θ ( n ) , with hidden labels drawn at random, such that every stage-local sampling-only strategy that knows the construction but not the labels, samples only at its current node, and reaches the designated leaf with probability at least 1 − δ 1-\delta 1 − δ , δ ≤ 1 / 4 \delta\leq1/4 δ ≤ 1/4 , over labels, samples and its own randomness, satisfies E [ N ] ≥ n 4 γ 2 log n δ \mathbb{E}[N]\geq\frac{n}{4\gamma^2}\log\frac{n}{\delta} E [ N ] ≥ 4 γ 2 n log δ n , which is Ω ( n γ − 2 log ( n / δ ) ) \Omega(n\gamma^{-2}\log(n/\delta)) Ω ( n γ − 2 log ( n / δ )) for n ≥ 64 δ n\geq64\delta n ≥ 64 δ .
Off-path states have the same local sampling law as correct-path states, so an error never reveals itself through later outputs (proofs in Appendix § 16 ).
Local verification.
With verification the agent receives a correctness signal before committing to the next state. Let a verifier call have weighted cost c v c_v c v relative to one model call, so that Cost = N m o d e l + c v N v e r \operatorname{Cost}=N_{\mathrm{model}}+c_vN_{\mathrm{ver}} Cost = N model + c v N ver . With a perfect local verifier, fresh independent attempts of error probability ε < 1 \varepsilon<1 ε < 1 , and uncapped retries, retry-until-accept terminates almost surely with zero error and expected weighted cost E [ Cost ] = n ( 1 + c v ) / ( 1 − ε ) \mathbb{E}[\operatorname{Cost}]=n(1+c_v)/(1-\varepsilon) E [ Cost ] = n ( 1 + c v ) / ( 1 − ε ) (Appendix § 16 , Theorem 22). On the hard family of Theorem 4 this removes the Θ ( log ( n / δ ) ) \Theta(\log(n/\delta)) Θ ( log ( n / δ )) factor for constant γ \gamma γ and c v c_v c v : the gain comes from feedback, not from more sampling. For an implemented checking procedure with joint acceptance masses a t = Pr ( c o r r e c t , A t ) a_t=\Pr(\mathrm{correct},A_t) a t = Pr ( correct , A t ) and b t = Pr ( w r o n g , A t ) b_t=\Pr(\mathrm{wrong},A_t) b t = Pr ( wrong , A t ) , i.i.d. attempts give accepted-error probability q t = b t / ( a t + b t ) q_t=b_t/(a_t+b_t) q t = b t / ( a t + b t ) and mean attempt count 1 / ( a t + b t ) 1/(a_t+b_t) 1/ ( a t + b t ) , dependent checks within an attempt included; Theorem 5 below is the content-independent, conditionally independent case, generalised in Corollary 23–Corollary 24 (Appendix § 16 ).
Theorem 5 (Imperfect local verification). Let p a p_a p a be the probability that the verifier accepts a wrong candidate and p r < 1 p_r<1 p r < 1 the probability that it rejects a right one, the same whatever the candidate’s content, and let 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 . Suppose candidate attempts are independent, the t ≥ 1 t\geq1 t ≥ 1 checks of a candidate are conditionally independent given its correctness, every attempt pays for all checks, and a candidate is accepted only if all t t t accept. Define a t = ( 1 − ε ) ( 1 − p r ) t a_t=(1-\varepsilon)(1-p_r)^t a t = ( 1 − ε ) ( 1 − p r ) t , b t = ε p a t b_t=\varepsilon p_a^t b t = ε p a t , and s t = a t + b t s_t=a_t+b_t s t = a t + b t . Then, at any transition whose earlier accepted transitions are all correct, the accepted candidate is incorrect with probability q t = b t / s t q_t=b_t/s_t q t = b t / s t and the expected numbers of attempts, model calls and verifier calls are 1 / s t 1/s_t 1/ s t , s t s_t s t and t / s t t/s_t t / s t ; hence Pr [ chain failure ] ≤ n q t \Pr[\text{chain failure}]\leq nq_t Pr [ chain failure ] ≤ n q t . If the attempt law is the same at every visited state, the chain fails with probability exactly 1 − ( 1 − q t ) n 1-(1-q_t)^n 1 − ( 1 − q t ) n , and summing over the n n n transitions gives the unconditional totals E [ N m o d e l ] = n / s t \mathbb{E}[N_{\mathrm{model}}]=n/s_t E [ N model ] = n / s t , E [ N v e r ] = n t / s t \mathbb{E}[N_{\mathrm{ver}}]=nt/s_t E [ N ver ] = n t / s t and E [ Cost ] = n ( 1 + t c v ) / s t \mathbb{E}[\operatorname{Cost}]=n(1+tc_v)/s_t E [ Cost ] = n ( 1 + t c v ) / s t .
The accepted-error odds strictly decrease with t t t if and only if $0<p_a<1-p_r$, since q t / ( 1 − q t ) = ε 1 − ε ( p a 1 − p r ) t q_t/(1-q_t)=\frac{\varepsilon}{1-\varepsilon}\left(\frac{p_a}{1-p_r}\right)^t q t / ( 1 − q t ) = 1 − ε ε ( 1 − p r p a ) t ; at p a = 0 p_a=0 p a = 0 one check makes them zero. Under the stationary attempt law at fixed ( ε , p a , p r ) (\varepsilon,p_a,p_r) ( ε , p a , p r ) with 0 < p a < 1 − p r < 1 0<p_a<1-p_r<1 0 < p a < 1 − p r < 1 and n ε > δ n\varepsilon>\delta n ε > δ , the smallest t t t with n q t ≤ δ nq_t\leq\delta n q t ≤ δ gives E [ N m o d e l ] = Θ ( n η − α ) \mathbb{E}[N_{\mathrm{model}}]=\Theta(n\eta^{-\alpha}) E [ N model ] = Θ ( n η − α ) , α = − log ( 1 − p r ) / log ( ( 1 − p r ) / p a ) \alpha=-\log(1-p_r)/\log((1-p_r)/p_a) α = − log ( 1 − p r ) / log (( 1 − p r ) / p a ) , with t = Θ ( log ( n / δ ) ) t=\Theta(\log(n/\delta)) t = Θ ( log ( n / δ )) (Corollary 25; varying-$\varepsilon bracket, capped-retry law and short-circuit costs in Appendix § 16 , Remark 8).
Checkpointing.
Alternatively, verify every k k k transitions and roll a rejected segment back to the last accepted checkpoint.
Theorem 6 (Checkpoint law). Assume independent transition errors with probability ε \varepsilon ε , a perfect segment verifier of cost c v c_v c v , and a policy that verifies every k k k transitions and rolls back the entire rejected segment. If k k k divides n n n , its expected weighted cost is T ( k ) = n k ( k + c v ) ( 1 − ε ) − k T(k)=\frac{n}{k}(k+c_v)(1-\varepsilon)^{-k} T ( k ) = k n ( k + c v ) ( 1 − ε ) − k . For 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 and c v > 0 c_v>0 c v > 0 , writing β = − log ( 1 − ε ) \beta=-\log(1-\varepsilon) β = − log ( 1 − ε ) , the positive-real minimizer is k ⋆ = 1 2 ( c v 2 + 4 c v / β − c v ) k^\star=\frac{1}{2}\left(\sqrt{c_v^2+4c_v/\beta}-c_v\right) k ⋆ = 2 1 ( c v 2 + 4 c v / β − c v ) . When c v β → 0 c_v\beta\to0 c v β → 0 , k ⋆ ∼ c v / β ( 1 + O ( c v β ) ) k^\star\sim\sqrt{c_v/\beta}(1+O(\sqrt{c_v\beta})) k ⋆ ∼ c v / β ( 1 + O ( c v β )) , and k ⋆ ∼ c v / ε k^\star\sim\sqrt{c_v/\varepsilon} k ⋆ ∼ c v / ε if also ε → 0 \varepsilon\to0 ε → 0 .
The square-root scaling is the checkpointing law of J. W. Young [27 ] , [28 ] in the whole-segment form of silent-error checkpointing (Appendix § 16 ); an optimum of the integer extension of T ( k ) T(k) T ( k ) lies within one of k ⋆ k^\star k ⋆ , and a verifier cost linear in k k k returns the optimum to k = 1 k=1 k = 1 (Appendix § 16 ). For absorbing-error length-k k k rollback attempts costing k + c s k+c_s k + c s under a perfect segment verifier, conditional hazards in [ ε ‾ , ε ‾ ] [\underline{\varepsilon},\overline{\varepsilon}] [ ε , ε ] , ε ‾ < 1 \overline{\varepsilon}<1 ε < 1 , after every history and rollback bracket E [ T ( k ) ] , k ∣ n \mathbb{E}[T(k)],\, k\mid n E [ T ( k )] , k ∣ n , between T ( k ) T(k) T ( k ) at ε \varepsilon ε and at ε ‾ \overline{\varepsilon} ε , without independence within or between attempts (Proposition 28 , Appendix § 17 ).
A joint decision.
Local checks and rollback combine into a policy cheaper than either mechanism alone in an explicit regime; Proposition 26 (Appendix § 17 ) prices it exactly, T ( t , k ) = n k ( k g t + c s ) ( 1 − q t ) − k T(t,k)=\frac{n}{k}(kg_t+c_s)(1-q_t)^{-k} T ( t , k ) = k n ( k g t + c s ) ( 1 − q t ) − k , with g t = ( 1 + t c v ) / s t g_t=(1+tc_v)/s_t g t = ( 1 + t c v ) / s t the expected weighted cost per locally accepted step, q t = b t / s t q_t=b_t/s_t q t = b t / s t its residual error (Theorem 5 ) and c s c_s c s the perfect segment-verifier cost (transfer price in Corollary 27 ).
Experiments
Although our primary contribution is theoretical , we use experiments in two roles. All model-based experiments use the same fixed GPT-6 Astra deployment. Held-out tests compare development-derived quantitative predictions or policy choices with disjoint evaluation data, including communication, checkpointing, and reliability. Implementation checks verify that prescribed schedules realize their analytically determined resource accounting; these checks are reported separately and are not treated as empirical tests of lower bounds. Protocols and evaluation details appear in Appendix § 19 .
Communication. As Proposition 12 predicts, replay-to-dependency-only logical input grows linearly with depth: 7.1 × at n = 64 n = 64 n = 64 on the synthetic chain (1.72 × under the exact-prefix cache model) and 11 × (3.05 × cached) on development MATH (Appendix § 19 .§ 1 ).
Held-out MATH: traffic, success, and granularity
From the 207 eligible MATH-500 problems [33 ] , [34 ] we build 100 depth-16 answer-dependent chains following Compositional GSM [35 ] : chains 1–30 form the development set and 31–100 the held-out compositions. We evaluate GPT-6 Astra under four harness configurations: Direct, using one whole-chain call; full-history replay; dependency-only prompting; and dependency-only prompting with an ACCEPT/REJECT verifier. The routing protocol, traffic intervals, and success forecasts are determined from the development chains and held fixed on the held-out compositions.
On the held-out compositions, dependency-only prompting with verification solves 70/70 chains with every link correct, whereas Direct solves 65/70 final answers and has 64/70 chains with every link correct. Replay solves 67/70 final answers and has 65/70 chains with every link correct (Figure 2 (a)). Replay uses 35,124 input tokens per chain, versus 3,217 for dependency-only prompting with verification, a 10.9 × reduction, while Direct uses only 1,311 input tokens in a single whole-chain call. Thus dependency-aware routing sharply reduces logical input traffic within stepwise execution, while Direct exposes a complementary granularity tradeoff: one model call can realize many logical steps with still lower input traffic, but here with lower observed held-out reliability. The vertex-granular theory therefore characterizes the resource frontier of stepwise execution rather than unrestricted whole-task calls.
Figure 2. GPT-6 Astra evaluation: prospective predictions, held-out outcomes, and implementation checks. All model calls in panels (a)–(d) use the same fixed GPT-6 Astra deployment; panel (c) uses a programmatic perfect segment verifier at stipulated prices. Where predictions are shown, hollow markers and dashed lines denote development- or calibration-derived predictions, while filled markers and solid lines denote measurements with 95% intervals. (a) Held-out MATH final-answer and all-link success on 70 chains per condition. (b) Held-out checkpoint-policy tournament on 100 fresh chains per arm at measured verifier price c v = 0.874 c_v = 0.874 c v = 0.874 ; the horizontal dashed line is the target success probability 0.90. (c) Checkpoint cost T ( k ) T(k) T ( k ) under stipulated perfect-verifier prices 1, 4, 16; forecast and measured minimisers coincide at each price. (d) Bit-reversal implementation check under enforced payload limits; marker shape denotes schedule type, color denotes problem size n n n , and hollow/filled markers denote forecast/measured cost.
Execution granularity is itself a resource choice.
The Direct condition highlights a distinction that is not visible in a vertex-granular cost model. A sufficiently capable model may compress many logical dependencies into one semantic call, simultaneously reducing both call count and input traffic. This does not contradict the vertex-granular frontier: it changes the computational primitive being priced. Conversely, the stepwise conditions expose intermediate state to memory management and verification, yielding higher all-link reliability in the held-out GPT-6 Astra evaluation. Thus the choice of semantic-call granularity determines which communication–reliability tradeoffs are available to the harness.
Reliability: checkpoint forecasts and held-out policy selection
An arm is a policy of § 7 on a length-16 modular-affine chain x ← ( a x + b ) m o d 10 16 x \leftarrow(a x + b) \bmod10^{16} x ← ( a x + b ) mod 1 0 16 with target failure probability δ = 0.10 \delta= 0.10 δ = 0.10 . Forecast quantities are fixed before evaluation and compared against held-out measurements and their 95% intervals. The deployment’s calibrated step error is ε ^ = 0.049 \hat{\varepsilon} = 0.049 ε ^ = 0.049 , and its YES/NO check costs c v = 0.874 c_v = 0.874 c v = 0.874 solver calls in tokens (Appendix § 19 .§ 2 ). On a separate transfer set, unamplified chain success is forecast at 0.448 and measured at 51/100, while the in-chain step hazard is forecast and measured at 0.0489.
As a controlled check of the checkpoint law, we use a programmatic perfect segment verifier at stipulated prices c v s e g ∈ { 1 , 4 , 16 } c_v^{\mathrm{seg}} \in\{1,4,16\} c v seg ∈ { 1 , 4 , 16 } . Checkpoint attempts per segment match the frozen predictions at k = 1 / 4 / 16 k = 1/4/16 k = 1/4/16 (1.051/1.222/2.230 forecast versus 1.049/1.208/2.083 measured), the k = 4 k = 4 k = 4 cost forecast 24.4 is measured at 24.2 [22.3, 26.3], and forecast and measured grid minimisers coincide at every price (k = 4 / 8 / 16 k = 4/8/16 k = 4/8/16 ; Figure 2 (c)). Wrong-sample rates vary sharply across chain states, so a pooled homogeneous i.i.d. error model does not describe the observed sampling data.
Held-out policy tournament.
Because selection from measured comparisons can be sensitive to perturbations of the comparison data [36 ] , a decision rule calibrated on disjoint data is held fixed on 100 shared held-out chains per arm. At the primary setting ( δ , c v ) = ( 0.10 , 0.874 ) (\delta, c_v) = (0.10, 0.874) ( δ , c v ) = ( 0.10 , 0.874 ) , the frozen decision rule selects rollback k = 4 k = 4 k = 4 . On the held-out chains, k = 4 k = 4 k = 4 is also the cheapest certified policy, with 1/100 failures and weighted cost 25.2 [24.1, 26.4], matching the frozen cost forecast of 25.2.
The tournament uses an implemented segment-check interface: public affine constants are composed into x ↦ ( A x + B ) m o d 10 16 x \mapsto(Ax + B) \bmod10^{16} x ↦ ( A x + B ) mod 1 0 16 outside the priced semantic execution. We therefore treat the result as a prospective test of checkpoint-policy selection conditional on that interface, rather than as an end-to-end test of the VPA restriction (Appendix § 19 .2.0.3).
Implementation check.
The prescribed bit-reversal schedules reproduce their analytically determined call, recomputation, and transfer counts exactly. Figure 2 (d) places these schedules at their prescribed call counts and compares frozen with measured list-price cost; we treat the count identities as implementation checks rather than empirical tests of the lower bounds (Appendix § 19 .§ 3 ).
Conclusion
LAM makes agent-harness architecture a mathematical object whose resource requirements can be bounded, compared, and optimized while semantic capability is held fixed. Across communication, memory access, recomputation, and reliability, the framework yields exact feasible regions, lower bounds, and closed-form resource tradeoffs. The experiments compare frozen predictions with measurements while also exposing the scope of the theory: dependency-aware routing sharply reduces logical input traffic within stepwise execution, whereas held-out chained MATH shows that a whole-task call can use still less input traffic at lower observed reliability, outside the vertex-granular frontier. Together, these results separate semantic capability from the resource cost of realizing that capability through an agent harness. LAM therefore provides a resource theory of agent execution: harness architecture determines which call, memory, communication, and reliability tradeoffs are achievable even when the underlying semantic model is held fixed.
AI Use Statement
The research questions, conceptual framework, theoretical formulation, experiments, and final conclusions in this work were developed and evaluated by the authors. The authors made all substantive research decisions, verified the retained mathematical claims and proofs, and take full responsibility for the final content of the paper.
AI assistance was used to aid or polish writing, for retrieval and discovery such as finding related work, and for proving mathematical claims, including proof search, proof checking, and searching for logical gaps, missing assumptions, or counterexamples. AI outputs were treated as suggestions rather than evidence of correctness and were independently reviewed by the authors.
Reproducibility statement
All theoretical results in the paper are stated with their assumptions and proved in the appendices. We release the simulation code, frontier-model harness, theorem-target problem set, figure-generation scripts, raw request logs, frozen experimental configurations, and result files used in the paper. The supplementary material also records the experimental protocols, prompts, model settings, datasets, seeds, and other parameters needed to reproduce the reported experiments.
Ethics Statement
This work develops a theoretical framework for analysing the resource requirements of language-model agents and their harnesses. It does not involve human-subject research or the collection of personally identifiable or sensitive data. The empirical components are limited to controlled simulations and model-based experiments on a synthetic task and on public benchmark problems, intended to test the accounting and the assumptions of the theoretical model rather than to evaluate or deploy an agent in a high-stakes setting.
The framework may inform the design of more efficient and reliable agentic systems. As with general improvements in language-model agents, such advances could have both beneficial and potentially harmful downstream applications. Our work does not introduce methods specifically intended to facilitate harmful behavior, bypass safety mechanisms, compromise privacy or security, or enable autonomous operation in high-stakes domains. Moreover, many of the results rely on explicitly stated abstractions and assumptions and should not be interpreted as guarantees about the safety or reliability of deployed agents.
References
Formal machine semantics
Relation to prior inference abstractions. Table 2 places several existing inference abstractions within the resource coordinates of LAM.
Table 2. Prior models of language-model computation as LAM parameter settings. T T T is the number of reasoning steps. Context C C C is measured in blocks; physical symbol/token width is w = C b w = Cb w = C b . The rows identify which harness resources are permitted to scale; computational power may also differ across settings, as illustrated by Proposition 7 and Proposition 8 .
Relation to prior inference abstractions.
Configurations and steps.
Configurations and steps. The following definition fixes the machine semantics used by the lower bounds and constructive schedules throughout the paper.
Definition 3 (LAM configuration and step). Fix n n n , the block space B = Σ b ( n ) \mathcal{B} = \Sigma^{b(n)} B = Σ b ( n ) , a finite tag alphabet Γ \Gamma Γ , a finite set K 0 ⊂ B K_0 \subset\mathcal{B} K 0 ⊂ B of constant blocks, and capacities C C C and S S S . A configuration consists of
a finite-control state q ∈ Q c t r l q \in Q_{\mathrm{ctrl}} q ∈ Q ctrl , Q c t r l Q_{\mathrm{ctrl}} Q ctrl finite;
the active context X X X : C C C slots, each empty or holding one block. Every place in which the harness keeps a block outside memory, including any named block register, is one of these slots;
the persistent memory M M M , an interface-specific store of at most S S S blocks (S S S may be unbounded): for RAM an array of cells M [ 1 ] , … , M [ S ] M[1], \ldots, M[S] M [ 1 ] , … , M [ S ] ; for STREAM a tape of cells with a head position; for STACK a sequence accessible at its top only;
two registers: a tag register holding the last tag γ ∈ Γ \gamma\in\Gamma γ ∈ Γ and, for RAM, an address register a ∈ [ S ] a \in[S] a ∈ [ S ] . A STREAM machine has no address register: its only address state is the head position a ∈ [ S ] a \in[S] a ∈ [ S ] , which the controller may consult but which changes only by Move(± 1 \pm1 ± 1 ); a STACK machine has neither;
public structural counters: finitely many integers whose values after t t t steps are fixed functions of t t t and n n n alone (a step counter and fixed functions of it); they can never depend on the input.
Initially the context is empty, the registers hold fixed values, and M M M holds the input for tasks whose input is held in memory. Every block carries an occurrence label : the input coordinate it copies, the constant it is, or the call occurrence that produced it; copies, reads and writes inherit the label. In a vertex-granular G G G -evaluation (Definition 2), each value-producing call is assigned a vertex of G G G ; its vertex label is that vertex, while recomputation creates a new occurrence with the same vertex label. “Provenance label” means the occurrence label unless a vertex is named. An input block is a block labelled by an input coordinate. The registers ( q , γ , a ) (q,\gamma,a) ( q , γ , a ) hold h : = log 2 ∣ Q c t r l ∣ + log 2 ∣ Γ ∣ + log 2 max { S , 1 } h := \log_2 |Q_{\mathrm{ctrl}}| + \log_2 |\Gamma| + \log_2 \max\{S,1\} h := log 2 ∣ Q ctrl ∣ + log 2 ∣Γ∣ + log 2 max { S , 1 } bits, the last term being the address or head state for RAM and STREAM (zero when S = 0 S = 0 S = 0 ) and omitted for STACK. Block contents are never visible to the controller except through the operations below that return a tag or set the address register. A step applies the controller transition function τ c t r l ( q , γ , a ) \tau_{\mathrm{ctrl}}(q,\gamma,a) τ ctrl ( q , γ , a ) , the counters and the occupancy pattern of X X X (which slots are full, not what they hold) to choose the next control state and one operation:
CALL ( L , opcode , slots ) (L,\operatorname{opcode},\operatorname{slots}) ( L , opcode , slots ) , and likewise a tool call: the blocks in the named occupied slots, at most C − 1 C - 1 C − 1 of them, are the arguments; the returned block is placed in a free slot (the insertion convention) and the returned tag in the tag register; the arguments are unchanged. A verifier call, CALL O V E R ( opcode , slots ) _{\mathrm{OVER}}(\operatorname{opcode},\operatorname{slots}) OVER ( opcode , slots ) , returns a tag only and inserts no block, so the C − 1 C - 1 C − 1 cap does not apply to it: its arguments may be all C C C resident blocks (Remark 9 uses two at C = 2 C = 2 C = 2 ). Interface clause: L L L , each tool and each verifier is a fixed map from (opcode, argument-block tuple) to a tag, or to a tag alone for a verifier; it has no access to the input, to M M M , to the registers or to any block not among its arguments, so equal opcodes and arguments always return equal results.
COPY (slot → \to → free slot), EVICT (slot), and CONST (k → k \to k → free slot) for k ∈ K 0 k \in K_0 k ∈ K 0 .
Memory operations. RAM: READ (a a a ) copies M [ a ] M[a] M [ a ] into a free slot and WRITE (a a a , slot) copies the slot into M [ a ] M[a] M [ a ] , the address being the address register or a fixed function of the public counters. STREAM: MOVE (± 1 \pm1 ± 1 ), counted by Q m o v e Q_{\mathrm{move}} Q move and the only operation that changes the head position, and READ/WRITE at the head. STACK: PUSH (slot) moves the block from the slot to the top of the stack and POP moves the top block into a free slot. Reads, writes, pushes and pops are counted by Q b l k Q_{\mathrm{blk}} Q blk ; a READ of a cell that holds no block delivers the blank constant ⊥ ∈ K 0 \bot\in K_0 ⊥ ∈ K 0 , with constant provenance.
SETADDR (slot) and SHIFT (± 1 \pm1 ± 1 ), for RAM only: the address register takes the value encoded by the block in the slot (this is how a decoded pointer becomes an address), or changes by ± 1 \pm1 ± 1 , clipped to [ 1 , S ] [1,S] [ 1 , S ] , reading no block. No interface turns
block content into a position for free: a STREAM head reaches a cell only through MOVES charged to Q m o v e Q_{\mathrm{move}} Q move , one per cell traversed, and a stack only through PUSH/POP charged to Q b l k Q_{\mathrm{blk}} Q blk ; Theorem 2 depends on this.
INPUT: the next input block is delivered into a free slot, for tasks whose input arrives as a stream; for the pebbling results the input is held in M M M instead.
EMIT(slot): the block in the slot is the next output block; a halting step may also emit a tag.
The observation counter Q o b s Q_{\mathrm{obs}} Q obs is charged one unit by every event that exposes an input block outside a model-call argument list: a SETADDR on an input block, each input block among the arguments of a tool or verifier call (per block, not per call), and each EMIT of an input block. Model-call arguments are not charged to Q o b s Q_{\mathrm{obs}} Q obs ; they are counted through N N N . A randomised LAM additionally gives τ c t r l \tau_{\mathrm{ctrl}} τ ctrl a random tape. Content-dependent state. Besides the registers, τ c t r l \tau_{\mathrm{ctrl}} τ ctrl reads the occupancy pattern and the counters, and both are functions of the controller’s past choices, hence content-dependent through the tags: the pattern carries up to C C C bits, and a step counter carries log 2 t \log_2 t log 2 t bits, which a machine can write by waiting, i.e. by performing a content-dependent number of steps that move no block. The controller-visible content-dependent state of a machine is therefore the registers, the pattern and the counters, h + C + O ( log t ) h+C+O(\log t) h + C + O ( log t ) bits in all; the context adds C b ( n ) log 2 ∣ Σ ∣ C\,b(n)\log_2|\Sigma| C b ( n ) log 2 ∣Σ∣ bits of block content, which a later call can re-expose through its tag, and a writable memory adds its contents and their arrangement. No lower bound of § 4 –§ 6 bounds this state (the simulation of Theorem 16 , Appendix § 15 .§ 2 , carries all of it; Theorem 2 and Theorem 17 are pointwise); Remark 3, the one place that does, counts every part. Value provenance is a consequence of the list: INPUT, CONST and the returning calls are the only operations that create a block, and every other operation copies or moves an existing one. Every lower bound of § 4 –§ 6 quantifies over all machines of this definition with the interface, capacities and call restrictions named in its statement, and every upper bound exhibits one such machine; the reliability results of § 7 are stated over the strategy classes defined there, whose stochastic oracle is an interface that also consumes fresh bits of the random tape at each call, the interface clause holding conditionally on those bits (Remark 9 runs the checkpoint policy as a machine of this definition). A machine of this definition is fixed for one n n n : the lower bounds are instancewise and therefore hold against non-uniform families, and every upper bound given as a schedule is a uniform family whose finite control, interfaces and K 0 K_0 K 0 do not depend on n n n , which enters only through the public counters, the one exception being the completeness direction of Theorem 1(ii), which builds one machine per pebbling; Proposition 7 concerns a single machine reading inputs of every length.
Proposition 7 (Finite-state baseline). Let Λ \Lambda Λ be a single deterministic LAM of Definition 3, its finite control, interfaces, tag alphabet and constants fixed independently of the input length, with S = 0 S=0 S = 0 (no persistent memory), fixed block width b b b , total active semantic capacity C C C blocks, and no public structural schedule counters, reading its input as a stream of blocks. Then the language decided by Λ \Lambda Λ is regular; conversely every regular language is decided by such a LAM with C = 2 C=2 C = 2 . The one-pass input stream is an external input interface: after the current symbol is consumed it is not persistent memory and cannot be revisited.
Proof. A configuration of Λ \Lambda Λ between input blocks is, by Definition 3, the tuple (control state, contents of the at-most-C C C active semantic slots, last tag, address register). There are at most ∣ Q c t r l ∣ ⋅ ( ∣ B ∣ + 1 ) C ⋅ ∣ Γ ∣ ⋅ ( S + 1 ) |Q_{\mathrm{ctrl}}|\cdot(|\mathcal{B}|+1)^C\cdot|\Gamma|\cdot(S+1) ∣ Q ctrl ∣ ⋅ ( ∣ B ∣ + 1 ) C ⋅ ∣Γ∣ ⋅ ( S + 1 ) such configurations, a finite number because b b b and hence B = Σ b \mathcal{B}=\Sigma^b B = Σ b are fixed in this proposition and S = 0 S=0 S = 0 . Named routing block registers do not contribute an additional factor: by definition they are names for slots inside the same C C C -block active semantic store. Public structural counters are excluded in this finite-state sanity check; they are used only in the explicit uniform schedule constructions stated elsewhere in the paper.
Because the oracle is a fixed map of its arguments (interface clause) and the controller’s transitions depend only on the configuration and the next input block, the map (configuration, input block) ↦ \mapsto ↦ configuration is a well-defined finite transition function, i.e. a DFA over the alphabet B \mathcal{B} B . Conversely, given a DFA D D D , encode the DFA state in the controller’s finite control, pass the current input block to an oracle implementing δ D \delta_D δ D , and return the next DFA state as a constant-size tag. The input and returned block co-reside, so C = 2 C=2 C = 2 under our convention. □ \square □
Proposition 8 (Resource-accounted universality). For every one-tape Turing machine T T T running in time t ( n ) t(n) t ( n ) and space s ( n ) s(n) s ( n ) there is a LAM deciding L ( T ) L(T) L ( T ) with ram ( O ( s ) ) \operatorname{ram}(O(s)) ram ( O ( s )) memory, C = O ( 1 ) C=O(1) C = O ( 1 ) blocks and a single deterministic oracle, with N = O ( t ) N=O(t) N = O ( t ) oracle calls, Q b l k = O ( t ) Q_{\mathrm{blk}}=O(t) Q blk = O ( t ) block movements, Q m o v e = 0 Q_{\mathrm{move}}=0 Q move = 0 , and T i n = O ( t ⋅ b ) T_{\mathrm{in}}=O(t\cdot b) T in = O ( t ⋅ b ) .
Proof. Take T T T with a one-way infinite tape, store it in ram from address 1, one symbol block per cell, keep the head position in the address register, and encode the finite TM state in controller control. Cells beyond the input are never initialised: a READ of an unwritten cell delivers the blank constant (Definition 3), which stands for T T T ’s blank symbol, and the head never moves left of address 1, so the clipping of SHIFT is never exercised. The oracle receives the current tape symbol with an opcode for state q q q , returns the new symbol block ⟨ σ ′ ⟩ \langle\sigma'\rangle ⟨ σ ′ ⟩ , and emits a tag γ = ⟨ q ′ , L / R / h a l t ⟩ \gamma=\langle q',L/R/\mathop{\rm halt}\rangle γ = ⟨ q ′ , L / R / halt ⟩ . One step is: Read at the head address (one block movement), one oracle call, write the returned symbol block (one block movement), update finite control to q ′ q' q ′ , and SHIFT(± 1 \pm1 ± 1 ) the address as selected by γ \gamma γ . At most the input symbol and returned symbol co-reside, so C = 2 C=2 C = 2 suffices. SHIFT is a convenience, not a necessity: without it the controller keeps the head position as a block in a third slot, obtains its successor or predecessor by a second oracle call and applies SetAddr to the result, still O ( 1 ) O(1) O ( 1 ) calls and movements per step, at C = 3 C = 3 C = 3 . Everything the controller does is copying, addressing and finite branching, so VPA holds. Summing over t t t steps gives the claim. Universality per se is not new [8 ] ; the content here is that it costs Θ ( 1 ) \Theta(1) Θ ( 1 ) calls and Θ ( 1 ) \Theta(1) Θ ( 1 ) block movements per simulated step at constant context. □
Context–memory communication
Proof of Theorem 1
We use the red–blue convention of § 4 . Red pebbles model the active semantic store of capacity C C C , and blue pebbles slow memory of capacity S S S (S ≥ n 2 S \ge n^2 S ≥ n 2 suffices for the grid of Corollary 11, whose lower bounds hold for every smaller S S S as well). Initially every source, constants included, carries a blue pebble and nothing carries a red one. The legal moves are Compute (place a red pebble on a node all of whose predecessors carry red pebbles), Load (place a red pebble on a node carrying a blue pebble), Store (place a blue pebble on a node carrying a red pebble), and Delete (remove either pebble). At most C C C red pebbles exist at any time, so a Compute output is inserted while its predecessors remain red; recomputation is allowed. The I/O cost is the number of Load and Store moves and I O C , S ( G ) \mathrm{IO}_{C,S}(G) IO C , S ( G ) is its minimum over pebblings that end with every designated sink red or blue (I O C \mathrm{IO}_C IO C when S S S is not binding); a terminal red pebble on a sink is not charged a store. Other pebbling conventions require a corresponding change to the machine semantics and are not claimed here.
Fix a memory-initialized vertex-granular G G G -evaluation. Its routing, copying, memory management, and recomputation are unrestricted; the only semantic restriction is that each value-producing call realizes one declared vertex operation. The proof quotients physical block occurrences by their vertex provenance. No Const and no Input: every block in X X X was read from M M M or returned by a call, and every block in M M M was there initially or was written from X X X . Provenance identity: blocks with different vertex labels are different pebbles even when their contents agree, recomputations of the same vertex share one pebble label, and a source-valued block may not stand in for an internal vertex. Terminal delivery: the run ends with a block standing for each designated sink in X X X or in M M M , and Emit is not used inside the run. If auxiliary semantic calls are present, include them as explicit vertices of an augmented provenance DAG G + G^{+} G + and apply the same argument to G + G^{+} G + .
Proof of (i), soundness. Fix a halting vertex-granular G G G -evaluation R R R . By VPA, every semantic block is an input, a constant, or an L n L_n L n -call output corresponding to a vertex of G G G ; its vertex label (Definition 3) is that vertex. The map from occurrence labels to vertex labels is the quotient this proof works with: recomputed blocks are distinct occurrences with the same vertex label, and copying preserves both. Define, using vertex labels, for each time t t t ,
Red ( t ) = { v : a block labelled v occupies any active semantic slot at t } , \operatorname{Red}(t)=\{v : \text{a block labelled }v\text{ occupies any active semantic slot at }t\}, Red ( t ) = { v : a block labelled v occupies any active semantic slot at t } ,
Blue ( t ) = { v : a block labelled v occupies a persistent-memory position at t } . \operatorname{Blue}(t)=\{v : \text{a block labelled }v\text{ occupies a persistent-memory position at }t\}. Blue ( t ) = { v : a block labelled v occupies a persistent-memory position at t } .
The active semantic slots include named controller block-register slots, so ∣ Red ( t ) ∣ ≤ C |\operatorname{Red}(t)| \le C ∣ Red ( t ) ∣ ≤ C and there is no additional uncharged semantic fast storage. Now map events: (i) an L n L_n L n call producing v v v has the blocks labelled by preds ( v ) \operatorname{preds}(v) preds ( v ) as its arguments, so preds ( v ) ⊆ Red \operatorname{preds}(v) \subseteq\operatorname{Red} preds ( v ) ⊆ Red at that instant. The returned block is appended before eviction and the call is a legal Compute of v v v ; C ≥ d + 1 C \ge d + 1 C ≥ d + 1 allows the d d d predecessors and result to co-reside; (ii) a Read(a a a ) moving a block labelled v v v from RAM into an active semantic slot is a Load (legal: v ∈ Blue v \in\operatorname{Blue} v ∈ Blue , as the cell was written earlier or holds an input); (iii) a Write(a , ⋅ a,\cdot a , ⋅ ) of a resident block labelled v v v is a Store; (iv) an eviction of the last resident copy of a block labelled v v v , or the overwriting of its last stored copy, is a Delete of the corresponding pebble, and any other eviction or overwrite changes no pebble. A Load of a vertex already red and a Store of a vertex already blue are legal moves and are still counted. Block movements in (ii)–(iii) are precisely the events counted by Q b l k Q_{\mathrm{blk}} Q blk ; copying or renaming among active semantic slots does not create extra pebbles, and because the run uses no Const or Input, (i)–(ii) are the only ways a pebble appears. The mapping is stated for RAM; for Stream, persistent positions are tape cells, Move changes no pebble, and Read/Write at the head map to Load/Store as in (ii)–(iii). For Stack, Push moves rather than copies: it is a Store followed by a Delete of the red pebble when the moved block was the last active copy of its vertex, and Pop is a Load followed by a Delete of the blue pebble when it was the last stored copy; when a write overwrites the last stored copy of another vertex, that blue pebble is deleted before the store. Each ordering respects both capacities and charges one I/O move per transfer, which is the sense in which (i) holds for every interface. The result is a legal pebbling from the initial all-blue-sources position with red bound C C C , exactly N N N Compute moves and at most Q b l k Q_{\mathrm{blk}} Q blk I/O moves. By terminal delivery each designated sink is resident or stored at the end, so it ends red or blue. □
Proof of (ii), completeness. Let Π = ( μ 1 , … , μ L ) \Pi=(\mu_1,\ldots,\mu_L) Π = ( μ 1 , … , μ L ) be a legal pebbling of the fixed L L L -realisable functional DAG G G G with red bound C C C , P P P Compute and I I I I/O moves. Assign each blue-pebble lifetime interval of Π \Pi Π (a node v v v from a Store, or from time zero for a source, until that blue pebble is deleted) a RAM address a v a_v a v by a fixed static allocation: Π \Pi Π is fixed and carries at most S S S blue pebbles at any time, so greedy colouring of these intervals in order of their left endpoints uses at most S S S distinct addresses; a deleted blue pebble’s block stays in its cell, ignored, until the address is reused, and since at most S S S addresses are ever used, M M M never holds more than S S S blocks (one address per node suffices when S ≥ ∣ V ∣ S \ge|V| S ≥ ∣ V ∣ ). Build a controller whose control states are q 0 , … , q L q_0,\ldots,q_L q 0 , … , q L , one per move — a finite set, since G G G and Π \Pi Π are fixed — with q ℓ − 1 → q ℓ q_{\ell-1} \to q_\ell q ℓ − 1 → q ℓ executing μ ℓ \mu_\ell μ ℓ : Compute(v v v ) ↦ \mapsto ↦ the fixed oracle call realising ϕ v \phi_v ϕ v on the resident predecessor blocks with its allowed opcode; Load(v v v ) ↦ \mapsto ↦ Read(a v a_v a v ); Store(v v v ) ↦ \mapsto ↦ Write(a v , ⋅ a_v,\cdot a v , ⋅ ); Delete(v v v ) ↦ \mapsto ↦ evict. Before this, drop from Π \Pi Π every Load or Compute of a vertex already red: under set semantics such a move changes no pebble, so legality is preserved and neither P P P nor I I I increases, and every remaining Load or Compute finds a free slot, since a legal placement on a vertex not yet red requires fewer than C C C red pebbles at that instant. Legality of Π \Pi Π then guarantees each precondition holds and that at most C C C blocks are ever resident. The controller selects blocks by fixed semantic slots and fixed addresses, so it is value-oblivious and satisfies vpa. The insertion convention matches Compute, including recomputation. The run is a memory-initialized vertex-granular G G G -evaluation: the sources sit at their addresses from the start, the context starts empty, no Const or Input is used, and since Π \Pi Π ends with every sink red or blue the run ends with a block for each sink resident or stored. It has N ≤ P N \le P N ≤ P and Q b l k ≤ I Q_{\mathrm{blk}} \le I Q blk ≤ I . The constructed machine is a ram machine, which is why the minimum is attained by one; combining with (i), which maps any interface’s memory operations to loads and stores, gives min Q b l k = I O C , S ( G ) \min Q_{\mathrm{blk}} = \mathrm{IO}_{C,S}(G) min Q blk = IO C , S ( G ) over memory-initialized vertex-granular G G G -evaluations of this fixed realisation. □
Corollary 9 (Priced call–traffic optimum). For every λ N , λ Q ≥ 0 \lambda_N,\lambda_Q \ge0 λ N , λ Q ≥ 0 , min R { λ N N R + λ Q Q b l k , R } = min Π { λ N P Π + λ Q I Π } \min_R\{\lambda_N N_R+\lambda_Q Q_{\mathrm{blk},R}\}=\min_\Pi\{\lambda_N P_\Pi+\lambda_Q I_\Pi\} min R { λ N N R + λ Q Q blk , R } = min Π { λ N P Π + λ Q I Π } , where R R R ranges over memory-initialized vertex-granular G G G -evaluations of G G G with capacities ( C , S ) (C,S) ( C , S ) and Π \Pi Π over legal red–blue pebblings of G G G with at most C C C red and S S S blue pebbles, P Π P_\Pi P Π being the number of Compute moves and I Π I_\Pi I Π the number of Load and Store moves; a ram memory-initialized vertex-granular G G G -evaluation attains the optimum, and one side is feasible if and only if the other is (an infeasible minimum being + ∞ +\infty + ∞ ).
Proof. For any memory-initialized vertex-granular G G G -evaluation R R R , the proof of (i) produces a legal pebbling with exactly P Π = N R P_\Pi=N_R P Π = N R Compute moves and I Π ≤ Q b l k , R I_\Pi\le Q_{\mathrm{blk},R} I Π ≤ Q blk , R I/O moves, so the minimum pebbling objective is at most the minimum machine objective. Conversely, the proof of (ii) turns any legal Π \Pi Π into a ram memory-initialized vertex-granular G G G -evaluation (one machine per pebbling, non-uniform as in the theorem) with N R ≤ P Π N_R \le P_\Pi N R ≤ P Π and Q b l k , R ≤ I Π Q_{\mathrm{blk},R} \le I_\Pi Q blk , R ≤ I Π , so the minimum machine objective is at most the minimum pebbling objective. Nonnegative weights preserve both inequalities, giving equality, attained by the constructed ram machine; feasibility is equivalent by the same two directions. □
Corollary 10 (Simultaneous call and transfer budgets). Under the hypotheses of Theorem 1, for every B N , B Q ≥ 0 B_N,B_Q \ge0 B N , B Q ≥ 0 a memory-initialized vertex-granular G G G -evaluation of G G G with capacities ( C , S ) (C,S) ( C , S ) , N ≤ B N N \le B_N N ≤ B N and Q b l k ≤ B Q Q_{\mathrm{blk}} \le B_Q Q blk ≤ B Q exists if and only if a legal red–blue pebbling with at most C C C red and S S S blue pebbles, P Π ≤ B N P_\Pi\le B_N P Π ≤ B N Compute moves and I Π ≤ B Q I_\Pi\le B_Q I Π ≤ B Q I/O moves exists; a ram evaluation suffices whenever either side is feasible. Hence the sets of feasible budget pairs, and therefore their nondominated (Pareto-minimal) integer resource vectors ( N , Q b l k ) (N,Q_{\mathrm{blk}}) ( N , Q blk ) and ( P Π , I Π ) (P_\Pi,I_\Pi) ( P Π , I Π ) , coincide.
Proof. The proof of (i) maps an evaluation with ( N , Q b l k ) (N,Q_{\mathrm{blk}}) ( N , Q blk ) to a pebbling with P Π = N ≤ B N P_\Pi=N \le B_N P Π = N ≤ B N and I Π ≤ Q b l k ≤ B Q I_\Pi\le Q_{\mathrm{blk}} \le B_Q I Π ≤ Q blk ≤ B Q ; the proof of (ii) maps a pebbling with ( P Π , I Π ) (P_\Pi,I_\Pi) ( P Π , I Π ) to a ram evaluation with N ≤ P Π ≤ B N N \le P_\Pi\le B_N N ≤ P Π ≤ B N and Q b l k ≤ I Π ≤ B Q Q_{\mathrm{blk}} \le I_\Pi\le B_Q Q blk ≤ I Π ≤ B Q . The two feasible-budget sets are upward closed and coincide, so their minimal elements coincide; a weighted objective exposes only the Pareto points on the lower convex hull, whereas budgets expose every minimal element. □
Remark 1 (Why the class is needed). Both clauses that the class adds to “evaluated vertex by vertex” are load-bearing. If Const were allowed, a constant source could enter the context at no charge while the game requires a Load for it, so (i) would fail by up to ∣ K 0 ∣ |K_0| ∣ K 0 ∣ per use. If outputs could be streamed, a run could emit a sink and evict it: with one source, C = 2 C=2 C = 2 , S = 1 S=1 S = 1 and four unary sinks, a run loads the source once and computes, emits and evicts each sink, for Q b l k = 1 Q_{\mathrm{blk}}=1 Q blk = 1 , whereas no pebbling with three pebble positions ends with four sinks red or blue. Such runs are matched by extending the game with an Output move that records a red-pebbled sink and may then delete its pebble; (i) and (ii) then hold verbatim for runs that Emit each sink once, with I O C \mathrm{IO}_C IO C replaced by the minimum over pebblings that output every sink. The grid bound of Corollary 11 holds for that game too, since its proof uses only that every internal vertex receives a Compute and that every source with a successor is loaded; we do not claim the matrix bound for it. Input-delivered vertex-granular G G G -evaluations (Definition 2), over which Theorem 3 states its S = 0 S=0 S = 0 bound, are covered by (i) with each Input mapped to the placement of a pebble on the delivered source: in the black pebble game this is an ordinary placement (Appendix § 15 ), and in the red–blue game, with a blue bound of at least the number of sources, it is a Load of that source, so (i) holds with at most Q b l k Q_{\mathrm{blk}} Q blk plus the number of sources I/O moves. Only direction (i) is claimed for this class: a legal pebbling may load a source more than once or, with S = 0 S=0 S = 0 , use no blue pebble at all, and neither is an input-delivered run. Theorem 3 needs no converse, its S = 0 S=0 S = 0 upper bound being an explicit input-delivered schedule.
Remark 2 (Necessity of value provenance). If the controller may compute an arbitrary polynomial-time function of the blocks it reads, it can emit the answer itself after reading the input once: for the ordinary matrix-multiplication DAG on n × n n \times n n × n inputs this costs N = 0 N=0 N = 0 model calls and Q b l k = Θ ( n 2 ) Q_{\mathrm{blk}}=\Theta(n^2) Q blk = Θ ( n 2 ) transfers, against I O C ( G ) = Ω ( n 3 / C ) \mathrm{IO}_C(G)=\Omega(n^3/\sqrt{C}) IO C ( G ) = Ω ( n 3 / C ) . Input reads stay charged; what collapses is the value creation. The ≥ \ge ≥ direction of Theorem 1, and with it results that reduce to pebbling, can collapse.
VPA forbids uncharged value creation; if parsing, retrieval scoring or code execution creates values, it must be modelled and charged separately.
Corollary 11 and Proposition 12: statements and proofs
We give the full statements and proofs of the communication consequences used in § 4 .
Corollary 11 (Communication bounds). Let the n × n n \times n n × n grid DAG have vertices ( i , j ) (i,j) ( i , j ) , 0 ≤ i , j < n 0 \le i,j < n 0 ≤ i , j < n , sources on row 0 and column 0, sink ( n − 1 , n − 1 ) (n-1,n-1) ( n − 1 , n − 1 ) , and edges into each internal vertex ( i , j ) (i,j) ( i , j ) , i , j ≥ 1 i,j \ge1 i , j ≥ 1 , from ( i − 1 , j ) (i-1,j) ( i − 1 , j ) and ( i , j − 1 ) (i,j-1) ( i , j − 1 ) . Over memory-initialized vertex-granular G G G -evaluations with C ≥ 3 C \ge3 C ≥ 3 and S ≥ n 2 S \ge n^{2} S ≥ n 2 , the minimum transfer count is Q b l k = Θ ( n 2 / C + n ) Q_{\mathrm{blk}} = \Theta(n^{2}/C+n) Q blk = Θ ( n 2 / C + n ) , hence Θ ( n 2 / C ) \Theta(n^{2}/C) Θ ( n 2 / C ) for C ≤ n C \le n C ≤ n . For the ordinary n 3 n^{3} n 3 -operation matrix-multiplication DAG on n × n n \times n n × n inputs, with S ≥ 2 n 2 S \ge2n^{2} S ≥ 2 n 2 , enough to hold all sources initially (a memory-initialized vertex-granular G G G -evaluation also needs C + S ≥ 2 n 2 + n C+S \ge2n^{2}+n C + S ≥ 2 n 2 + n ; Appendix § 14 ), Q b l k = Ω ( n 3 / C ) Q_{\mathrm{blk}} = \Omega(n^{3}/\sqrt{C}) Q blk = Ω ( n 3 / C ) .
Both orders are bounds of J.-W. Hong and H. T. Kung [18 ] ; the grid is reproved below with explicit constants, recomputation allowed, and matched by tiles of side Θ ( C ) \Theta(C) Θ ( C ) . Both bound evaluation of the prescribed DAG, not computation of its function by other means.
Proposition 12 (Sequential input traffic). Consider an n n n -step chain in which each step produces one semantic block of width b b b . If the i i i -th call receives all earlier blocks, its input size is Θ ( i b ) \Theta(ib) Θ ( ib ) and T i n = Θ ( n 2 b ) T_{\mathrm{in}} = \Theta(n^{2}b) T in = Θ ( n 2 b ) . If each step instead depends on only O ( 1 ) O(1) O ( 1 ) earlier blocks and only those blocks are supplied, then T i n = Θ ( n b ) T_{\mathrm{in}} = \Theta(nb) T in = Θ ( nb ) , and no lam evaluating a non-degenerate chain vertex by vertex, each call taking the previous block as an argument, has T i n < n b T_{\mathrm{in}} < nb T in < nb .
Proof of Corollary 11. Both DAGs have in-degree at most two, so the insertion convention needs only C ≥ 3 C \ge3 C ≥ 3 , and Theorem 1, whose hypotheses on memory-initialized vertex-granular G G G -evaluations the corollary inherits, reduces the claim to bounds on I O C \mathrm{IO}_{C} IO C in the red–blue game of Appendix § 14 , recomputation allowed, with S S S at least the number of sources, as the corollary assumes; the lower bounds hold a fortiori for smaller S S S , and the schedules of the upper bounds hold at most ( 2 n − 1 ) + ( n − 1 ) 2 = n 2 (2n-1)+(n-1)^2=n^2 ( 2 n − 1 ) + ( n − 1 ) 2 = n 2 blue pebbles. Sources carry blue pebbles initially, and a source can only become red by a Load.
Grid, lower bound. Fix a legal pebbling with q q q I/O moves. Cut its move sequence after every C C C -th I/O move; this gives h = ⌊ q / C ⌋ + 1 ≤ q / C + 1 h=\lfloor q/C\rfloor+1 \le q/C+1 h = ⌊ q / C ⌋ + 1 ≤ q / C + 1 consecutive phases, each containing at most C C C I/O moves. Let V i V_i V i be the set of internal vertices that receive a Compute in phase i i i , and let F i F_i F i be the set of vertices outside V i V_i V i with an edge into V i V_i V i .
Claim 1: ∣ F i ∣ ≤ 2 C |F_i| \le2C ∣ F i ∣ ≤ 2 C . Let u ∈ F i u \in F_i u ∈ F i with an edge u → v u \to v u → v , v ∈ V i v \in V_i v ∈ V i . At the Compute of v v v in phase i i i , u u u is red. A red pebble on u u u is placed by Compute( u ) (u) ( u ) , which does not occur in the phase since u ∉ V i u \notin V_i u ∈ / V i , or by Load( u ) (u) ( u ) ; so either u u u was red at the start of the phase, or it was loaded during the phase. At most C C C vertices are red at the start and at most C C C I/O moves occur in the phase.
Claim 2: ∣ V i ∣ ≤ ∣ F i ∣ 2 |V_i| \le|F_i|^2 ∣ V i ∣ ≤ ∣ F i ∣ 2 . Let R R R be the set of rows and J J J the set of columns that meet V i V_i V i . In a row r ∈ R r \in R r ∈ R let ( r , j r ) (r,j_r) ( r , j r ) be the leftmost vertex of V i V_i V i ; it is internal, so j r ≥ 1 j_r \ge1 j r ≥ 1 and ( r , j r − 1 ) (r,j_r-1) ( r , j r − 1 ) is an in-neighbour of it outside V i V_i V i , hence in F i F_i F i . Distinct rows give distinct such vertices, so ∣ R ∣ ≤ ∣ F i ∣ |R| \le|F_i| ∣ R ∣ ≤ ∣ F i ∣ ; the topmost vertex of each column gives ∣ J ∣ ≤ ∣ F i ∣ |J| \le|F_i| ∣ J ∣ ≤ ∣ F i ∣ ; and ∣ V i ∣ ≤ ∣ R ∣ ∣ J ∣ |V_i| \le|R||J| ∣ V i ∣ ≤ ∣ R ∣∣ J ∣ .
Every internal vertex is computed in some phase, since the sink must receive a pebble and a non-source vertex receives its first pebble only by Compute, which needs its predecessors red. Hence ( n − 1 ) 2 ≤ ∑ i ∣ V i ∣ ≤ 4 h C 2 (n-1)^2 \le\sum_i |V_i| \le4hC^2 ( n − 1 ) 2 ≤ ∑ i ∣ V i ∣ ≤ 4 h C 2 , so h ≥ ( n − 1 ) 2 / ( 4 C 2 ) h \ge(n-1)^2/(4C^2) h ≥ ( n − 1 ) 2 / ( 4 C 2 ) and q ≥ C ( h − 1 ) ≥ ( n − 1 ) 2 / ( 4 C ) − C q \ge C(h-1) \ge(n-1)^2/(4C)-C q ≥ C ( h − 1 ) ≥ ( n − 1 ) 2 / ( 4 C ) − C . For C ≤ ( n − 1 ) / 4 C \le(n-1)/4 C ≤ ( n − 1 ) /4 the subtracted term is at most ( n − 1 ) 2 / ( 16 C ) (n-1)^2/(16C) ( n − 1 ) 2 / ( 16 C ) , giving q ≥ 3 ( n − 1 ) 2 / ( 16 C ) q \ge3(n-1)^2/(16C) q ≥ 3 ( n − 1 ) 2 / ( 16 C ) . Independently, each of the 2 n − 2 2n-2 2 n − 2 sources is a predecessor of an internal vertex and must be loaded once, so q ≥ 2 n − 2 q \ge2n-2 q ≥ 2 n − 2 . Together, for every C ≥ 3 C \ge3 C ≥ 3 and n ≥ 2 n \ge2 n ≥ 2 ,
I O C ≥ max { 3 ( n − 1 ) 2 16 C 1 [ C ≤ n − 1 4 ] , 2 n − 2 } ≥ 3 128 ( n 2 C + n ) . \mathrm{IO}_{C} \ge\max\left\{\frac{3(n-1)^2}{16C}\mathbf{1}\left[C \le\frac{n-1}{4}\right],2n-2\right\} \ge\frac{3}{128}\left(\frac{n^2}{C}+n\right). IO C ≥ max { 16 C 3 ( n − 1 ) 2 1 [ C ≤ 4 n − 1 ] , 2 n − 2 } ≥ 128 3 ( C n 2 + n ) .
where the last inequality uses n − 1 ≥ n / 2 n-1 \ge n/2 n − 1 ≥ n /2 and, for C > ( n − 1 ) / 4 C > (n-1)/4 C > ( n − 1 ) /4 , n 2 / C ≤ 8 n n^2/C \le8n n 2 / C ≤ 8 n . This is the Hong–Kung partition argument with the immediate-predecessor frontier F i F_i F i in place of a dominator set; Claim 2 is the isoperimetric step, and neither claim uses that a vertex is computed only once.
Grid, upper bound. For 4 ≤ C ≤ n 4 \le C \le n 4 ≤ C ≤ n put s = ⌊ ( C − 2 ) / 2 ⌋ ≥ 1 s=\lfloor(C-2)/2\rfloor\ge1 s = ⌊( C − 2 ) /2 ⌋ ≥ 1 and cover the internal vertices by s × s s \times s s × s tiles (smaller at the boundary) taken in row-major order of tiles. For a tile, load its north halo (the row above it, ≤ s \le s ≤ s values) and west halo (the column to its left, ≤ s \le s ≤ s values): these are sources or values stored by the tile above or to the left. Compute the tile row by row, left to right, discarding a halo value or a computed value once its last use in the tile has occurred, and store the tile’s south row and east column (≤ 2 s \le2s ≤ 2 s values). While computing ( r , c ) (r,c) ( r , c ) the resident blocks are the unused north-halo or previous-row values in columns ≥ c \ge c ≥ c , the current-row values in columns < c <c < c , the unused west-halo values, and the output: at most s + s + 1 = 2 s + 1 ≤ C − 1 s+s+1=2s+1 \le C-1 s + s + 1 = 2 s + 1 ≤ C − 1 . Each tile costs at most 4 s 4s 4 s transfers, and there are at most ⌈ ( n − 1 ) / s ⌉ 2 \lceil(n-1)/s\rceil^2 ⌈( n − 1 ) / s ⌉ 2 tiles, so
I O C ≤ 4 s ( n − 1 s + 1 ) 2 ≤ 4 ( n − 1 ) 2 s + 8 n + 4 s ≤ 32 n 2 C + 10 n , \mathrm{IO}_{C} \le4s\left(\frac{n-1}{s}+1\right)^2 \le\frac{4(n-1)^2}{s}+8n+4s \le\frac{32n^2}{C}+10n, IO C ≤ 4 s ( s n − 1 + 1 ) 2 ≤ s 4 ( n − 1 ) 2 + 8 n + 4 s ≤ C 32 n 2 + 10 n ,
using s ≥ ( C − 3 ) / 2 ≥ C / 8 s \ge(C-3)/2 \ge C/8 s ≥ ( C − 3 ) /2 ≥ C /8 for C ≥ 4 C \ge4 C ≥ 4 and 4 s ≤ 2 ( C − 2 ) ≤ 2 n 4s \le2(C-2) \le2n 4 s ≤ 2 ( C − 2 ) ≤ 2 n . At C = 3 C=3 C = 3 the row-major schedule, which loads two predecessors and stores one result per vertex, gives I O 3 ≤ 3 ( n − 1 ) 2 \mathrm{IO}_3 \le3(n-1)^2 IO 3 ≤ 3 ( n − 1 ) 2 . For C ≥ n + 2 C \ge n+2 C ≥ n + 2 the row-major schedule keeps the previous row resident, loads each of the 2 n − 2 2n-2 2 n − 2 sources with a successor once and leaves the sink resident, so I O C ≤ 2 n − 2 \mathrm{IO}_C \le2n-2 IO C ≤ 2 n − 2 , meeting the source count of the lower bound; for n < C < n + 2 n<C<n+2 n < C < n + 2 use I O C ≤ I O n \mathrm{IO}_C \le\mathrm{IO}_n IO C ≤ IO n . Hence I O C = O ( n 2 / C + n ) \mathrm{IO}_C=O(n^2/C+n) IO C = O ( n 2 / C + n ) for every C ≥ 3 C \ge3 C ≥ 3 , and with the lower bound I O C = Θ ( n 2 / C + n ) \mathrm{IO}_C=\Theta(n^2/C+n) IO C = Θ ( n 2 / C + n ) . The tiled schedule is uniform in the controller model of Definition 3: row, column and tile indices, and hence all addresses, are public structural counters, so this is a family-level construction rather than an appeal to the non-uniform completeness direction of Theorem 1.
Matrix multiplication. The ordinary DAG has one multiplication vertex per triple ( i , j , k ) (i,j,k) ( i , j , k ) and adds the n n n products of each entry along a chain, so its in-degree is two; J.-W. Hong and H. T. Kung [18 ] prove I O C ≥ a n 3 / C \mathrm{IO}_C \ge a n^3/\sqrt{C} IO C ≥ a n 3 / C for it, for an absolute constant a > 0 a>0 a > 0 and all C ≤ c 0 n 2 C \le c_0n^2 C ≤ c 0 n 2 with a constant c 0 > 0 c_0>0 c 0 > 0 (see also G. Ballard, J. Demmel, O. Holtz, and O. Schwartz [38 ] ); we carry a a a symbolically rather than fix its value. If the game in which the bound is proved requires every output to end blue rather than red or blue, at most C C C additional stores turn a pebbling of our game into one of that game, so the bound transfers with an additive loss of at most C C C . Put η = min { c 0 , ( a / 2 ) 2 / 3 } \eta=\min\{c_0,(a/2)^{2/3}\} η = min { c 0 , ( a /2 ) 2/3 } . For C ≤ η n 2 C \le\eta n^2 C ≤ η n 2 one has C 3 / 2 ≤ ( a / 2 ) n 3 C^{3/2}\le(a/2)n^3 C 3/2 ≤ ( a /2 ) n 3 , i.e. C ≤ ( a / 2 ) n 3 / C C\le(a/2)n^3/\sqrt{C} C ≤ ( a /2 ) n 3 / C , so I O C ≥ ( a / 2 ) n 3 / C \mathrm{IO}_C\ge(a/2)n^3/\sqrt{C} IO C ≥ ( a /2 ) n 3 / C ; for C > η n 2 C>\eta n^2 C > η n 2 the 2 n 2 2n^2 2 n 2 input loads alone give I O C ≥ 2 n 2 > 2 η n 3 / C \mathrm{IO}_C\ge2n^2>2\sqrt{\eta}\,n^3/\sqrt{C} IO C ≥ 2 n 2 > 2 η n 3 / C . Both cases are Ω ( n 3 / C ) \Omega(n^3/\sqrt{C}) Ω ( n 3 / C ) with a constant depending on a a a and c 0 c_0 c 0 only. This is a bound for evaluating that DAG, not for computing the product by another algorithm. The hypothesis S ≥ 2 n 2 S\ge2n^2 S ≥ 2 n 2 is necessary for initial source storage, but does not by itself guarantee feasibility at every context capacity; the lower bound applies whenever a memory-initialized vertex-granular G G G -evaluation exists. (A memory-initialized vertex-granular G G G -evaluation of this DAG needs C + S ≥ 2 n 2 + n C+S\ge2n^2+n C + S ≥ 2 n 2 + n : a source cannot be regenerated, so just before the first deletion of a source’s last copy all 2 n 2 2n^2 2 n 2 sources still hold slots, and each of the n n n vertex-disjoint paths from that source to n n n distinct outputs must already hold a non-source block, 2 n 2 + n 2n^2+n 2 n 2 + n blocks in C + S C+S C + S slots; if no source is ever deleted, the n 2 n^2 n 2 output blocks of the final configuration join the 2 n 2 2n^2 2 n 2 sources instead. At n = 4 n=4 n = 4 , C = 3 C=3 C = 3 , S = 32 S=32 S = 32 this is 36 blocks in 35 slots, so no memory-initialized vertex-granular G G G -evaluation exists although S = 2 n 2 S=2n^2 S = 2 n 2 .) We make no transfer claim here for adaptive comparison sorting: its external-memory lower bound uses a different model and parameter mapping. □
Proof of Proposition 12. Index the chain by an initial block x 0 x_0 x 0 , held in M M M from the start (if it is instead delivered once by Input, then further Write puts it there), and calls 1 , … , n 1,\ldots,n 1 , … , n , call i i i producing x i x_i x i . Replay. Call i i i takes the i i i blocks x 0 , … , x i − 1 x_0,\ldots,x_{i-1} x 0 , … , x i − 1 as arguments, so with the inserted output it needs i + 1 i+1 i + 1 slots, C ≥ n + 1 C\ge n+1 C ≥ n + 1 at call n n n , and T i n = ∑ i = 1 n i ⋅ b = n ( n + 1 ) b / 2 = Θ ( n 2 b ) T_{\mathrm{in}}=\sum_{i=1}^{n}i\cdot b=n(n+1)b/2=\Theta(n^2b) T in = ∑ i = 1 n i ⋅ b = n ( n + 1 ) b /2 = Θ ( n 2 b ) .
Persistent memory. The controller loads x i − 1 x_{i-1} x i − 1 (one block movement), calls the oracle with the two blocks ( x i − 1 , ⟨ s t e p ⟩ ) (x_{i-1},\langle\mathrm{step}\rangle) ( x i − 1 , ⟨ step ⟩) , three slots with the inserted output, and stores x i x_i x i (one block movement): C = 3 C=3 C = 3 , T i n = 2 n b T_{\mathrm{in}}=2nb T in = 2 nb , Q b l k = 2 n Q_{\mathrm{blk}}=2n Q blk = 2 n and Q m o v e = 0 Q_{\mathrm{move}}=0 Q move = 0 .
Lower bound. Assume each chain step is non-degenerate, i.e. x i x_i x i is not a copy of any earlier block. Then every x i x_i x i , i ≥ 1 i\ge1 i ≥ 1 , is the output of a distinct model call: under vertex-wise evaluation it is produced by a call, and VPA rules out its manufacture by the controller; so N ≥ n N\ge n N ≥ n , and since that call takes the block standing for x i − 1 x_{i-1} x i − 1 as an argument, it carries at least b b b symbols and T i n ≥ n b T_{\mathrm{in}}\ge nb T in ≥ nb . Definition 3 permits zero-argument calls, which is why the proposition names this hypothesis. Hence replay is a factor Θ ( n ) \Theta(n) Θ ( n ) from optimal in prompt tokens. □
Memory architecture
Proof of Theorem 2
Upper bound. The ram controller keeps the current index in the address register and repeats k k k times: Read( a ) (a) ( a ) into its one slot, then SetAddr on that slot, which decodes the stored index π ( a ) \pi(a) π ( a ) into the address register, then evict; after the k k k -th read it emits the block instead. Per hop there is one block read and no head motion, so N = 0 N=0 N = 0 , Q b l k = Q = k Q_{\mathrm{blk}}=Q=k Q blk = Q = k , Q m o v e = 0 Q_{\mathrm{move}}=0 Q move = 0 , Q o b s = k Q_{\mathrm{obs}}=k Q obs = k and C = 1 C=1 C = 1 . If decoding the entry is instead charged as an oracle call, its returned block is the argument of SetAddr, giving N = k N=k N = k and C = 2 C=2 C = 2 ; a tag cannot carry the index in a uniform family, Γ \Gamma Γ being fixed as n n n grows, whereas the instancewise lower bounds place no bound on Γ \Gamma Γ and use none.
Lower bound. Work in the read-only stream model of the theorem: cell i i i contains π ( i ) \pi(i) π ( i ) , the head starts at cell a 0 = 1 a_0=1 a 0 = 1 , and
Q = Q m e m = Q b l k + Q m o v e Q=Q_{\mathrm{mem}}=Q_{\mathrm{blk}}+Q_{\mathrm{move}} Q = Q mem = Q blk + Q move
(the appendices write Q Q Q for the main text’s Q m e m Q_{\mathrm{mem}} Q mem ), where reads contribute to Q b l k Q_{\mathrm{blk}} Q blk and unit head displacement contributes to Q m o v e Q_{\mathrm{move}} Q move . Put a j + 1 = π ( a j ) a_{j+1}=\pi(a_j) a j + 1 = π ( a j ) and let D j D_j D j be the event that a 0 , … , a j a_0,\ldots,a_j a 0 , … , a j are distinct.
Non-speculation fixes the order of first reads: a cell may be read only once its address has been revealed, and after the first read of cell a i − 1 a_{i-1} a i − 1 the revealed addresses are a 0 , … , a i a_0,\ldots,a_i a 0 , … , a i , so the first reads of new cells occur in the order a 0 , a 1 , a 2 , … a_0,a_1,a_2,\ldots a 0 , a 1 , a 2 , … . Correctness on every permutation forces these reads to happen. Fix π ∈ D j \pi\in D_j π ∈ D j with 1 ≤ j ≤ k − 1 1\le j\le k-1 1 ≤ j ≤ k − 1 and suppose the run on π \pi π never reads cell a j a_j a j ; then it reads only cells among a 0 , … , a j − 1 a_0,\ldots,a_{j-1} a 0 , … , a j − 1 . The machine is deterministic and, by the interface clause of Definition 3, every call returns a fixed function of its arguments, so the run, and with it the output, is the same on every permutation π ′ \pi' π ′ with π ′ ( a i ) = a i + 1 \pi'(a_i)=a_{i+1} π ′ ( a i ) = a i + 1 for i < j i<j i < j , whatever its constants or tags. Among these permutations one has π ′ ( a j ) = a 0 \pi'(a_j)=a_0 π ′ ( a j ) = a 0 , so that the orbit of a 0 a_0 a 0 is the cycle a 0 , … , a j a_0,\ldots,a_j a 0 , … , a j and the correct answer a k ′ a'_k a k ′ lies in { a 0 , … , a j } \{a_0,\ldots,a_j\} { a 0 , … , a j } ; another continues the orbit a 0 , … , a j a_0,\ldots,a_j a 0 , … , a j through k − k- k − j j j further distinct cells, which exist since k + 1 ≤ n k+1\le n k + 1 ≤ n , so that a k ′ a'_k a k ′ lies outside { a 0 , … , a j } \{a_0,\ldots,a_j\} { a 0 , … , a j } . The machine answers the same on both and errs on one, contradicting always-correctness. Hence on D j D_j D j the run first reads a 0 , a 1 , … , a j a_0,a_1,\ldots,a_j a 0 , a 1 , … , a j in this order, the first read of a i a_i a i after that of a i − 1 a_{i-1} a i − 1 ; the head may pass over a cell without reading it, but it must travel from each first read to the next, one Move per cell, since Definition 3 gives a stream machine no SetAddr; so with J J J the largest index j ≤ k − 1 j\le k-1 j ≤ k − 1 for which D j D_j D j holds,
Q m o v e ≥ ∑ j = 1 J ∣ a j − a j − 1 ∣ = ∑ j = 1 k − 1 ∣ a j − a j − 1 ∣ 1 D j . Q_{\mathrm{move}}\ge\sum_{j=1}^{J}|a_j-a_{j-1}|=\sum_{j=1}^{k-1}|a_j-a_{j-1}|\mathbf{1}_{D_j}. Q move ≥ j = 1 ∑ J ∣ a j − a j − 1 ∣ = j = 1 ∑ k − 1 ∣ a j − a j − 1 ∣ 1 D j .
For a uniformly random permutation, conditional on D j − 1 D_{j-1} D j − 1 and on the values a 0 , … , a j − 1 a_0,\ldots,a_{j-1} a 0 , … , a j − 1 , the next value a j = π ( a j − 1 ) a_j=\pi(a_{j-1}) a j = π ( a j − 1 ) is uniform on the n − j + 1 n-j+1 n − j + 1 indices outside { a 1 , … , a j − 1 } \{a_1,\ldots,a_{j-1}\} { a 1 , … , a j − 1 } . At most n / 4 + 1 n/4+1 n /4 + 1 indices lie at distance less than n / 8 n/8 n /8 from any given point, so for j ≤ k ≤ n / 4 j\le k\le n/4 j ≤ k ≤ n /4 at least ( n − j + 1 ) − 1 − ( n / 4 + 1 ) ≥ n / 2 − 1 ≥ n / 4 (n-j+1)-1-(n/4+1)\ge n/2-1\ge n/4 ( n − j + 1 ) − 1 − ( n /4 + 1 ) ≥ n /2 − 1 ≥ n /4 of those indices differ from a 0 a_0 a 0 and lie at distance at least n / 8 n/8 n /8 from a j − 1 a_{j-1} a j − 1 ; therefore E [ ∣ a j − a j − 1 ∣ 1 D j ∣ D j − 1 , a 0 , … , a j − 1 ] ≥ n / 4 n − j + 1 ⋅ n 8 ≥ n 32 \mathbb{E}[|a_j-a_{j-1}|\mathbf{1}_{D_j}\mid D_{j-1},a_0,\ldots,a_{j-1}]\ge\frac{n/4}{n-j+1}\cdot\frac{n}{8}\ge\frac n{32} E [ ∣ a j − a j − 1 ∣ 1 D j ∣ D j − 1 , a 0 , … , a j − 1 ] ≥ n − j + 1 n /4 ⋅ 8 n ≥ 32 n . The cycle of a 0 a_0 a 0 has length uniform on [ n ] [n] [ n ] , so Pr [ D j − 1 ] ≥ Pr [ D k ] = 1 − k / n ≥ 3 / 4 \Pr[D_{j-1}]\ge\Pr[D_k]=1-k/n\ge3/4 Pr [ D j − 1 ] ≥ Pr [ D k ] = 1 − k / n ≥ 3/4 . Summing over j ≤ k − 1 j\le k-1 j ≤ k − 1 , E π [ Q m o v e ] ≥ 3 4 ⋅ n 32 ( k − 1 ) ≥ 3 256 k n \mathbb{E}_{\pi}[Q_{\mathrm{move}}]\ge\frac34\cdot\frac n{32}(k-1)\ge\frac{3}{256}kn E π [ Q move ] ≥ 4 3 ⋅ 32 n ( k − 1 ) ≥ 256 3 k n for k ≥ 2 k\ge2 k ≥ 2 , and Q ≥ Q m o v e Q\ge Q_{\mathrm{move}} Q ≥ Q move . Consequently some permutation incurs this aggregate memory-interface-step cost. It is dominated by sequential head motion and is not an Ω ( k n b ) \Omega(knb) Ω ( k nb ) lower bound on physically transferred symbols; only Q b l k Q_{\mathrm{blk}} Q blk is semantic block traffic. A full-table scan made before an index is requested is excluded by non-speculation; the proof does not charge such a scan once per future hop.
Randomised machines. Let the machine have a random tape and be correct on every permutation for almost every tape. For every tape outside a null set (the intersection, over the finitely many permutations, of probability-one events) the machine with that tape fixed is a deterministic, always-correct, non-speculative machine of the kind just treated: the interface clause is unchanged, and “the run is the same on π \pi π and π ′ \pi' π ′ ” holds tape by tape. Hence E π [ Q m o v e ] ≥ 3 256 k n \mathbb{E}_{\pi}[Q_{\mathrm{move}}]\ge\frac{3}{256}kn E π [ Q move ] ≥ 256 3 k n for almost every tape, and averaging over the tape gives the bound of the theorem; the distance sum itself does not depend on the tape, only the event that the run reads a 0 , … , a J a_0,\ldots,a_J a 0 , … , a J in order does.
Remark 3 (Speculative access: workspace, shortcuts and a protocol reduction). The theorem is for the non-speculative class. For speculative machines the answer depends on every store Definition 3 leaves unbounded; we list the escapes, then the class in which none is available, and then an algorithm inside that class showing that Ω ( k n ) \Omega(kn) Ω ( k n ) is the wrong question even there. Bounding the context alone does not suffice: for one fixed n n n , Definition 3 allows ∣ Γ ∣ ≥ n |\Gamma|\ge n ∣Γ∣ ≥ n and ∣ Q c t r l ∣ ≥ n ! |Q_{\mathrm{ctrl}}|\ge n! ∣ Q ctrl ∣ ≥ n ! , and then a C = 1 C=1 C = 1 machine scans the tape once (n − 1 n-1 n − 1 Moves, n n n Reads), passes each cell’s block to a verifier whose tag is the index it holds (Q o b s = n Q_{\mathrm{obs}}=n Q obs = n ), records π \pi π in its finite control, computes a k − 1 a_{k-1} a k − 1 there, moves the head to cell a k − 1 a_{k-1} a k − 1 (at most n − 1 n-1 n − 1 MOVES), reads it and emits the block: Q m o v e ≤ 2 n − 2 Q_{\mathrm{move}}\le2n-2 Q move ≤ 2 n − 2 for every k k k . Bounding the control alone does not suffice either: with C ≥ n C\ge n C ≥ n and ∣ Γ ∣ = n |\Gamma|=n ∣Γ∣ = n , one scan reads every cell into the context, and each hop then selects the next slot from the tag returned by a verifier call on the current block, with no further head motion. Bounding the block width is necessary as well: with b ( n ) ≥ n ⌈ log 2 n ⌉ b(n)\ge n\lceil\log_2 n\rceil b ( n ) ≥ n ⌈ log 2 n ⌉ , a C = 3 C=3 C = 3 machine with O ( 1 ) O(1) O ( 1 ) control scans the tape once, folding each cell into one accumulator block by a model call, and obtains a k a_k a k from the accumulator by one more call, so Q m o v e = n − 1 Q_{\mathrm{move}}=n-1 Q move = n − 1 for every k k k . Finally, the content-dependent state of Definition 3 is not the registers alone: the step counter, which τ c t r l \tau_{\mathrm{ctrl}} τ ctrl reads and can advance by waiting, holds log 2 t \log_2 t log 2 t bits, unbounded when the running time is. A machine with C = 1 C=1 C = 1 , ∣ Γ ∣ = n |\Gamma|=n ∣Γ∣ = n and O ( n ) O(n) O ( n ) control states writes π \pi π into the counter during one scan, one base-( n + 3 ) (n+3) ( n + 3 ) digit per cell, by waiting after reading each cell until digit n − i + 1 n-i+1 n − i + 1 of the counter equals the tag just read (that digit is 0 0 0 when the wait begins and the steps taken since the previous wait are fewer than n + 3 n+3 n + 3 , so the wait ends exactly when the counter reads the digits written so far followed by zeros; the lowest digit absorbs the final walk); it then computes a k − 1 a_{k-1} a k − 1 from the counter, walks to it and reads: Q m o v e ≤ 2 n − 2 Q_{\mathrm{move}}\le2n-2 Q move ≤ 2 n − 2 in n O ( n ) n^{O(n)} n O ( n ) steps. Fifth, a writable tape: with Θ ( n ) \Theta(n) Θ ( n ) blank writable cells beside the table, the arrangement of blocks on them is Θ ( n log n ) \Theta(n\log n) Θ ( n log n ) bits of state that no count of registers, pattern and counters sees, and pointer doubling by external-memory sorting (a merge pass costs O ( n 2 / C ) O(n^2/C) O ( n 2 / C ) head moves with C C C blocks of context) reaches a k a_k a k in O ( ( n 2 / C ) log ( n / C ) log k ) O((n^2/C)\log(n/C)\log k) O (( n 2 / C ) log ( n / C ) log k ) moves, o ( k n ) o(kn) o ( k n ) at C = n / log n C=n/\log n C = n / log n once k ≥ log 2 n k\ge\log^2 n k ≥ log 2 n .
The bounded-workspace class closes all five. It consists of the always-correct speculative STREAM LAMs of Definition 3 on the task as stated, one index per block with b ( n ) = ⌈ log Σ n ⌉ b(n)=\lceil\log_{\Sigma}n\rceil b ( n ) = ⌈ log Σ n ⌉ , whose tape holds the n n n table cells and nothing else (S = n S=n S = n ) with WRITE unavailable, with C = o ( n ) C=o(n) C = o ( n ) context slots, h = O ( log n ) h=O(\log n) h = O ( log n ) register bits (so ∣ Q c t r l ∣ ⋅ ∣ Γ ∣ = n O ( 1 ) |Q_{\mathrm{ctrl}}|\cdot|\Gamma|=n^{O(1)} ∣ Q ctrl ∣ ⋅ ∣Γ∣ = n O ( 1 ) ), which every uniform family on this task satisfies) and n O ( 1 ) n^{O(1)} n O ( 1 ) steps, so that the counters hold O ( 1 ) O(1) O ( 1 ) bits; tool and verifier calls are unrestricted in number, each a fixed map of its arguments. Such a machine holds O ( C log n ) O(C\log n) O ( C log n ) bits of content-dependent state in all (context, registers, pattern and counters), fewer than the log 2 n ! \log_2 n! log 2 n ! bits of π \pi π , so it cannot memorise the table in a scan.
Ω ( k n ) \Omega(kn) Ω ( k n ) nevertheless fails in this class for large k k k , because C C C blocks can hold shortcuts along π \pi π rather than π \pi π itself. Fix 2 ≤ m ≤ C / 4 2\le m\le C/4 2 ≤ m ≤ C /4 landmark cells including cell 1 (so C ≥ 12 C\ge12 C ≥ 12 , which makes 3 m + 3 ≤ C 3m+3\le C 3 m + 3 ≤ C ). For each landmark the machine keeps three blocks: its index, a walker position (initially the landmark) and a hop count, stored as the index block ⟨ count + 1 ⟩ \langle\text{count}+1\rangle ⟨ count + 1 ⟩ , initially ⟨ 1 ⟩ \langle1\rangle ⟨ 1 ⟩ ; the count never exceeds n − 1 n-1 n − 1 , because with m ≥ 2 m\ge2 m ≥ 2 landmarks the next landmark on an orbit is at most n − 1 n-1 n − 1 hops away,
so it fits one index block. It also keeps one block ⟨ c ⟩ \langle c\rangle ⟨ c ⟩ equal to the head position, updated by an increment or decrement tool call at each Move, one working slot, and one accumulator slot, which is free during the sweeps and holds the remaining hop budget in the query phase: 3 m + 3 ≤ C 3m+3\le C 3 m + 3 ≤ C slots in all. A tool call’s output takes a free slot, the accumulator slot during the sweeps and the working slot in the query phase, and is then moved into place by Evict and Copy; index blocks are built from the constant ⟨ 1 ⟩ \langle1\rangle ⟨ 1 ⟩ by the same tool. The target k k k , a public parameter of the task, is held in the control’s O ( log n ) O(\log n) O ( log n ) bits and enters the blocks only through the accumulator, initialised to ⟨ k + 1 ⟩ \langle k+1\rangle ⟨ k + 1 ⟩ by k k k increment calls, the remaining budget being stored with the same offset of one as the counts. No status bit lives in the finite control: a walker is finished exactly when its position is a landmark and its count is positive, a fixed map of its three blocks and the m m m index blocks that a verifier call reports as a tag, and one verifier call on all 3 m 3m 3 m blocks reports whether every walker is finished. The machine sweeps the tape back and forth, reading that tag once per sweep and stopping when it is set. At cell c c c it reads the cell into the working slot and, for each walker in turn (the control holds the walker index, O ( log n ) O(\log n) O ( log n ) bits), calls a verifier on ⟨ c ⟩ \langle c\rangle ⟨ c ⟩ and the walker’s three blocks; when the tag reports an unfinished walker at position c c c , the walker’s position block is replaced by the block just read and its count block by the incremented count, the tool output landing in the accumulator slot before being copied into place; at most one unfinished walker matches a cell, the walkers’ arcs on a cycle being disjoint. A sweep advances every unfinished walker at least once, so after G G G sweeps, G G G the largest number of hops from a landmark to the next landmark on its orbit, the context holds for every landmark the next landmark and the distance to it. The query follows these shortcuts from a 0 = 1 a_0=1 a 0 = 1 , subtracting each shortcut’s hop count from the accumulator by a tool call as long as the comparison verifier on the accumulator and the next count block reports that the shortcut does not overshoot the budget, then walks the remaining r < G r<G r < G hops on the tape, each hop moving the head to the cell named by the current block: a comparison verifier on ⟨ c ⟩ \langle c\rangle ⟨ c ⟩ and that block returns a tag in { < , = , > } \{<,=,>\} { < , = , > } , which gives the direction and says when to stop, so a hop costs at most n n n Moves (an equality-only verifier would cost 2 n 2n 2 n , a sweep to one end and back, changing no order below). Every call is a fixed map of its arguments, the machine is deterministic, uses no random tape and is always correct, and it uses 3 m + 3 ≤ C 3m+3\le C 3 m + 3 ≤ C slots, O ( log n ) O(\log n) O ( log n ) register bits (the control indexes walkers, slots and opcodes) and O ( n 2 m ) O(n^2m) O ( n 2 m ) steps. For uniformly random π \pi π the orbit from a landmark visits fresh cells uniformly, so Pr [ G > s ] ≤ m ( 1 − m / n ) s \Pr[G>s]\le m(1-m/n)^s Pr [ G > s ] ≤ m ( 1 − m / n ) s and E [ G ] = O ( ( n / m ) log m ) \mathbb{E}[G]=O((n/m)\log m) E [ G ] = O (( n / m ) log m ) , whence, for every k k k ,
E π [ Q m o v e ] ≤ 2 n ( E [ G ] + 1 ) + O ( n 2 C log C ) \mathbb{E}_{\pi}[Q_{\mathrm{move}}]\le2n\left(\mathbb{E}[G]+1\right)+O\left(\frac{n^2}{C}\log C\right) E π [ Q move ] ≤ 2 n ( E [ G ] + 1 ) + O ( C n 2 log C )
(at most G G G sweeps of n − 1 n-1 n − 1 moves and r < G r<G r < G hops of at most n n n moves), which is o ( k n ) o(kn) o ( k n ) whenever k = ω ( ( n / C ) log C ) k=\omega((n/C)\log C) k = ω (( n / C ) log C ) ; at C = n C=\sqrt n C = n and k = n / 4 k=n/4 k = n /4 it is O ( n 3 / 2 log n ) O(n^{3/2}\log n) O ( n 3/2 log n ) against Θ ( n 2 ) \Theta(n^2) Θ ( n 2 ) for the non-speculative class. Together with the demand-following scan, which costs O ( k n ) O(kn) O ( k n ) moves inside the class, the best bound exhibited is E π [ Q m o v e ] = O ( min { k n , ( n 2 / C ) log C } ) \mathbb{E}_{\pi}[Q_{\mathrm{move}}]=O(\min\{kn,(n^2/C)\log C\}) E π [ Q move ] = O ( min { k n , ( n 2 / C ) log C }) for C ≥ 12 C\ge12 C ≥ 12 .
The question for the bounded-workspace class is therefore the trade-off between context and head motion, not the exponent of k n kn k n . We conjecture that every deterministic machine of the class has E π [ Q m o v e ] = Ω ( min { k n , n 2 / C } ) \mathbb{E}_{\pi}[Q_{\mathrm{move}}]=\Omega(\min\{kn,n^2/C\}) E π [ Q move ] = Ω ( min { k n , n 2 / C }) up to a factor polylogarithmic in n n n : a scan costs n n n moves and advances at most O ( C ) O(C) O ( C ) walkers, and only walkers on the orbit of a 0 a_0 a 0 can help. Nothing is lost by stating the conjecture over deterministic machines: it concerns a fixed input distribution, and a randomised machine’s expectation over π \pi π and its tape is an average of deterministic machines’ expectations over π \pi π . What is proved is the separation for the non-speculative class; what is exhibited is the speculative upper bound O ( ( n 2 / C ) log C ) O((n^2/C)\log C) O (( n 2 / C ) log C ) in expectation over π \pi π ; the remaining step is the converse, which the proof of the theorem cannot supply because a scan may read π ( j ) \pi(j) π ( j ) before j j j is revealed and retain it, and the sum of distances between successively revealed cells has no analogue once a C C C -block cache biases the next orbit location. Independently of the workspace bound, every always-correct machine, speculative or not, deterministic or zero-error randomised, has E [ Q m o v e ] ≥ n / 9 \mathbb{E}[Q_{\mathrm{move}}]\ge n/9 E [ Q move ] ≥ n /9 for n ≥ 16 n\ge16 n ≥ 16 and 2 ≤ k ≤ n / 4 2\le k\le n/4 2 ≤ k ≤ n /4 (Proposition 14, Corollary 15).
The route to the converse is communication complexity, and the step from the machine to a protocol is in place (Lemma 13 ): a machine of the class holds s = O ( C log n ) s=O(C\log n) s = O ( C log n ) bits of content-dependent state, and cutting the tape between cells c c c and c + 1 c+1 c + 1 turns its run into a deterministic two-party protocol that sends that state once per crossing of the cut; since every Move that changes the head position crosses exactly one of the n − 1 n-1 n − 1 cuts, some cut in the middle half is crossed O ( E π [ Q m o v e ] / n ) O(\mathbb{E}_{\pi}[Q_{\mathrm{move}}]/n) O ( E π [ Q move ] / n ) times in expectation over the same uniform π \pi π , and stopping the protocol after r r r messages gives an r r r -round protocol correct with probability 1 − O ( E π [ Q m o v e ] / ( n r ) ) 1-O(\mathbb{E}_{\pi}[Q_{\mathrm{move}}]/(nr)) 1 − O ( E π [ Q move ] / ( n r )) ; crossings of one cut, not passes over the tape, are what two-party round elimination consumes. The landmark algorithm is such a protocol with r = O ( ( n / C ) log C ) r=O((n/C)\log C) r = O (( n / C ) log C ) expected rounds of s = O ( C log n ) s=O(C\log n) s = O ( C log n ) bits, so r s = Θ ~ ( n ) rs=\widetilde{\Theta}(n) r s = Θ ( n ) , and relaying the orbit is one with at most about k / 2 k/2 k /2 rounds of log n \log n log n bits. The conjecture would therefore follow from a distributional round lower bound for this instance: that no deterministic protocol with r = o ( k ) r=o(k) r = o ( k ) rounds of s s s bits and r s = o ( n / polylog n ) rs=o(n/\operatorname{polylog} n) r s = o ( n / polylog n ) outputs π k ( 1 ) \pi^k(1) π k ( 1 ) with probability 3 / 4 3/4 3/4 over a uniform permutation split by cell position. (A worst-case version on rectangles of density 2 − O ( r s ) 2^{-O(rs)} 2 − O ( r s ) is false: such a rectangle can force the orbit to stay on one side for Θ ( r s ) \Theta(rs) Θ ( r s ) steps.) For the classical alternating instance the corresponding statements are the round-elimination bounds of N. Nisan and A. Wigderson [39 ] ; in our instance the side of the next pointer is the position of a uniformly random value, so the orbit changes side at input-dependent times and the speaker often owns the current cell, a structure for which the round-elimination step remains to be carried out.
Lemma 13 (Head moves are cut crossings). Let Λ \Lambda Λ be a deterministic always-correct machine of the bounded-workspace class of Remark 3 (on every π \pi π it emits exactly one block, the one encoding a k a_k a k ) on a linear tape of cells 1 , … , n 1,\ldots,n 1 , … , n with no MOVE off either end, with Σ \Sigma Σ a fixed alphabet, and let s s s be the length of a fixed-length binary encoding of its content-dependent configuration: control state, tag, step count, occupancy pattern and the contents of the C C C context slots (s = O ( C log n ) s=O(C\log n) s = O ( C log n ) in the class). Let Q ˉ ≔ E π [ Q m o v e ] \bar{Q}\coloneqq\mathbb{E}_{\pi}[Q_{\mathrm{move}}] Q ˉ : = E π [ Q move ] over uniform π \pi π . For a cut c ∈ [ n − 1 ] c\in[n-1] c ∈ [ n − 1 ] let X c ( π ) X_c(\pi) X c ( π ) be the number of MOVEs between cells c c c and c + 1 c+1 c + 1 on input π \pi π , and let P c P_c P c be the two-party protocol in which Alice holds cells 1 , … , c 1,\ldots,c 1 , … , c , Bob holds cells c + 1 , … , n c+1,\ldots,n c + 1 , … , n , the party whose cells contain the head simulates Λ \Lambda Λ , sends the content-dependent configuration to the other party whenever a MOVE crosses the cut, and, at the first EMIT, announces the emitted block and stops. Let I ≔ { c ∈ Z : n / 4 ≤ c ≤ 3 n / 4 } I\coloneqq\{c\in\mathbb{Z}:n/4\leq c\leq3n/4\} I : = { c ∈ Z : n /4 ≤ c ≤ 3 n /4 } and n ≥ 16 n\geq16 n ≥ 16 .
P c P_c P c is deterministic, Alice speaks first, and on every π \pi π it sends at most X c ( π ) X_c(\pi) X c ( π ) messages of s s s bits and outputs a k a_k a k ; moreover ∑ c = 1 n − 1 X c ( π ) ≤ Q m o v e ( π ) \sum_{c=1}^{n-1}X_c(\pi)\leq Q_{\mathrm{move}}(\pi) ∑ c = 1 n − 1 X c ( π ) ≤ Q move ( π ) .
Q ˉ ≥ ∑ c ∈ I E π [ X c ] \bar{Q}\geq\sum_{c\in I}\mathbb{E}_{\pi}[X_c] Q ˉ ≥ ∑ c ∈ I E π [ X c ] , so some c ∗ ∈ I c^*\in I c ∗ ∈ I has E π [ X c ∗ ] ≤ 4 Q ˉ / n \mathbb{E}_{\pi}[X_{c^*}]\leq4\bar{Q}/n E π [ X c ∗ ] ≤ 4 Q ˉ / n ; stopping P c ∗ P_{c^*} P c ∗ when an ( r + 1 ) (r+1) ( r + 1 ) -st message would be sent gives a protocol with at most r r r messages that outputs a k a_k a k with probability at least 1 − 4 Q ˉ / ( n ( r + 1 ) ) 1-4\bar{Q}/(n(r+1)) 1 − 4 Q ˉ / ( n ( r + 1 )) over π \pi π .
If c ∈ I c\in I c ∈ I , E π [ X c ] ≤ ( r + 1 ) / 4 \mathbb{E}_{\pi}[X_c]\leq(r+1)/4 E π [ X c ] ≤ ( r + 1 ) /4 and r s ≤ n / 17 − 3 rs\leq n/17-3 r s ≤ n /17 − 3 , then there are a c c c -subset S ⊆ [ n ] S\subseteq[n] S ⊆ [ n ] with ∣ S ∩ { c + 1 , … , n } ∣ ≥ n / 16 \lvert S\cap\{c+1,\ldots,n\}\rvert\geq n/16 ∣ S ∩ { c + 1 , … , n }∣ ≥ n /16 , a set A A A of bijections { 1 , … , c } → S \{1,\ldots,c\}\to S { 1 , … , c } → S with ∣ A ∣ ≥ 2 − r s − 2 c ! \lvert A\rvert\geq2^{-rs-2}c! ∣ A ∣ ≥ 2 − r s − 2 c ! and a set B B B of bijections { c + 1 , … , n } → [ n ] ∖ S \{c+1,\ldots,n\}\to[n]\setminus S { c + 1 , … , n } → [ n ] ∖ S with ∣ B ∣ ≥ 2 − r s − 2 ( n − c ) ! \lvert B\rvert\geq2^{-rs-2}(n-c)! ∣ B ∣ ≥ 2 − r s − 2 ( n − c )! such that on every π \pi π with ( π ∣ [ c ] , π ∣ [ n ] ∖ [ c ] ) ∈ A × B (\pi|_{[c]},\pi|_{[n]\setminus[c]})\in A\times B ( π ∣ [ c ] , π ∣ [ n ] ∖ [ c ] ) ∈ A × B the protocol P c P_c P c sends at most r r r messages and outputs a k a_k a k .
Proof. The configuration is encoded in ⌈ log 2 ∣ Q c t r l ∣ ⌉ + ⌈ log 2 ∣ Γ ∣ ⌉ + ⌈ log 2 ( T max + 1 ) ⌉ + C + C b ( n ) ⌈ log 2 ∣ Σ ∣ ⌉ \lceil\log_2\lvert Q_{\mathrm{ctrl}}\rvert\rceil+\lceil\log_2\lvert\Gamma\rvert\rceil+\lceil\log_2(T_{\max}+1)\rceil+C+Cb(n)\lceil\log_2\lvert\Sigma\rvert\rceil ⌈ log 2 ∣ Q ctrl ∣⌉ + ⌈ log 2 ∣ Γ ∣⌉ + ⌈ log 2 ( T m a x + 1 )⌉ + C + C b ( n ) ⌈ log 2 ∣ Σ ∣⌉ bits, padded to this fixed length, where T max T_{\max} T m a x is the largest running time over the finitely many inputs; in the class ∣ Q c t r l ∣ ∣ Γ ∣ = n O ( 1 ) \lvert Q_{\mathrm{ctrl}}\rvert\lvert\Gamma\rvert=n^{O(1)} ∣ Q ctrl ∣ ∣ Γ ∣ = n O ( 1 ) , T max = n O ( 1 ) T_{\max}=n^{O(1)} T m a x = n O ( 1 ) and b ( n ) ⌈ log 2 ∣ Σ ∣ ⌉ = O ( log n ) b(n)\lceil\log_2\lvert\Sigma\rvert\rceil=O(\log n) b ( n ) ⌈ log 2 ∣ Σ ∣⌉ = O ( log n ) , so s = O ( C log n ) s=O(C\log n) s = O ( C log n ) . The head position is not part of the configuration and the tape is the input; the public counters are fixed functions of the step count and of n n n .
(1) We show by induction on t t t that the active party can execute step t t t of Λ \Lambda Λ exactly. It knows the configuration after step t − 1 t-1 t − 1 (initially Alice: the initial configuration is fixed and the head is at cell 1) and the head position, which lies in its own cells. By Definition 3 the next control state and operation are τ c t r l \tau_{\mathrm{ctrl}} τ ctrl of the registers, the counters and the occupancy pattern, all determined by the configuration and the head position. A CALL is a fixed map of its argument blocks (interface clause), which are context blocks, so the active party evaluates it; COPY, EVICT and CONST act on the context only; a READ returns the block in the head cell, which the active party holds; WRITE is unavailable, and the RAM, STACK and INPUT operations do not apply. A MOVE that keeps the head on the same side of the cut changes nothing else; a MOVE from c c c to c + 1 c+1 c + 1 or from c + 1 c+1 c + 1 to c c c is the only event that generates a message: the active party sends the configuration after the move, and the receiver, who knows from the direction of the message that the head is now at c + 1 c+1 c + 1 (Alice sent) or at c c c (Bob sent), continues the simulation. At the first EMIT the active party announces the emitted block and the protocol stops. Hence the simulation reproduces the run of Λ \Lambda Λ on π \pi π up to its first EMIT, and the announced block encodes a k a_k a k by always-correctness. Messages are sent only at crossings of the cut before that step, so there are at most X c ( π ) X_c(\pi) X c ( π ) of them, each of exactly s s s bits; the head starts in Alice’s cells and moves by unit steps, so the first crossing is from c c c to c + 1 c+1 c + 1 and Alice speaks first, after which the speakers alternate. Finally, a MOVE changes the head position by ± 1 \pm1 ± 1 or, if clipped at an end of the tape, not at all, so it crosses at most one of the boundaries { c , c + 1 } \{c,c+1\} { c , c + 1 } , c ∈ [ n − 1 ] c\in[n-1] c ∈ [ n − 1 ] , exactly one when the head moves; summing over c c c gives ∑ c = 1 n − 1 X c ( π ) ≤ Q m o v e ( π ) \sum_{c=1}^{n-1}X_c(\pi)\leq Q_{\mathrm{move}}(\pi) ∑ c = 1 n − 1 X c ( π ) ≤ Q move ( π ) .
(2) Taking expectations in (1) and dropping the non-negative terms with c ∉ I c\notin I c ∈ / I gives Q ˉ ≥ ∑ c ∈ I E π [ X c ] \bar{Q}\geq\sum_{c\in I}\mathbb{E}_{\pi}[X_c] Q ˉ ≥ ∑ c ∈ I E π [ X c ] (I ⊆ [ n − 1 ] I\subseteq[n-1] I ⊆ [ n − 1 ] for n ≥ 4 n\geq4 n ≥ 4 ). The number of integers in [ n / 4 , 3 n / 4 ] [n/4,3n/4] [ n /4 , 3 n /4 ] is at least n / 2 − 1 ≥ n / 4 n/2-1\geq n/4 n /2 − 1 ≥ n /4 for n ≥ 4 n\geq4 n ≥ 4 , so min c ∈ I E π [ X c ] ≤ Q ˉ / ∣ I ∣ ≤ 4 Q ˉ / n \min_{c\in I}\mathbb{E}_{\pi}[X_c]\leq\bar{Q}/|I|\leq4\bar{Q}/n min c ∈ I E π [ X c ] ≤ Q ˉ /∣ I ∣ ≤ 4 Q ˉ / n . The stopped protocol is deterministic, Alice first, sends at most r r r messages, and coincides with P c ∗ P_{c^*} P c ∗ whenever X c ∗ ≤ r X_{c^*}\leq r X c ∗ ≤ r , in which case it outputs a k a_k a k by (1); as X c ∗ X_{c^*} X c ∗ is a non-negative integer, Markov’s inequality gives Pr π [ X c ∗ ≥ r + 1 ] ≤ E π [ X c ∗ ] / ( r + 1 ) ≤ 4 Q ˉ / ( n ( r + 1 ) ) \Pr_{\pi}[X_{c^*}\geq r+1]\leq\mathbb{E}_{\pi}[X_{c^*}]/(r+1)\leq4\bar{Q}/(n(r+1)) Pr π [ X c ∗ ≥ r + 1 ] ≤ E π [ X c ∗ ] / ( r + 1 ) ≤ 4 Q ˉ / ( n ( r + 1 )) .
(3) For a transcript τ \tau τ let R τ R_\tau R τ be the set of π \pi π on which P c P_c P c produces τ \tau τ . Alice’s messages, and her decision to stop, are functions of π ∣ [ c ] \pi|_{[c]} π ∣ [ c ] and of the previous messages, Bob’s of π ∣ [ n ] ∖ [ c ] \pi|_{[n]\setminus[c]} π ∣ [ n ] ∖ [ c ] and the previous messages, so R τ = { π : π ∣ [ c ] ∈ A τ , π ∣ [ n ] ∖ [ c ] ∈ B τ } R_\tau=\{\pi:\pi|_{[c]}\in\mathcal{A}_\tau,\ \pi|_{[n]\setminus[c]}\in\mathcal{B}_\tau\} R τ = { π : π ∣ [ c ] ∈ A τ , π ∣ [ n ] ∖ [ c ] ∈ B τ } for some sets A τ , B τ \mathcal{A}_\tau,\mathcal{B}_\tau A τ , B τ , and P c P_c P c outputs a k a_k a k on all of R τ R_\tau R τ by (1). On { π : X c ( π ) ≤ r } \{\pi:X_c(\pi)\leq r\} { π : X c ( π ) ≤ r } , an event of probability at least 3 / 4 3/4 3/4 by Markov’s inequality, P c P_c P c sends at most r r r messages, so the sets R τ R_\tau R τ with at most r r r messages cover it; there are at most ∑ i = 0 r 2 i s ≤ 2 r s + 1 \sum_{i=0}^{r}2^{is}\leq2^{rs+1} ∑ i = 0 r 2 i s ≤ 2 r s + 1 such transcripts, so some R τ R_\tau R τ has probability at least 3 8 2 − r s \frac{3}{8}2^{-rs} 8 3 2 − r s . Condition on S ≔ π ( [ c ] ) S\coloneqq\pi([c]) S : = π ([ c ]) , a uniformly random c c c -subset of [ n ] [n] [ n ] : given S S S , the restrictions π ∣ [ c ] \pi|_{[c]} π ∣ [ c ] and π ∣ [ n ] ∖ [ c ] \pi|_{[n]\setminus[c]} π ∣ [ n ] ∖ [ c ] are independent uniform bijections onto S S S and [ n ] ∖ S [n]\setminus S [ n ] ∖ S , and R τ ∩ { π ( [ c ] ) = S } = A S × B S R_\tau\cap\{\pi([c])=S\}=A_S\times B_S R τ ∩ { π ([ c ]) = S } = A S × B S . with A S ≔ { p ∈ A τ : p ( [ c ] ) = S } A_S \coloneqq\{p \in\mathcal{A}_\tau: p([c]) = S\} A S : = { p ∈ A τ : p ([ c ]) = S } and B S ≔ { p ˉ ∈ B τ : p ˉ ( [ n ˉ ] [ c ] ) = [ n ˉ ] S } B_S \coloneqq\{\bar p \in\mathcal{B}_\tau: \bar p([\bar n][c]) = [\bar n]S\} B S : = { p ˉ ∈ B τ : p ˉ ([ n ˉ ] [ c ]) = [ n ˉ ] S } . The count ∣ S ∩ { c + 1 , … , n } ∣ |S \cap\{c+1,\ldots,n\}| ∣ S ∩ { c + 1 , … , n } ∣ is hypergeometric with mean c ( n − c ) / n ≥ 3 n / 16 c(n-c)/n \ge3n/16 c ( n − c ) / n ≥ 3 n /16 for c ∈ I c \in I c ∈ I , so by Hoeffding’s inequality for sampling without replacement [40 ] it is below n / 16 ≤ 3 n / 16 − n / 8 n/16 \le3n/16-n/8 n /16 ≤ 3 n /16 − n /8 with probability at most exp ( − 2 ( n / 8 ) 2 / c ) ≤ e − n / 24 ≤ 2 − n / 17 \exp(-2(n/8)^2/c) \le e^{-n/24} \le2^{-n/17} exp ( − 2 ( n /8 ) 2 / c ) ≤ e − n /24 ≤ 2 − n /17 , which is at most 1 8 2 − r s \frac{1}{8}2^{-r_s} 8 1 2 − r s when r s ≤ n / 17 − 3 r_s \le n/17-3 r s ≤ n /17 − 3 . Hence the subsets S S S with ∣ S ∩ { c + 1 , … , n } ∣ ≥ n / 16 |S \cap\{c+1,\ldots,n\}| \ge n/16 ∣ S ∩ { c + 1 , … , n } ∣ ≥ n /16 carry at least ( 3 8 − 1 8 ) 2 − r s \left(\frac{3}{8}-\frac{1}{8}\right)2^{-r_s} ( 8 3 − 8 1 ) 2 − r s of the probability of R τ R_\tau R τ , and one of them has Pr [ A S × B S ∣ S ] = ∣ A S ∣ c ! ⋅ ∣ B S ∣ ( n − c ) ! ≥ 1 4 2 − r s \Pr[A_S \times B_S \mid S] = \frac{|A_S|}{c!}\cdot\frac{|B_S|}{(n-c)!} \ge\frac{1}{4}2^{-r_s} Pr [ A S × B S ∣ S ] = c ! ∣ A S ∣ ⋅ ( n − c )! ∣ B S ∣ ≥ 4 1 2 − r s ; both factors are at most 1, so each is at least 2 − r s − 2 2^{-r_s-2} 2 − r s − 2 . Take A ≔ A S A \coloneqq A_S A : = A S and B ≔ B S B \coloneqq B_S B : = B S . □
The density 2 − r s − 2 2^{-r_s-2} 2 − r s − 2 in (3) is too small for a worst-case round lower bound on such rectangles: a rectangle of density 2 − O ( k ) 2^{-O(k)} 2 − O ( k ) can force the orbit of 1 to stay on one side of the cut for k k k steps, after which one message suffices.
Proposition 14 (Every deterministic always-correct machine moves Ω ( n ) \Omega(n) Ω ( n ) ). Let Λ \Lambda Λ be a deterministic always-correct STREAM LAM for the pointer-chasing task on a read-only linear tape with S = n S=n S = n and the head initially at cell 1, with no restriction on C C C , the control, the tags, the counters, the block width or the calls, and let n ≥ 16 n \ge16 n ≥ 16 and 2 ≤ k ≤ n / 4 2 \le k \le n/4 2 ≤ k ≤ n /4 . Let D k D_k D k be the event that a 0 , … , a k a_0,\ldots,a_k a 0 , … , a k are distinct. Then Q m o v e ( π ) ≥ min { a k − 1 − 1 , n − k − 3 } Q_{\mathrm{move}}(\pi) \ge\min\{a_{k-1}-1,n-k-3\} Q move ( π ) ≥ min { a k − 1 − 1 , n − k − 3 } for every π ∈ D k \pi\in D_k π ∈ D k , and E π [ Q m o v e ] ≥ 243 2048 n ≥ n / 9 \mathbb{E}_\pi[Q_{\mathrm{move}}] \ge\frac{243}{2048}n \ge n/9 E π [ Q move ] ≥ 2048 243 n ≥ n /9 .
Proof. Let R ( π ) ⊆ [ n ] R(\pi) \subseteq[n] R ( π ) ⊆ [ n ] be the set of cells read during the run on π \pi π . (i) The run depends on π ∣ R ( π ) \pi|_{R(\pi)} π ∣ R ( π ) only. If π ′ \pi' π ′ agrees with π \pi π on R ( π ) R(\pi) R ( π ) , the runs on π \pi π and π ′ \pi' π ′ coincide step by step: by induction on t t t , τ c t r l \tau_{\mathrm{ctrl}} τ ctrl of the configuration, and its effect is a fixed function of the configuration (the interface clause for calls; Copy, Evict, Const, Move and Emit read no cell) except for a Read, whose result is the block in the head cell, a cell of R ( π ) R(\pi) R ( π ) on which π ′ = π \pi'=\pi π ′ = π . (ii) If π ∈ D k \pi\in D_k π ∈ D k and ∣ R ( π ) ∣ ≤ n − k − 3 |R(\pi)| \le n-k-3 ∣ R ( π ) ∣ ≤ n − k − 3 , then a k − 1 ∈ R ( π ) a_{k-1} \in R(\pi) a k − 1 ∈ R ( π ) . Otherwise U ≔ [ n ] ∖ R ( π ) U \coloneqq[n]\setminus R(\pi) U : = [ n ] ∖ R ( π ) has at least k + 3 k+3 k + 3 elements, so { a 0 , … , a k } \{a_0,\ldots,a_k\} { a 0 , … , a k } contains two distinct cells y , y ′ y,y' y , y ′ . Let π ′ ≔ π ∘ ( a k − 1 y ) \pi' \coloneqq\pi\circ(a_{k-1}\ y) π ′ : = π ∘ ( a k − 1 y ) and π ′ ′ ≔ π ∘ ( a k − 1 y ′ ) \pi'' \coloneqq\pi\circ(a_{k-1}\ y') π ′′ : = π ∘ ( a k − 1 y ′ ) ; both are permutations, and both agree with π \pi π on R ( π ) R(\pi) R ( π ) because they differ from π \pi π only at a k − 1 , y , y ′ ∈ U a_{k-1},y,y' \in U a k − 1 , y , y ′ ∈ U , so by (i) Λ \Lambda Λ emits the same block on π , π ′ \pi,\pi' π , π ′ and π ′ ′ \pi'' π ′′ . For i ≤ k − 2 i \le k-2 i ≤ k − 2 the cell a i a_i a i lies outside { a k − 1 , y } \{a_{k-1},y\} { a k − 1 , y } , so π ′ ( a i ) = a i + 1 \pi'(a_i)=a_{i+1} π ′ ( a i ) = a i + 1 and, by induction, π ′ k ( 1 ) = a i \pi'^{\,k}(1)=a_i π ′ k ( 1 ) = a i for all i ≤ k − 1 i \le k-1 i ≤ k − 1 ; hence π ′ k ( 1 ) = π ′ ( a k − 1 ) = π ( y ) \pi'^{\,k}(1)=\pi'(a_{k-1})=\pi(y) π ′ k ( 1 ) = π ′ ( a k − 1 ) = π ( y ) , and likewise π ′ ′ k ( 1 ) = π ( y ′ ) ≠ π ( y ) \pi''^{\,k}(1)=\pi(y')\ne\pi(y) π ′′ k ( 1 ) = π ( y ′ ) = π ( y ) . The correct answers on π ′ \pi' π ′ and π ′ ′ \pi'' π ′′ differ while the outputs coincide, contradicting always-correctness. (iii) Pointwise bound. The head starts at cell 1 and each Move changes it by ± 1 \pm1 ± 1 on a linear tape, so reading cell x x x costs at least x − 1 x-1 x − 1 moves, and if ∣ R ( π ) ∣ ≥ m |R(\pi)| \ge m ∣ R ( π ) ∣ ≥ m some cell ≥ m \ge m ≥ m is read. For Q m o v e ( π ) ≥ n − k − 2 Q_{\mathrm{move}}(\pi) \ge n-k-2 Q move ( π ) ≥ n − k − 2 and Q m o v e ( π ) ≥ n − k − 3 Q_{\mathrm{move}}(\pi) \ge n-k-3 Q move ( π ) ≥ n − k − 3 , a k − 1 ∈ R ( π ) a_{k-1} \in R(\pi) a k − 1 ∈ R ( π ) by (ii) and Q m o v e ( π ) ≥ a k − 1 − 1 Q_{\mathrm{move}}(\pi) \ge a_{k-1}-1 Q move ( π ) ≥ a k − 1 − 1 . (iv) Expectation. The length of the cycle of 1 in a uniform π \pi π is uniform on [ n ] [n] [ n ] (the probability of length ℓ \ell ℓ is n − 1 n ⋅ n − 2 n − 1 ⋯ n − ℓ + 1 n − ℓ + 2 ⋅ 1 n − ℓ + 1 = 1 n \frac{n-1}{n}\cdot\frac{n-2}{n-1}\cdots\frac{n-\ell+1}{n-\ell+2}\cdot\frac{1}{n-\ell+1}=\frac{1}{n} n n − 1 ⋅ n − 1 n − 2 ⋯ n − ℓ + 2 n − ℓ + 1 ⋅ n − ℓ + 1 1 = n 1 ), and D k D_k D k is the event that this length is at least k + 1 k+1 k + 1 , so Pr [ D k ] = ( n − k ) / n ≥ 3 / 4 \Pr[D_k]=(n-k)/n\ge3/4 Pr [ D k ] = ( n − k ) / n ≥ 3/4 . Conjugation by a permutation τ \tau τ with τ ( 1 ) = 1 \tau(1)=1 τ ( 1 ) = 1 preserves the uniform measure and D k D_k D k and sends a k − 1 a_{k-1} a k − 1 to τ ( a k − 1 ) \tau(a_{k-1}) τ ( a k − 1 ) , and a k − 1 ≠ a 0 = 1 a_{k-1}\ne a_0=1 a k − 1 = a 0 = 1 on D k D_k D k since k ≥ 2 k\ge2 k ≥ 2 ; so conditioned on D k D_k D k the cell a k − 1 a_{k-1} a k − 1 is uniform on { 2 , … , n } \{2,\ldots,n\} { 2 , … , n } . Therefore
E π [ Q m o v e ] ≥ Pr [ D k ] ⋅ 1 n − 1 ∑ a = 2 n min { a − 1 , n − k − 3 } ≥ 3 4 ⋅ 1 n − 1 ∑ i = 1 n − k − 3 i = 3 4 ⋅ ( n − k − 3 ) ( n − k − 2 ) 2 ( n − 1 ) ≥ 3 ( n − k − 3 ) 2 8 n , \begin{aligned}
\mathbb{E}_\pi[Q_{\mathrm{move}}] \ge\Pr[D_k]\cdot\frac{1}{n-1}\sum_{a=2}^{n}\min\{a-1,n-k-3\} \ge\frac{3}{4}\cdot\frac{1}{n-1}\sum_{i=1}^{n-k-3}i \\
&= \frac{3}{4}\cdot\frac{(n-k-3)(n-k-2)}{2(n-1)} \ge\frac{3(n-k-3)^2}{8n},
\end{aligned} E π [ Q move ] ≥ Pr [ D k ] ⋅ n − 1 1 a = 2 ∑ n min { a − 1 , n − k − 3 } ≥ 4 3 ⋅ n − 1 1 i = 1 ∑ n − k − 3 i = 4 3 ⋅ 2 ( n − 1 ) ( n − k − 3 ) ( n − k − 2 ) ≥ 8 n 3 ( n − k − 3 ) 2 ,
the last step because n ( n − k − 2 ) ≥ ( n − 1 ) ( n − k − 3 ) n(n-k-2)\ge(n-1)(n-k-3) n ( n − k − 2 ) ≥ ( n − 1 ) ( n − k − 3 ) when 2 n ≥ k + 3 2n\ge k+3 2 n ≥ k + 3 . For k ≤ n / 4 k\le n/4 k ≤ n /4 and n ≥ 16 n\ge16 n ≥ 16 , n − k − 3 ≥ 3 n / 4 − 3 ≥ 9 n / 16 n-k-3\ge3n/4-3\ge9n/16 n − k − 3 ≥ 3 n /4 − 3 ≥ 9 n /16 , so E π [ Q m o v e ] ≥ 3 8 ⋅ 81 256 n = 243 2048 n ≥ n / 9 \mathbb{E}_\pi[Q_{\mathrm{move}}]\ge\frac{3}{8}\cdot\frac{81}{256}n=\frac{243}{2048}n\ge n/9 E π [ Q move ] ≥ 8 3 ⋅ 256 81 n = 2048 243 n ≥ n /9 . □
Corollary 15 (Zero-error randomisation). Under the tape and input hypotheses of Proposition 14, every randomised STREAM LAM that, on every permutation, terminates and emits the correct block with probability one over its random tape satisfies E π , ω [ Q m o v e ] ≥ 243 2048 n ≥ n / 9 \mathbb{E}_{\pi,\omega}[Q_{\mathrm{move}}] \ge\frac{243}{2048}n \ge n/9 E π , ω [ Q move ] ≥ 2048 243 n ≥ n /9 ; no restriction on C C C , the control, the tags, the counters, the block width or the calls is needed.
Proof. There are finitely many permutations, so the intersection over them of the probability-one events “the run terminates and emits the correct block” is a probability-one set Ω 0 \Omega_0 Ω 0 of random tapes. Fix ω ∈ Ω 0 \omega\in\Omega_0 ω ∈ Ω 0 . With the tape fixed, the operation chosen at each step is a function of the configuration and of the tape bits consumed so far, so the machine is a deterministic always-correct machine of Proposition 14: step (i) of its proof holds because runs on π \pi π and π ′ \pi' π ′ that agree on the cells read consume the same tape prefix, and steps (ii)–(iv) use nothing else. Hence E π [ Q m o v e ∣ ω ] ≥ 243 2048 n \mathbb{E}_\pi[Q_{\mathrm{move}}\mid\omega] \ge\frac{243}{2048}n E π [ Q move ∣ ω ] ≥ 2048 243 n for every ω ∈ Ω 0 \omega\in\Omega_0 ω ∈ Ω 0 , and averaging over ω \omega ω gives the bound. □
Query bandwidth: adaptive observations
We now formalize the observation bandwidth available to an adaptive LAM execution.
Query bandwidth.
Query bandwidth. Consider a task f : B n m → B n f:\mathcal{B}_n^m \to\mathcal{B}_n f : B n m → B n with m m m input blocks. We use D ( f ) D(f) D ( f ) for the minimum worst-case number of input blocks required by a deterministic procedure to compute f f f , and R 1 / 3 ( f ) R_{1/3}(f) R 1/3 ( f ) for the minimum worst-input expected number of block queries among randomized procedures that err with probability at most 1/3 on every input. In a LAM execution, input blocks are observed through model-call inputs or outside them. Let N N N denote the number of model calls, and let Q o b s Q_{\mathrm{obs}} Q obs count every other event that exposes an input block: an address decoded from it, its use as a tool or verifier argument (counted per block), and its emission as an output block (Definition 3). Since the insertion convention gives each model call at most C − 1 C-1 C − 1 argument blocks, these channels together expose at most N ( C − 1 ) + Q o b s N(C-1)+Q_{\mathrm{obs}} N ( C − 1 ) + Q obs input blocks.
Theorem 16 (Query bandwidth). Under value provenance and C ≥ 2 C \ge2 C ≥ 2 , every deterministic LAM computing f f f , its output being the block it Emits or the tag it halts with, has, on some input, ∑ c a l l s ( input-block arguments ) + Q o b s ≥ D ( f ) \sum_{\mathrm{calls}}(\text{input-block arguments})+Q_{\mathrm{obs}} \ge D(f) ∑ calls ( input-block arguments ) + Q obs ≥ D ( f ) , hence N ( C − 1 ) + Q o b s ≥ D ( f ) N(C-1)+Q_{\mathrm{obs}} \ge D(f) N ( C − 1 ) + Q obs ≥ D ( f ) . Every randomized LAM with error probability at most 1 / 3 1/3 1/3 on each input satisfies max x E x [ N ( C − 1 ) + Q o b s ] ≥ R 1 / 3 ( f ) \max_x \mathbb{E}_x[N(C-1)+Q_{\mathrm{obs}}] \ge R_{1/3}(f) max x E x [ N ( C − 1 ) + Q obs ] ≥ R 1/3 ( f ) .
The bound tracks the information the task requires, not how many input blocks could affect the output: for the selector f ( s , d 1 , … , d m ) = d s f(s,d_1,\ldots,d_m)=d_s f ( s , d 1 , … , d m ) = d s an execution decodes s s s into an address and emits d s d_s d s , two observations, and D ( f ) = 2 D(f)=2 D ( f ) = 2 , whereas parity of m m m blocks needs all m m m , D ( f ) = m D(f)=m D ( f ) = m . Output is charged through Emit: identity on a block already in M M M costs Q o b s = 1 = D ( f ) Q_{\mathrm{obs}}=1=D(f) Q obs = 1 = D ( f ) , whereas a final-configuration convention without such a charge would let it cost nothing, so the theorem is not stated for memory-initialized vertex-granular G G G -evaluations.
Proof of Remark 4. For a content-oblivious controller, the structural occurrence DAG — calls, argument slots, addresses and designated output — is the same for every input. Let o o o be its output occurrence. If a globally relevant source x i x_i x i were not an ancestor of o o o , changing only x i x_i x i would leave all ancestors and hence the output unchanged for every pair of inputs, contradicting relevance. Thus all r ( f ) r(f) r ( f ) relevant sources occur in the ancestor subgraph.
Every call has at most C − 1 C-1 C − 1 arguments under the insertion convention. In the ancestor subgraph of o o o , every vertex is an ancestor of the single sink, so every non-sink vertex has out-degree at least one; with N N N internal vertices of in-degree at most C − 1 C-1 C − 1 and r r r sources it therefore has at least N + r − 1 N+r-1 N + r − 1 at most N ( C − 1 ) N(C-1) N ( C − 1 ) edges, where r ≤ N ( C − 2 ) + 1 r \le N(C-2)+1 r ≤ N ( C − 2 ) + 1 . Hence r ( f ) ≤ N ( C − 2 ) + 1 r(f) \le N(C-2)+1 r ( f ) ≤ N ( C − 2 ) + 1 and N ≥ ( r ( f ) − 1 ) / ( C − 2 ) N \ge(r(f)-1)/(C-2) N ≥ ( r ( f ) − 1 ) / ( C − 2 ) .
For tightness, let ( B , ⊕ ) (\mathcal{B},\oplus) ( B , ⊕ ) be an abelian group and f = x 1 ⊕ ⋯ ⊕ x n f=x_1\oplus\cdots\oplus x_n f = x 1 ⊕ ⋯ ⊕ x n . A fixed ( C − 1 ) (C-1) ( C − 1 ) -ary fold uses ⌈ ( n − 1 ) / ( C − 2 ) ⌉ \lceil(n-1)/(C-2)\rceil ⌈( n − 1 ) / ( C − 2 )⌉ calls, up to the final partially filled call. □
Proof of Theorem 16, deterministic case. Simulate the deterministic LAM by a decision tree over the m m m input coordinates. Run the machine symbolically: each block carries its provenance label (Definition 3), and an input block whose coordinate has not been queried is kept as a symbol. The transition function sees only ( g , γ , a ) (g,\gamma,a) ( g , γ , a ) , the counters and the occupancy pattern, so the symbolic run proceeds without any block content until an event needs one. There are four such events. A model call: the tree queries the coordinates of its input-block arguments, at most C − 1 C-1 C − 1 per call, counted through N N N . A SetAddr on an input block, a tool or verifier call with an input block among its arguments, and an Emit of an input block: each is charged to Q o b s Q_{\mathrm{obs}} Q obs , per event and per input block, and the tree queries the coordinate if it has not done so already. By the interface clause of Definition 3 a returned block or tag is a fixed function of the opcode and the argument blocks, and an address set by SetAddr or Shift is a fixed function of a block or of the previous address, while a Stream head position is a function of the controller’s own Moves; so returned blocks, tags and addresses are functions of the queried coordinates and the constants, every subsequent controller state is determined, and at the end every emitted block is a known function of the queried coordinates, as is the tag register at a halting step, so the bound covers a tag output verbatim; the tree outputs f ( x ) f(x) f ( x ) . The clause is where the argument would otherwise fail: a verifier with side access to the input could report the parity of m m m blocks as a tag, for N = Q o b s = 0 N=Q_{\mathrm{obs}}=0 N = Q obs = 0 against D ( f ) = m D(f)=m D ( f ) = m . On input x x x it makes at most N ( x ) ( C − 1 ) + Q o b s ( x ) N(x)(C-1)+Q_{\mathrm{obs}}(x) N ( x ) ( C − 1 ) + Q obs ( x ) queries; more precisely, the simulation charges each model call by its number of input-block arguments, so it proves, on some input, ∑ c a l l s ( input-block arguments ) + Q o b s ≥ D ( f ) \sum_{\mathrm{calls}}(\text{input-block arguments})+Q_{\mathrm{obs}} \ge D(f) ∑ calls ( input-block arguments ) + Q obs ≥ D ( f ) , of which the statement is the corollary obtained from the bound C − 1 C-1 C − 1 on the arguments of a call. Since every deterministic decision tree computing f f f has worst-case depth at least D ( f ) D(f) D ( f ) , the claimed worst-case input exists. The output charge is not optional: without it the machine that reads x 1 x_1 x 1 into a slot and emits it computes the identity with N = Q o b s = 0 N=Q_{\mathrm{obs}}=0 N = Q obs = 0 while D = 1 D=1 D = 1 , and the per-block charge on tool calls is what stops one tool call from absorbing C − 1 C-1 C − 1 observations for the price of one. Output semantics. The theorem’s machine computes f f f by emitting f ( x ) f(x) f ( x ) ; a block that merely resides in X X X or M M M when the machine halts is not an output. Under the final-configuration convention of memory-initialized vertex-granular G G G -evaluations (§ 4 ) the statement would need an output-observation rule, a terminal exposure of each designated output block charged to Q o b s Q_{\mathrm{obs}} Q obs : with it, identity on a source block held in M M M costs Q o b s = 1 = D ( f ) Q_{\mathrm{obs}} = 1 = D(f) Q obs = 1 = D ( f ) under both conventions, since the final exposure of that block is charged; without it, designating the resident source as the output costs nothing and the bound fails. We state the theorem for emitted output and claim it for terminal residency only with that rule. □
Proof of Theorem 16, randomized case. Fix the random tape of the LAM; the deterministic construction above gives a decision tree with exactly the same output and, on each input x x x , at most N ( x ) ( C − 1 ) + Q o b s ( x ) N(x)(C-1)+Q_{\mathrm{obs}}(x) N ( x ) ( C − 1 ) + Q obs ( x ) queries. Randomising over tapes therefore gives a randomised decision tree with the same worst-input error and, on each x x x , expected query count at most E x [ N ( C − 1 ) + Q o b s ] \mathbb{E}_x[N(C-1)+Q_{\mathrm{obs}}] E x [ N ( C − 1 ) + Q obs ] . By the definition of R 1 / 3 ( f ) R_{1/3}(f) R 1/3 ( f ) , its worst-input expected count is at least R 1 / 3 ( f ) R_{1/3}(f) R 1/3 ( f ) . □
Remark 5 (Global relevance versus query complexity). Every data coordinate of the selector f ( s , d 1 , … , d m ) = d s f(s,d_1,\ldots,d_m)=d_s f ( s , d 1 , … , d m ) = d s is globally relevant, but an execution observes only s s s (one decoded address) and d s d_s d s (one emitted input block): r ( f ) = m + 1 r(f)=m+1 r ( f ) = m + 1 while D ( f ) = 2 D(f)=2 D ( f ) = 2 in the block-query model. The former controls only an input-independent schedule, and the latter is the right quantity for adaptive content addressing.
Exact single-stack FIFO frontier
For FIFO retrieval, a single stack exhibits an exact context threshold: C = ⌈ ( n + 1 ) / 2 ⌉ C=\lceil(n+1)/2\rceil C = ⌈( n + 1 ) /2 ⌉ with unrestricted buffering during the write phase, and C = n C=n C = n under copy-free streaming.
Theorem 17 (A single stack needs context ⌈ ( n + 1 ) / 2 ⌉ \lceil(n+1)/2\rceil ⌈( n + 1 ) /2 ⌉ for FIFO). In F I F O n \mathrm{FIFO}_n FIFO n the input blocks x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n are delivered one at a time, in order, during a write phase; a read phase begins after x n x_n x n has been delivered, and during it the machine must emit x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n in that order. Nothing is emitted during the write phase. Consider the one-stack LAMs of Definition 3 that make no model or tool call (FIFO is a routing task; verifier calls, which return tags only, are allowed, and the finite control, tag and address state may be arbitrarily large), with constant set K 0 K_0 K 0 , and assume ∣ B ∣ ≥ n + ∣ K 0 ∣ |\mathcal{B}|\ge n+|K_0| ∣ B ∣ ≥ n + ∣ K 0 ∣ , so that an input of pairwise distinct blocks outside K 0 K_0 K 0 exists.
A RAM-LAM with S ≥ n S\ge n S ≥ n solves F I F O n \mathrm{FIFO}_n FIFO n with C = 1 C=1 C = 1 and Q b l k = Q = 2 n Q_{\mathrm{blk}}=Q=2n Q blk = Q = 2 n .
Every correct one-stack LAM has C ≥ ⌈ ( n + 1 ) / 2 ⌉ C\ge\lceil(n+1)/2\rceil C ≥ ⌈( n + 1 ) /2 ⌉ , and C = ⌈ ( n + 1 ) / 2 ⌉ C=\lceil(n+1)/2\rceil C = ⌈( n + 1 ) /2 ⌉ suffices (stack capacity S ≥ C S\ge C S ≥ C ), with a fixed content-blind schedule.
If the write phase is copy-free streaming, that is, every block is pushed from its delivery slot before the next delivery, no Copy is applied to an input block during the write phase, and nothing is popped before the read phase, then C ≥ n C\ge n C ≥ n , and C = n C=n C = n suffices (with S ≥ n S\ge n S ≥ n ).
The phase restrictions are necessary for the stated frontier. Without the requirement that the read phase follow the whole write phase, passing each block through solves the task at C = 1 C=1 C = 1 . Without the clause that nothing is popped in (iii), a push followed by a pop emulates buffering and (iii) collapses to (ii). Without the copy-free clause it collapses likewise: a machine may push every arrival and still retain copies of x 1 , … , x C − 1 x_1,\ldots,x_{C-1} x 1 , … , x C − 1 in context (at the delivery of x i x_i x i , i ≤ C − 1 i\le C-1 i ≤ C − 1 , two slots are free, one for the arrival and one for its copy), emit those first in the read phase, and pop x n , … , x C x_n,\ldots,x_C x n , … , x C into the C C C slots to freed, which works whenever n ≤ 2 C − 1 n\le2C-1 n ≤ 2 C − 1 ; so streaming with retained copies costs exactly ⌈ ( n + 1 ) / 2 ⌉ \lceil(n+1)/2\rceil ⌈( n + 1 ) /2 ⌉ , the buffered schedule of (ii) in disguise, and (iii) is the price of streaming without them. The bounds do not depend on the controller’s content-dependent state: under value provenance that state can choose the next routing operation but can neither hold a block nor regenerate one, so the argument below is pointwise on a single run.
Lemma 18 (Single-copy normal form). Fix a machine as in Theorem 17, a capacity C C C , and an input of pairwise distinct blocks outside K 0 K_0 K 0 . From a correct run one obtains a sequence of Input, Push, Pop, Evict and Emit operations that is legal for the same C C C , emits x 1 , … , x n x_1,\ldots,x_n x 1 , … , x n in order after all deliveries, and in which at every instant each x i x_i x i has at most one copy, in a context slot or at one stack position, with Emit removing the emitted copy.
Proof. Every block in the run is a copy of some x i x_i x i or of a constant, because Input and Const are the only block-creating operations available to the machine. The block emitted at position i i i has content x i x_i x i , which is not a constant and differs from every x j x_j x j , j ≠ i j\ne i j = i ; so it is a copy of x i x_i x i . Trace that copy backwards: a copy in a slot arrived by Input, by Pop of a stack position that an earlier Push filled from a slot, or by Copy from a slot; continuing, the trace ends at the delivery of x i x_i x i . Call the copies on this trace the lineage of x i x_i x i . Delete every operation acting on a copy outside a lineage and delete every Copy on a lineage and let its source slot continue that lineage, exchanging the names of the source and destination slots in the slot map used for all subsequent operations. The destination slot was free at the Copy, so the exchange is bookkeeping in the construction of the reduced sequence, not a machine operation: after it, every slot named by the original run is either free or holds the block the original run holds there, so the reduced run’s occupancy is at most the original’s at every instant and no lineage block is ever in two slots. Hence the capacity C C C and every free-slot precondition are respected. The stack at any instant becomes the subsequence of the original stack formed by lineage positions, so a lineage Pop, which popped the original top, pops the top of the reduced stack. Deliveries and emissions are unchanged, and an emitted copy has no later use on its lineage, so it may be discarded. Lineages of distinct blocks are disjoint and each lineage is a path, so each x i x_i x i has at most one copy at any instant. □ \square □
Proof of Theorem 17 . (i). The RAM controller writes each delivered block to address i i i , taken from a public counter, and evicts it; in the read phase it reads address i i i into its one slot and emits. This uses C = 1 C = 1 C = 1 and 2 n 2n 2 n transfers.
(ii), lower bound. Fix a correct machine and the input of the lemma, and work with the single-copy sequence, in which at every instant each x i x_i x i is in a slot, at one stack position, or already emitted. Let T w T_w T w be the end of the write phase and let the stack at T w T_w T w hold b 1 , … , b m b_1,\ldots,b_m b 1 , … , b m from bottom to top. If m = 0 m = 0 m = 0 , all n n n blocks are in slots at T w T_w T w , since nothing has been emitted, so n ≤ C ≤ 2 C − 1 n \le C \le2C - 1 n ≤ C ≤ 2 C − 1 . Otherwise let t 1 t_1 t 1 be the instant of the last Push of b 1 b_1 b 1 before T w T_w T w and t 2 t_2 t 2 the instant of the first Pop of b 1 b_1 b 1 after T w T_w T w . Then b 1 b_1 b 1 is in the stack throughout [ t 1 , t 2 ] [t_1,t_2] [ t 1 , t 2 ] : it is in the stack at T w T_w T w and t 1 t_1 t 1 is its last push before T w T_w T w , so it is not popped in ( t 1 , T w ] (t_1,T_w] ( t 1 , T w ] , and t 2 t_2 t 2 is its first pop after T w T_w T w . It occupies the bottom position at T w T_w T w , and the positions below a resident block never change; so the stack is empty just before t 1 t_1 t 1 , and just before t 2 t_2 t 2 it consists of b 1 b_1 b 1 alone. Write idx ( x i ) = i \operatorname{idx}(x_i)=i idx ( x i ) = i and split the other n − 1 n-1 n − 1 blocks into A < = { x : idx ( x ) < idx ( b 1 ) } A_{<}=\{x:\operatorname{idx}(x)<\operatorname{idx}(b_1)\} A < = { x : idx ( x ) < idx ( b 1 )} and A > = { x : idx ( x ) > idx ( b 1 ) } A_{>}=\{x:\operatorname{idx}(x)>\operatorname{idx}(b_1)\} A > = { x : idx ( x ) > idx ( b 1 )} .
Just before t 1 t_1 t 1 , every block of A < A_{<} A < has been delivered, because deliveries are in index order and b 1 b_1 b 1 has been delivered; none has been emitted, this being the write phase; and none is in the stack, which is empty. So the blocks of A < ∪ { b 1 } A_{<}\cup\{b_1\} A < ∪ { b 1 } occupy distinct slots, and ∣ A < ∣ + 1 ≤ C |A_{<}|+1\le C ∣ A < ∣ + 1 ≤ C .
Just after t 2 t_2 t 2 , b 1 b_1 b 1 has been popped into a slot and has not been emitted, having been in the stack since t 1 t_1 t 1 ; emissions are in index order, so no block of A > A_{>} A > has been emitted; and the stack is empty. So the blocks of A > ∪ { b 1 } A_{>}\cup\{b_1\} A > ∪ { b 1 } occupy distinct slots, and ∣ A > ∣ + 1 ≤ C |A_{>}|+1\le C ∣ A > ∣ + 1 ≤ C .
Adding the two counts, n + 1 = ∣ A < ∣ + ∣ A > ∣ + 2 ≤ 2 C n+1=|A_{<}|+|A_{>}|+2\le2C n + 1 = ∣ A < ∣ + ∣ A > ∣ + 2 ≤ 2 C , that is, C ≥ ( n + 1 ) / 2 C\ge(n+1)/2 C ≥ ( n + 1 ) /2 .
(ii), upper bound. Let n ≤ 2 C − 1 n\le2C-1 n ≤ 2 C − 1 ; if n ≤ C n\le C n ≤ C , keep every block in context. Otherwise deliver x 1 , … , x C x_1,\ldots,x_C x 1 , … , x C into the C C C slots and push them in the order x C , … , x 1 x_C,\ldots,x_1 x C , … , x 1 , so that x 1 x_1 x 1 is on top and the context is empty; deliver x C + 1 , … , x n x_{C+1},\ldots,x_n x C + 1 , … , x n into n − C ≤ C − 1 n-C\le C-1 n − C ≤ C − 1 slots. In the read phase pop x 1 x_1 x 1 into the free slot and emit it, then x 2 x_2 x 2 , and so on up to x C x_C x C , and finally emit the buffered blocks in order. The schedule is fixed in advance and inspects nothing.
(iii). Argue on the run itself, not on the single-copy sequence: deleting a push would violate the streaming clause. Under copy-free streaming each x i x_i x i has a single copy at T w T_w T w ; for i < n i<n i < n it was pushed before x i + 1 x_{i+1} x i + 1 was delivered and never popped, so at T w T_w T w the stack holds x 1 , … , x n − 1 x_1,\ldots,x_{n-1} x 1 , … , x n − 1 in index order from the bottom, constant blocks possibly interleaved, and x n x_n x n is on the stack above them or still in its delivery slot; the context holds no other input block. The first emission is of x 1 x_1 x 1 and needs a copy of x 1 x_1 x 1 in a slot, hence a pop of x 1 x_1 x 1 ; let t 2 t_2 t 2 be the first one. Just before t 2 t_2 t 2 nothing is above x 1 x_1 x 1 on the stack, so every copy of x 2 , … , x n x_2,\ldots,x_n x 2 , … , x n , whether original or made after T w T_w T w , is off the stack, popped and not pushed back or never pushed; none of these blocks has been emitted, since x 1 x_1 x 1 has not; and each still has a copy, by value provenance, which is therefore in a context slot. These n − 1 n-1 n − 1 slots and the free slot that receives x 1 x_1 x 1 at t 2 t_2 t 2 give n ≤ C n\le C n ≤ C . Conversely, with C = n C=n C = n the read phase pops all n n n blocks into the n n n slots and emits them in order. The copy-free schedule uses Q b l k = Q = 2 n Q_{\mathrm{blk}}=Q=2n Q blk = Q = 2 n stack operations; the buffered schedule of (ii) uses 2 C 2C 2 C when C < n ≤ 2 C − 1 C<n\le2C-1 C < n ≤ 2 C − 1 and none when n ≤ C n\le C n ≤ C . The storage-optimal construction, with S ≥ ( n − C ) + S\ge(n-C)_{+} S ≥ ( n − C ) + and 2 ( n − C ) + 2(n-C)_{+} 2 ( n − C ) + operations, is Corollary 19. □ \square □
Remark 6 (The buffered upper bound is tight). Buffering arrivals before pushing them, or retaining copies of the first C − 1 C-1 C − 1 , halves the copy-free streaming requirement, which is why Theorem 17 states the two regimes separately: C = n C=n C = n against C = ⌈ ( n + 1 ) / 2 ⌉ C=\lceil(n+1)/2\rceil C = ⌈( n + 1 ) /2 ⌉ . The lower bound of (ii) counts the context at two instants, the last push and the first pop of the bottom block: every block of smaller index at the first, every block of larger index at the second, and the bottom block at both. The buffered schedule, whose bottom block is x C x_C x C , meets both counts with equality (x 1 , … , x C x_1,\ldots,x_C x 1 , … , x C resident before the first push; x C , … , x 2 C − 1 x_C,\ldots,x_{2C-1} x C , … , x 2 C − 1 resident after its pop), so no schedule, content-dependent or not, does better. This pins the requirement at ⌈ ( n + 1 ) / 2 ⌉ \lceil(n+1)/2\rceil ⌈( n + 1 ) /2 ⌉ blocks, against C = 1 C=1 C = 1 for ram. Two stacks would remove it (push each arrival on the first; in the read phase pop all n n n onto the second and pop them again, emitting: C = 1 C=1 C = 1 and 4 n 4n 4 n operations), so the separation is between one stack and either two stacks or random access, not between stacks and random access.
Corollary 19 (Exact context–stack–traffic trade-off). Under the hypotheses of Theorem 17 , a one-STACK LAM with context C C C and stack capacity S S S solves FIFOn _n n if and only if C ≥ ⌈ ( n + 1 ) / 2 ⌉ C\ge\lceil(n+1)/2\rceil C ≥ ⌈( n + 1 ) /2 ⌉ and S ≥ max { n − C , 0 } S\ge\max\{n-C,0\} S ≥ max { n − C , 0 } , and every such machine makes at least 2 max { n − C , 0 } 2\max\{n-C,0\} 2 max { n − C , 0 } pushes and pops; a content-blind schedule attains both bounds.
Proof. Necessity of C ≥ ⌈ ( n + 1 ) / 2 ⌉ C\ge\lceil(n+1)/2\rceil C ≥ ⌈( n + 1 ) /2 ⌉ is Theorem 17 (ii). Nothing is emitted during the write phase and no block is manufactured (no model or tool call; constants lie in K 0 K_0 K 0 , disjoint from the input), so at the end of the write phase every x i x_i x i has a copy in a slot or on the stack, and at most C C C of the n n n blocks have a copy in a slot; hence at least m : = max { n − C , 0 } m:=\max\{n-C,0\} m := max { n − C , 0 } blocks are on the stack only, S ≥ m S\ge m S ≥ m , and each of them was pushed at least once and must be popped before it is emitted, giving at least 2 m 2m 2 m pushes and pops. For sufficiency let m > 0 m>0 m > 0 , so that m ≤ C − 1 m\le C-1 m ≤ C − 1 : keep x 1 x_1 x 1 in a slot, buffer x 2 , … , x m + 1 x_2,\ldots,x_{m+1} x 2 , … , x m + 1 as they arrive (with m + 1 ≤ C m+1\le C m + 1 ≤ C slots), push them in the order x m + 1 , … , x 2 x_{m+1},\ldots,x_2 x m + 1 , … , x 2 , which leaves x 2 x_2 x 2 on top, and buffer x m + 2 , … , x n x_{m+2},\ldots,x_n x m + 2 , … , x n , which together with x 1 x_1 x 1 occupy n − m = C n-m=C n − m = C slots. In the read phase emit x 1 x_1 x 1 , then pop and emit x 2 , … , x m + 1 x_2,\ldots,x_{m+1} x 2 , … , x m + 1 in turn, then emit x m + 2 , … , x n x_{m+2},\ldots,x_n x m + 2 , … , x n : m m m pushes, m m m pops, stack height m m m , and no block content is read. ◻
Proof of Theorem 3
Proof. The bit-reversal graph Δ n r e v \Delta_n^{\mathrm{rev}} Δ n rev has two rows u 0 , … , u n − 1 u_0,\ldots,u_{n-1} u 0 , … , u n − 1 and w 0 , … , w n − 1 w_0,\ldots,w_{n-1} w 0 , … , w n − 1 , path edges along each row, and crossing edges ( u i , w r e v ( i ) ) (u_i,w_{\mathrm{rev}(i)}) ( u i , w rev ( i ) ) . It has one source u 0 u_0 u 0 , one sink w n − 1 w_{n-1} w n − 1 , 2 n 2n 2 n vertices and maximum in-degree two. The S ≥ n S \ge n S ≥ n machine of the last claim is a memory-initialized vertex-granular G G G -evaluation and the machines of the ( C , S ) (C,S) ( C , S ) law are input-delivered vertex-granular G G G -evaluations (§ 4 ): all compute each vertex by one call on blocks standing for its predecessors, use no Const, and end with the sink resident or stored; the latter hold no source in M M M at the start and receive u 0 u_0 u 0 exactly once by Input.
Persistent memory. Let S ≥ n S \ge n S ≥ n . A topological RAM schedule computes every vertex once, keeps the current u i u_i u i or w j w_j w j resident, stores each u i u_i u i after computing it and loads u r e v ( j ) u_{\mathrm{rev}(j)} u rev ( j ) before computing w j w_j w j : N = 2 n − 1 N=2n-1 N = 2 n − 1 , Q b l k = 2 n Q_{\mathrm{blk}}=2n Q blk = 2 n , C = 4 C=4 C = 4 . This is a uniform family-level schedule: public structural counters enumerate the rows, and the fixed permutation r e v ( i ) \mathrm{rev}(i) rev ( i ) is applied only to the public index i i i ; no block content is inspected.
Lower bound for capacities ( C , S ) (C,S) ( C , S ) . The input stream consists of the single source block, delivered once by Input; the source, being an input rather than a call output, cannot be regenerated once every copy of it is gone, so a correct run keeps a copy in X X X or M M M until the last call that reads it; the theorem needs no residency hypothesis. Map the run to the black pebble game by placing a pebble on a vertex exactly while some block standing for it (by provenance) is in X X X or M M M . At most C + S C+S C + S vertices are pebbled at any instant. A vertex becomes pebbled only through the Input, which places the source once, or through the call computing it, whose arguments, blocks for its predecessors, are resident at that moment; loads, stores and slot copies move no pebble, and a pebble is removed when the last copy is evicted. This is the event mapping of Theorem 1(i) with the two colours merged (Remark 1), and it yields a legal pebbling of the ordinary black pebble game with at most C + S C+S C + S pebbles in which the source is placed exactly once and every other placement is one oracle call. The order n 2 / s n^2/s n 2 / s of the call–space trade-off for bit reversal is classical [19 ] ; we prove the bound we use directly, with an explicit constant, so that no pebble range or move convention is imported.
Lemma 20 (Bit-reversal trade-off). Let n = 2 m n=2^m n = 2 m , 2 ≤ s ≤ n / 2 2 \le s \le n/2 2 ≤ s ≤ n /2 , and let L L L be the least power of two with L ≥ 2 s L \ge2s L ≥ 2 s . Every pebbling of Δ n r e v \Delta_n^{\mathrm{rev}} Δ n rev with at most s s s black pebbles that places a pebble on every w j w_j w j , recomputation and repeated placements on the source allowed, makes at least n 2 / ( 4 L ) > n 2 / ( 16 s ) n^2/(4L)>n^2/(16s) n 2 / ( 4 L ) > n 2 / ( 16 s ) placements on the row u 0 , … , u n − 1 u_0,\ldots,u_{n-1} u 0 , … , u n − 1 (n 2 / ( 8 s ) n^2/(8s) n 2 / ( 8 s ) when s s s is a power of two).
Proof. Let ℓ ( j ) \ell(j) ℓ ( j ) be the time of the first placement on w j w_j w j . Since a placement on w j w_j w j requires w j − 1 w_{j-1} w j − 1 pebbled, ℓ ( 0 ) < ℓ ( 1 ) < ⋯ < ℓ ( n − 1 ) \ell(0)<\ell(1)<\cdots<\ell(n-1) ℓ ( 0 ) < ℓ ( 1 ) < ⋯ < ℓ ( n − 1 ) . Write L = 2 a L=2^a L = 2 a ; since 2 s ≤ n 2s \le n 2 s ≤ n and n n n is a power of two, 4 ≤ L ≤ n 4 \le L \le n 4 ≤ L ≤ n , and L < 4 s L<4s L < 4 s . Partition the w w w -row into the n / L n/L n / L windows W h = { w h L , … , w ( h + 1 ) L − 1 } W_h=\{w_{hL},\ldots,w_{(h+1)L-1}\} W h = { w h L , … , w ( h + 1 ) L − 1 } and let I h I_h I h be the time interval ( ℓ ( h L ) , ℓ ( ( h + 1 ) L − 1 ) ] (\ell(hL),\ell((h+1)L-1)] ( ℓ ( h L ) , ℓ (( h + 1 ) L − 1 )] ; the intervals are pairwise disjoint because ℓ ( ( h + 1 ) L − 1 ) < ℓ ( ( h + 1 ) L ) \ell((h+1)L-1)<\ell((h+1)L) ℓ (( h + 1 ) L − 1 ) < ℓ (( h + 1 ) L ) .
Fix a window. Two indices j ≠ j ′ j\ne j' j = j ′ in it share their top m − a m-a m − a bits and differ in their low a a a bits, so r e v ( j ) \mathrm{rev}(j) rev ( j ) and r e v ( j ′ ) \mathrm{rev}(j') rev ( j ′ ) share their low m − a m-a m − a bits and differ in their top a a a bits: ∣ r e v ( j ) − r e v ( j ′ ) ∣ ≥ 2 m − a = n / L |\mathrm{rev}(j)-\mathrm{rev}(j')|\ge2^{m-a}=n/L ∣ rev ( j ) − rev ( j ′ ) ∣ ≥ 2 m − a = n / L . Write r 1 < ⋯ < r L r_1<\cdots<r_L r 1 < ⋯ < r L for the values r e v ( j ) \mathrm{rev}(j) rev ( j ) , j ∈ W h j\in W_h j ∈ W h , set r 0 = − 1 r_0=-1 r 0 = − 1 , and let J i = ( r i − 1 , r i ] J_i=(r_{i-1},r_i] J i = ( r i − 1 , r i ] , i = 1 , … , L i=1,\ldots,L i = 1 , … , L , be the resulting disjoint intervals of u u u -indices, so that ∣ J i ∣ ≥ n / L |J_i|\ge n/L ∣ J i ∣ ≥ n / L for i ≥ 2 i\ge2 i ≥ 2 . Let A A A be the set of u u u -indices carrying a pebble immediately before the placement at time ℓ ( h L ) \ell(hL) ℓ ( h L ) (“pebbled at time ℓ ( j ) \ell(j) ℓ ( j ) ” likewise means immediately before the placement of w j w_j w j ), ∣ A ∣ ≤ s |A|\le s ∣ A ∣ ≤ s , and let P P P be the set of u u u -indices receiving a placement during I h I_h I h . Call i i i blocked if J i J_i J i meets A A A . The J i J_i J i being disjoint, at most s s s indices are blocked, so at least L − s − 1 ≥ L / 4 L-s-1\ge L/4 L − s − 1 ≥ L /4 indices i ≥ 2 i\ge2 i ≥ 2 are unblocked.
Let i ≥ 2 i\ge2 i ≥ 2 be unblocked, and let j ∈ W h j\in W_h j ∈ W h have r e v ( j ) = r i \mathrm{rev}(j)=r_i rev ( j ) = r i . The index of r e v ( h L ) \mathrm{rev}(hL) rev ( h L ) is blocked, since u r e v ( h L ) u_{\mathrm{rev}(hL)} u rev ( h L ) carries a pebble at time ℓ ( h L ) \ell(hL) ℓ ( h L ) , so j ≠ h L j\ne hL j = h L and ℓ ( j ) ∈ I h \ell(j)\in I_h ℓ ( j ) ∈ I h ; as r i ∉ A r_i\notin A r i ∈ / A while u r i u_{r_i} u r i is pebbled at time ℓ ( j ) \ell(j) ℓ ( j ) , the vertex u r i u_{r_i} u r i was placed during I h I_h I h . Moreover every x ≥ r i x\ge r_i x ≥ r i lies in P P P , as the placement on u x u_x u x found u x − 1 u_{x-1} u x − 1 pebbled, by a pebble either present at time ℓ ( h L ) \ell(hL) ℓ ( h L ) , so that x − 1 ∈ A x-1\in A x − 1 ∈ A , or placed during I h I_h I h , so that x − 1 ∈ P x-1\in P x − 1 ∈ P . Descending from r i r_i r i , and since J i J_i J i contains no element of A A A , all of J i J_i J i lies in P P P . Hence ∣ P ∣ ≥ ∑ i unblocked , i ≥ 2 ∣ J i ∣ ≥ ( L − s − 1 ) ( n / L ) ≥ n / 4 |P|\ge\sum_{i\text{ unblocked},\,i\ge2}|J_i|\ge(L-s-1)(n/L)\ge n/4 ∣ P ∣ ≥ ∑ i unblocked , i ≥ 2 ∣ J i ∣ ≥ ( L − s − 1 ) ( n / L ) ≥ n /4 , and at least n / 4 n/4 n /4 placements on the u u u -row fall in I h I_h I h . Summing over the n / L n/L n / L disjoint intervals gives at least n 2 / ( 4 L ) > n 2 / ( 16 s ) n^2/(4L)>n^2/(16s) n 2 / ( 4 L ) > n 2 / ( 16 s ) placements, and n 2 / ( 8 s ) n^2/(8s) n 2 / ( 8 s ) when L = 2 s L=2s L = 2 s . ◻
The induced pebbling of the run uses s = C + S s=C+S s = C + S pebbles, and every placement on the u u u -row other than the single Input delivery is a model call. For C + S ≤ n / 2 C+S\le n/2 C + S ≤ n /2 the lemma gives N > n 2 / ( 16 ( C + S ) ) − 1 N>n^2/(16(C+S))-1 N > n 2 / ( 16 ( C + S )) − 1 ; for every C C C and S S S , each of the 2 n − 1 2n-1 2 n − 1 internal vertices needs a call, N ≥ 2 n − 1 N\ge2n-1 N ≥ 2 n − 1 . Averaging the two bounds, N ≥ n 2 / ( 32 ( C + S ) ) + n − 1 ≥ n 2 / ( C + S ) + n ) / 32 N\ge n^2/(32(C+S))+n-1\ge n^2/(C+S)+n)/32 N ≥ n 2 / ( 32 ( C + S )) + n − 1 ≥ n 2 / ( C + S ) + n ) /32 for C + S ≤ n / 2 C+S\le n/2 C + S ≤ n /2 , since n − 1 ≥ n / 32 n-1\ge n/32 n − 1 ≥ n /32 ; for C + S > n / 2 C+S>n/2 C + S > n /2 one has n 2 / ( C + S ) < 2 n n^2/(C+S)<2n n 2 / ( C + S ) < 2 n , so ( n 2 / ( C + S ) + n ) / 32 < 3 n / 32 ≤ 2 n − 1 (n^2/(C+S)+n)/32<3n/32\le2n-1 ( n 2 / ( C + S ) + n ) /32 < 3 n /32 ≤ 2 n − 1 . Hence N ≥ ( n 2 / ( C + S ) + n ) / 32 N\ge(n^2/(C+S)+n)/32 N ≥ ( n 2 / ( C + S ) + n ) /32 for every n ≥ 2 n\ge2 n ≥ 2 , C ≥ 2 C\ge2 C ≥ 2 and S ≥ 0 S\ge0 S ≥ 0 , the lower bound needing no hypothesis beyond C ≥ 2 C\ge2 C ≥ 2 ; the upper bound below needs C ≥ 3 C\ge3 C ≥ 3 and C + S ≥ 4 C+S\ge4 C + S ≥ 4 .
Feasibility and the constant. Placing w j w_j w j for j ≥ 1 j\ge1 j ≥ 1 needs w j − 1 w_{j-1} w j − 1 , u r e v ( j ) u_{\mathrm{rev}(j)} u rev ( j ) and a slot for the result, so C ≥ 3 C\ge3 C ≥ 3 is necessary for every S S S ; at S = 0 S=0 S = 0 and n ≥ 4 n\ge4 n ≥ 4 , C = 3 C=3 C = 3 is insufficient: when w j w_j w j is placed the three slots hold w 0 w_0 w 0 , u n / 2 u_{n/2} u n /2 and w 1 w_1 w 1 , so the source has been evicted and can never return, and u r e v ( 2 ) = u n / 4 u_{\mathrm{rev}(2)}=u_{n/4} u rev ( 2 ) = u n /4 , which precedes w n / 2 w_{n/2} w n /2 on its chain, can no longer be produced. With S ≥ 1 S \ge1 S ≥ 1 and C = 3 C = 3 C = 3 the schedule below works with every checkpoint stored, so for n ≥ 4 n \ge4 n ≥ 4 an input-delivered vertex-granular G G G -evaluation exists exactly when C ≥ 3 C \ge3 C ≥ 3 and C + S ≥ 4 C + S \ge4 C + S ≥ 4 , the hypothesis of the theorem, and the upper bound below is proved on this whole feasible region (C ≥ 4 C \ge4 C ≥ 4 is its threshold at S = 0 S = 0 S = 0 ). For Lemma 20’s u u u -row placement bound, exhaustive search over pebble configurations gives minimum u u u -row placement counts of 100, 49, 392 and 187 at ( n , s ) = ( 16 , 3 ) , ( 16 , 4 ) , ( 32 , 3 ) (n,s) = (16, 3), (16, 4), (32, 3) ( n , s ) = ( 16 , 3 ) , ( 16 , 4 ) , ( 32 , 3 ) and ( 32 , 4 ) (32, 4) ( 32 , 4 ) , against 5.3, 4, 21.3 and 16 from n 2 / ( 16 s ) n^2/(16s) n 2 / ( 16 s ) and 8, 8, 32, 32 from n 2 / ( 4 L ) n^2/(4L) n 2 / ( 4 L ) . The theorem’s 1 / 32 1/32 1/32 call constant follows by combining this placement bound with the mandatory internal-vertex calls (below).
Upper bound for capacities ( C , S ) (C,S) ( C , S ) . The bound is matched by an elementary checkpoint schedule, so no strategy is imported. Let C ≥ 3 C \ge3 C ≥ 3 , C + S ≥ 4 C + S \ge4 C + S ≥ 4 and k = min { n , C − 3 + S } ≥ 1 k = \min\{n, C - 3 + S\} \ge1 k = min { n , C − 3 + S } ≥ 1 . Take the checkpoints u c ℓ u_{c_\ell} u c ℓ , c ℓ = ⌊ ℓ n / k ⌋ c_\ell= \lfloor\ell n/k \rfloor c ℓ = ⌊ ℓ n / k ⌋ , ℓ = 0 , … , k − 1 \ell= 0, \ldots, k - 1 ℓ = 0 , … , k − 1 ; up to C − 3 C - 3 C − 3 of them are kept resident in reserved slots, the source c 0 = 0 c_0 = 0 c 0 = 0 among them when C ≥ 4 C \ge4 C ≥ 4 , in its slot throughout, and the remaining max { k − C + 3 , 0 } ≤ S \max\{k - C + 3, 0\} \le S max { k − C + 3 , 0 } ≤ S are stored in M M M when reached (at C = 3 C = 3 C = 3 every checkpoint is stored, the source immediately on delivery). First compute u 1 , … , u n − 1 u_1, \ldots, u_{n-1} u 1 , … , u n − 1 along the chain with two sliding slots, keeping or storing each checkpoint as it is reached: at most C − 1 C - 1 C − 1 resident blocks and n − 1 n - 1 n − 1 calls. Then for j = 0 , … , n − 1 j = 0, \ldots, n - 1 j = 0 , … , n − 1 compute w j w_j w j : let ℓ \ell ℓ be the largest index with c ℓ ≤ rev ( j ) c_\ell\le\operatorname{rev}(j) c ℓ ≤ rev ( j ) , load u c ℓ u_{c_\ell} u c ℓ into a sliding slot if it is stored, recompute u c ℓ + 1 , … , u rev ( j ) u_{c_\ell+1}, \ldots, u_{\operatorname{rev}(j)} u c ℓ + 1 , … , u rev ( j ) from it with the two sliding slots, at most ⌈ n / k ⌉ − 1 \lceil n/k \rceil- 1 ⌈ n / k ⌉ − 1 calls since rev ( j ) − c ℓ ≤ ⌈ n / k ⌉ − 1 \operatorname{rev}(j) - c_\ell\le\lceil n/k \rceil- 1 rev ( j ) − c ℓ ≤ ⌈ n / k ⌉ − 1 , and call once with arguments w j − 1 w_{j-1} w j − 1 (absent for j = 0 j = 0 j = 0 ) and u rev ( j ) u_{\operatorname{rev}(j)} u rev ( j ) . At the moment a block is placed the resident blocks are the resident checkpoints, at most one sliding block, w j − 1 w_{j-1} w j − 1 and the new block, at most C C C ; afterwards w j − 1 w_{j-1} w j − 1 and the sliding block are evicted. The run uses no Const, its traversal is generated from public structural indices, and it ends with w n − 1 w_{n-1} w n − 1 resident. Its call count is at most n − 1 + n ⌈ n / k ⌉ n - 1 + n\lceil n/k\rceil n − 1 + n ⌈ n / k ⌉ , every non-source placement being one fixed-oracle call, and its traffic is at most k k k stores and n n n loads, Q b l k ≤ 2 n Q_{\mathrm{blk}} \le2n Q blk ≤ 2 n . If C + S − 3 ≥ n C + S - 3 \ge n C + S − 3 ≥ n then k = n k = n k = n and N ≤ 2 n − 1 N \le2n - 1 N ≤ 2 n − 1 ; otherwise ⌈ n / k ⌉ ≤ n / ( C + S − 3 ) + 1 ≤ 4 n / ( C + S ) + 1 \lceil n/k\rceil\le n/(C + S - 3) + 1 \le4n/(C + S) + 1 ⌈ n / k ⌉ ≤ n / ( C + S − 3 ) + 1 ≤ 4 n / ( C + S ) + 1 , using C + S ≥ 4 C + S \ge4 C + S ≥ 4 , so N ≤ 4 n 2 / ( C + S ) + 2 n − 1 ≤ 4 ( n 2 / ( C + S ) + n ) N \le4n^2/(C + S) + 2n - 1 \le4(n^2/(C + S) + n) N ≤ 4 n 2 / ( C + S ) + 2 n − 1 ≤ 4 ( n 2 / ( C + S ) + n ) . With S = 0 S = 0 S = 0 this is the k = C − 3 k = C - 3 k = C − 3 schedule with n − 1 + n ⌈ n / ( C − 3 ) ⌉ n - 1 + n\lceil n/(C - 3)\rceil n − 1 + n ⌈ n / ( C − 3 )⌉ calls; with S ≥ n S \ge n S ≥ n it stores every u i u_i u i and makes 2 n − 1 2n - 1 2 n − 1 calls. This is a polynomial call–space trade-off, not an exponential one. □
Reliable computation
Throughout, a chain of n n n dependent transitions is executed; given a correct input, a call returns the correct block with probability 1 − ε 1 - \varepsilon 1 − ε ; the correct block has probability p c p_c p c and every incorrect block probability at most p c − γ p_c - \gamma p c − γ ; errors are absorbing.
Theorem 21 (Sampling amplification). Suppose that at most A A A incorrect alternatives have nonzero probability at each correct state and each has probability at most p c − γ p_c - \gamma p c − γ . Taking a plurality vote over m = O ( γ − 2 log ( A n / δ ) ) m = O(\gamma^{-2}\log(An/\delta)) m = O ( γ − 2 log ( A n / δ )) independent samples per transition yields overall failure probability at most δ \delta δ using N = O ( n γ − 2 log ( A n / δ ) ) N = O(n\gamma^{-2}\log(An/\delta)) N = O ( n γ − 2 log ( A n / δ )) model calls.
Proof of Theorem 21. Fix a step and draw m m m i.i.d. samples. Let p ^ y \hat p_y p ^ y be the empirical frequency of block y y y . By Hoeffding, Pr [ p ^ y − p ^ y ∗ ≥ 0 ] ≤ exp ( − m γ 2 / 2 ) \Pr[\hat p_y - \hat p_{y^*} \ge0] \le\exp(-m\gamma^2/2) Pr [ p ^ y − p ^ y ∗ ≥ 0 ] ≤ exp ( − m γ 2 /2 ) for each of the at most A A A incorrect alternatives y y y , since E [ p ^ y ∗ − p ^ y ] ≥ γ \mathbb{E}[\hat p_{y^*} - \hat p_y] \ge\gamma E [ p ^ y ∗ − p ^ y ] ≥ γ and the difference is an average of m m m i.i.d. variables in [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] . A union bound over y y y gives per-step error ≤ A exp ( − m γ 2 / 2 ) \le A\exp(-m\gamma^2/2) ≤ A exp ( − m γ 2 /2 ) , which is ≤ δ / n \le\delta/n ≤ δ / n for m ≥ 2 γ − 2 log ( A n / δ ) m \ge2\gamma^{-2}\log(An/\delta) m ≥ 2 γ − 2 log ( A n / δ ) . A union bound over the n n n steps gives overall failure ≤ δ \le\delta ≤ δ , at N = n m = O ( n γ − 2 log ( A n / δ ) ) N = nm = O(n\gamma^{-2}\log(An/\delta)) N = nm = O ( n γ − 2 log ( A n / δ )) . □
Proof of Theorem 4. Hard family without a lookahead signal. Consider the complete binary tree of depth n n n , with a node represented by its root-to-node bit string (so the direct encoding uses b ( n ) = Θ ( n ) b(n) = \Theta(n) b ( n ) = Θ ( n ) bits at maximum depth). Every internal node u u u carries an independent hidden bit θ u ∼ Ber ( 1 / 2 ) \theta_u \sim\operatorname{Ber}(1/2) θ u ∼ Ber ( 1/2 ) . A call at u u u returns child u θ u u\theta_u u θ u with probability p c = 1 2 + γ 2 p_c = \frac{1}{2} + \frac{\gamma}{2} p c = 2 1 + 2 γ and the other child u ( 1 − θ u ) u(1 - \theta_u) u ( 1 − θ u ) with probability 1 2 − γ 2 \frac{1}{2} - \frac{\gamma}{2} 2 1 − 2 γ . Repeated calls at the same node are conditionally i.i.d. given θ u \theta_u θ u . Starting at the root, the designated correct path is obtained by following the preferred child θ u \theta_u θ u at every visited correct-path node.
Crucially, an erroneous commitment does not trigger a special oracle output. The reached off-path node has its own fresh independent θ u \theta_u θ u and exactly the same two-candidate sampling law as every other node. Hence future observations are distributionally ordinary and independent of the hidden bit at the node where the wrong turn occurred. Tree branches never merge, so a wrong commitment is nevertheless absorbing for the final path. This removes the one-step lookahead diagnostic that would arise if wrong prefixes emitted a distinguished failure symbol.
At stage j j j , conditioned on all previous commitments being correct, let H j − 1 H_{j-1} H j − 1 denote the full pre-stage history. The current node u u u is then fixed by H j − 1 H_{j-1} H j − 1 , while θ u \theta_u θ u is still uniform and independent of that history. A stage-local strategy draws a stopping-time number N j N_j N j of samples at u u u before committing. For a fixed history h h h put
a j ( h ) = ( 1 2 E 0 [ N j ∣ H j − 1 = h , S j − 1 ] + E 1 [ N j ∣ H j − 1 = h , S j − 1 ] ) . a_j(h) = \left(\frac{1}{2}\mathbb{E}_0[N_j \mid H_{j-1} = h, S_{j-1}] + \mathbb{E}_1[N_j \mid H_{j-1} = h, S_{j-1}]\right). a j ( h ) = ( 2 1 E 0 [ N j ∣ H j − 1 = h , S j − 1 ] + E 1 [ N j ∣ H j − 1 = h , S j − 1 ] ) .
Distinguishing the two possible preferred-child laws is exactly testing Ber ( 1 2 + γ 2 ) \operatorname{Ber}\left(\frac{1}{2} + \frac{\gamma}{2}\right) Ber ( 2 1 + 2 γ ) against Ber ( 1 2 − γ 2 ) \operatorname{Ber}\left(\frac{1}{2} - \frac{\gamma}{2}\right) Ber ( 2 1 − 2 γ ) . Their directed KL divergence is
D = γ log 1 + γ 1 − γ ≤ 3 γ 2 ( γ ≤ 1 2 ) . D = \gamma\log\frac{1 + \gamma}{1 - \gamma} \le3\gamma^2 \qquad\left(\gamma\le\frac{1}{2}\right). D = γ log 1 − γ 1 + γ ≤ 3 γ 2 ( γ ≤ 2 1 ) .
Fix h h h and let P 0 , P 1 P_0,P_1 P 0 , P 1 be the laws of the stopped sample sequence at u u u under θ u = 0 \theta_u=0 θ u = 0 and θ u = 1 \theta_u=1 θ u = 1 , with expected lengths m 0 = E 0 [ N j ∣ H j − 1 = h , S j − 1 ] m_0=\mathbb{E}_0[N_j\mid H_{j-1}=h,S_{j-1}] m 0 = E 0 [ N j ∣ H j − 1 = h , S j − 1 ] and m 1 = E 1 [ N j ∣ H j − 1 = h , S j − 1 ] m_1=\mathbb{E}_1[N_j\mid H_{j-1}=h,S_{j-1}] m 1 = E 1 [ N j ∣ H j − 1 = h , S j − 1 ] , so that a j ( h ) = ( m 0 + m 1 ) / 2 a_j(h)=(m_0+m_1)/2 a j ( h ) = ( m 0 + m 1 ) /2 . If m 0 m_0 m 0 or m 1 m_1 m 1 is infinite then E [ N ] = ∞ \mathbb{E}[N]=\infty E [ N ] = ∞ and there is nothing to prove, so let both be finite. Wald’s identity [41 ] gives the two directed divergences of the stopped experiment, KL ( P 0 ∥ P 1 ) = D m 0 \operatorname{KL}(P_0\mathbin\Vert P_1)=Dm_0 KL ( P 0 ∥ P 1 ) = D m 0 and KL ( P 1 ∥ P 0 ) = D m 1 \operatorname{KL}(P_1\mathbin\Vert P_0)=Dm_1 KL ( P 1 ∥ P 0 ) = D m 1 (the per-sample divergence is D D D in both directions, the two Bernoulli laws being mirror images). The Bretagnolle–Huber inequality [42 ] , in the form of A. B. Tsybakov [43 Lemma 2.6 and Theorem 2.2] , applied to the commitment event A = { θ ^ j = 1 } A=\{\hat{\theta}_j=1\} A = { θ ^ j = 1 } once with ( P 0 , P 1 ) (P_0,P_1) ( P 0 , P 1 ) and once with the roles exchanged, gives P 0 ( A ) + P 1 ( A c ) ≥ 1 2 e − D m 0 P_0(A)+P_1(A^c)\ge\frac{1}{2}e^{-Dm_0} P 0 ( A ) + P 1 ( A c ) ≥ 2 1 e − D m 0 and P 0 ( A ) + P 1 ( A c ) ≥ 1 2 e − D m 1 P_0(A)+P_1(A^c)\ge\frac{1}{2}e^{-Dm_1} P 0 ( A ) + P 1 ( A c ) ≥ 2 1 e − D m 1 , hence P 0 ( A ) + P 1 ( A c ) ≥ 1 2 e − D min { m 0 , m 1 } ≥ 1 2 e − D a j ( h ) P_0(A)+P_1(A^c)\ge\frac{1}{2}e^{-D\min\{m_0,m_1\}}\ge\frac{1}{2}e^{-Da_j(h)} P 0 ( A ) + P 1 ( A c ) ≥ 2 1 e − D m i n { m 0 , m 1 } ≥ 2 1 e − D a j ( h ) , the minimum being at most the average; this is why the average stopped sample count a j ( h ) a_j(h) a j ( h ) suffices even when the two conditional expected counts differ. Since θ u \theta_u θ u is uniform given h h h , the error probability is half that sum:
Pr [ θ ^ j ≠ θ u ∣ H j − 1 = h , S j − 1 ] = 1 2 ( P 0 ( A ) + P 1 ( A c ) ) ≥ 1 4 e − D a j ( h ) . \Pr[\hat{\theta}_j\ne\theta_u\mid H_{j-1}=h,S_{j-1}]=\frac{1}{2}\left(P_0(A)+P_1(A^c)\right)\ge\frac{1}{4}e^{-Da_j(h)}. Pr [ θ ^ j = θ u ∣ H j − 1 = h , S j − 1 ] = 2 1 ( P 0 ( A ) + P 1 ( A c ) ) ≥ 4 1 e − D a j ( h ) .
Average over H j − 1 H_{j-1} H j − 1 and use Jensen’s inequality, since e − D x e^{-Dx} e − D x is convex. With a j = E [ a j ( H j − 1 ) ∣ S j − 1 ] a_j=\mathbb{E}[a_j(H_{j-1})\mid S_{j-1}] a j = E [ a j ( H j − 1 ) ∣ S j − 1 ] ,
e j ≔ Pr [ θ ^ j ≠ θ u ∣ S j − 1 ] ≥ 1 4 e − D a j . e_j\coloneqq\Pr[\hat{\theta}_j\ne\theta_u\mid S_{j-1}]\ge\frac{1}{4}e^{-Da_j}. e j : = Pr [ θ ^ j = θ u ∣ S j − 1 ] ≥ 4 1 e − D a j .
Let S j S_j S j be the event that the first j j j commitments follow the designated correct path. The events are nested and overall success is S n S_n S n . Therefore
1 − δ ≤ Pr [ S n ] = ∏ j = 1 n ( 1 − e j ) ≤ exp ( − 1 4 ∑ j = 1 n e − D a j ) . 1-\delta\le\Pr[S_n]=\prod_{j=1}^{n}(1-e_j)\le\exp\left(-\frac{1}{4}\sum_{j=1}^{n}e^{-Da_j}\right). 1 − δ ≤ Pr [ S n ] = j = 1 ∏ n ( 1 − e j ) ≤ exp ( − 4 1 j = 1 ∑ n e − D a j ) .
For δ ≤ 1 2 \delta\le\frac{1}{2} δ ≤ 2 1 , − log ( 1 − δ ) ≤ 2 δ -\log(1-\delta)\le2\delta − log ( 1 − δ ) ≤ 2 δ , so ∑ j e − D a j ≤ 8 δ \sum_{j}e^{-Da_j}\le8\delta ∑ j e − D a j ≤ 8 δ . By AM–GM,
∏ j = 1 n e − D a j ≤ ( 1 n ∑ j = 1 n e − D a j ) n ≤ ( 8 δ n ) n , \prod_{j=1}^{n}e^{-Da_j}\le\left(\frac{1}{n}\sum_{j=1}^{n}e^{-Da_j}\right)^n\le\left(\frac{8\delta}{n}\right)^n, j = 1 ∏ n e − D a j ≤ ( n 1 j = 1 ∑ n e − D a j ) n ≤ ( n 8 δ ) n ,
and hence
∑ j = 1 n a j ≥ n D log n 8 δ . \sum_{j=1}^{n}a_j\ge\frac{n}{D}\log\frac{n}{8\delta}. j = 1 ∑ n a j ≥ D n log 8 δ n .
Moreover Pr [ S j − 1 ] ≥ Pr [ S n ] ≥ 1 − δ \Pr[S_{j-1}]\ge\Pr[S_n]\ge1-\delta Pr [ S j − 1 ] ≥ Pr [ S n ] ≥ 1 − δ , and conditioned on S j − 1 S_{j-1} S j − 1 the hidden bit at the current node is uniform, so
E [ N ] ≥ ∑ j = 1 n E [ N j 1 S j − 1 ] = ∑ j = 1 n Pr [ S j − 1 ] a j ≥ ( 1 − δ ) ∑ j = 1 n a j . \mathbb{E}[N]\ge\sum_{j=1}^{n}\mathbb{E}[N_j\mathbf{1}_{S_{j-1}}]=\sum_{j=1}^{n}\Pr[S_{j-1}]a_j\ge(1-\delta)\sum_{j=1}^{n}a_j. E [ N ] ≥ j = 1 ∑ n E [ N j 1 S j − 1 ] = j = 1 ∑ n Pr [ S j − 1 ] a j ≥ ( 1 − δ ) j = 1 ∑ n a j .
Using δ ≤ 1 4 \delta\le\frac{1}{4} δ ≤ 4 1 and D ≤ 3 γ 2 D\le3\gamma^2 D ≤ 3 γ 2 gives
E [ N ] ≥ n 4 γ 2 log n 8 δ , \mathbb{E}[N]\ge\frac{n}{4\gamma^2}\log\frac{n}{8\delta}, E [ N ] ≥ 4 γ 2 n log 8 δ n ,
as claimed. For n ≥ 64 δ n\ge64\delta n ≥ 64 δ one has log n 8 δ ≥ 1 2 log n δ \log\frac{n}{8\delta}\ge\frac{1}{2}\log\frac{n}{\delta} log 8 δ n ≥ 2 1 log δ n , so the bound is at least n 8 γ 2 log n δ \frac{n}{8\gamma^2}\log\frac{n}{\delta} 8 γ 2 n log δ n , the stated order; since δ ≤ 1 4 \delta\le\frac{1}{4} δ ≤ 4 1 , every n ≥ 16 n\ge16 n ≥ 16 qualifies. For n ≤ 8 δ n\le8\delta n ≤ 8 δ the displayed bound is non-positive and the theorem is vacuous. □ \square □
Remark 7. The lower bound is intentionally scoped to the stage-local no-feedback class defined in § 7 . Adaptive sample counts may depend on the committed past and all current-stage samples; what is excluded is using later transitions to revise an earlier commitment. The binary-tree construction additionally ensures that later calls carry no distinguished off-path symbol, so an off-path trajectory is locally indistinguishable from the correct one and the restriction hides no lookahead signal.
Theorem 22 (Perfect local verification). With a perfect local verifier, fresh independent attempts, ε < 1 \varepsilon<1 ε < 1 and no cap on retries, sampling a transition until the verifier accepts terminates almost surely with zero error and E [ N m o d e l ] = E [ N v e r ] = n / ( 1 − ε ) \mathbb{E}[N_{\mathrm{model}}]=\mathbb{E}[N_{\mathrm{ver}}]=n/(1-\varepsilon) E [ N model ] = E [ N ver ] = n / ( 1 − ε ) and E [ C o s t ] = n ( 1 + c v ) / ( 1 − ε ) \mathbb{E}[\mathrm{Cost}]=n(1+c_v)/(1-\varepsilon) E [ Cost ] = n ( 1 + c v ) / ( 1 − ε ) , which is Θ ( n ) \Theta(n) Θ ( n ) for fixed ε < 1 \varepsilon<1 ε < 1 and c v c_v c v . On the hard family of Theorem 4 , this removes the Θ ( log ( n / δ ) ) \Theta(\log(n/\delta)) Θ ( log ( n / δ )) overhead of stage-local sampling for constant γ \gamma γ and c v c_v c v .
Proof of Theorem 22. With a perfect verifier the agent repeats a step until acceptance. Attempts are geometric with success probability 1 − ε 1-\varepsilon 1 − ε , so E [ N m o d e l ] = E [ N v e r ] = n / ( 1 − ε ) \mathbb{E}[N_{\mathrm{model}}]=\mathbb{E}[N_{\mathrm{ver}}]=n/(1-\varepsilon) E [ N model ] = E [ N ver ] = n / ( 1 − ε ) and E [ C o s t ] = n ( 1 + c v ) / ( 1 − ε ) \mathbb{E}[\mathrm{Cost}]=n(1+c_v)/(1-\varepsilon) E [ Cost ] = n ( 1 + c v ) / ( 1 − ε ) . No wrong state is propagated. On the binary-tree hard family of Theorem 4 , 1 − ε = ( 1 + γ ) / 2 1-\varepsilon=(1+\gamma)/2 1 − ε = ( 1 + γ ) /2 , so stage-local sampling-only strategies need a Θ ( log ( n / δ ) ) \Theta(\log(n/\delta)) Θ ( log ( n / δ )) factor more at constant γ , c v \gamma,c_v γ , c v . □ \square □
Proof of Theorem 5 . One attempt falls into three disjoint outcomes: correct and unanimously accepted with probability a t = ( 1 − ε ) ( 1 − p r ) t a_t=(1-\varepsilon)(1-p_r)^t a t = ( 1 − ε ) ( 1 − p r ) t , wrong and unanimously accepted with probability b t = ε p a t b_t=\varepsilon p_a^t b t = ε p a t , or rejected. The first accepted attempt therefore arrives after a geometric number of trials with parameter s t = a t + b t s_t = a_t + b_t s t = a t + b t and is wrong with conditional probability q t = b t / s t q_t = b_t/s_t q t = b t / s t . This is the per-transition law of the theorem, valid at every transition whose earlier accepted transitions are correct; a union bound over the first transition that accepts a wrong candidate gives chain failure at most n q t nq_t n q t without further assumption. Summing over n n n accepted steps gives the total call counts and weighted cost, and the summation uses that the attempt law is the same at every visited state; under that law the n n n accepted candidates are wrong independently with probability q t q_t q t each, so the chain fails with probability exactly 1 − ( 1 − q t ) n ≤ n q t 1-(1-q_t)^n \le nq_t 1 − ( 1 − q t ) n ≤ n q t . If the law may differ at a state reached through a false accept, the same computation applies conditioned on every earlier accepted transition being correct, an event of probability at least 1 − n q t 1-nq_t 1 − n q t : the number of rejected attempts at a stage is independent of whether its accepted candidate is correct (competing hazards), so the conditioning changes no attempt count, and on that event every visited state is correct.
For t = 1 t=1 t = 1 , n q 1 ≤ δ nq_1 \le\delta n q 1 ≤ δ rearranges exactly to
p a ≤ δ ( 1 − ε ) ( 1 − p r ) ε ( n − δ ) . p_a \le\frac{\delta(1-\varepsilon)(1-p_r)}{\varepsilon(n-\delta)}. p a ≤ ε ( n − δ ) δ ( 1 − ε ) ( 1 − p r ) .
For general t t t , accepted-error odds are
q t 1 − q t = ε 1 − ε ( p a 1 − p r ) t . \frac{q_t}{1-q_t}=\frac{\varepsilon}{1-\varepsilon}\left(\frac{p_a}{1-p_r}\right)^t. 1 − q t q t = 1 − ε ε ( 1 − p r p a ) t .
Thus unanimous repetition improves accuracy only if p a < 1 − p r p_a < 1-p_r p a < 1 − p r . Since chain failure is at most n q t nq_t n q t , the target n q t ≤ δ nq_t \le\delta n q t ≤ δ holds as soon as q t / ( 1 − q t ) ≤ δ / ( n − δ ) q_t/(1-q_t) \le\delta/(n-\delta) q t / ( 1 − q t ) ≤ δ / ( n − δ ) , that is, when 0 < p a < 1 − p r 0 < p_a < 1-p_r 0 < p a < 1 − p r , for every t ≥ log ( δ ( 1 − ε ) ( n − δ ) ε ) log ( 1 − p r p a ) t \ge\frac{\log\left(\frac{\delta(1-\varepsilon)}{(n-\delta)\varepsilon}\right)}{\log\left(\frac{1-p_r}{p_a}\right)} t ≥ l o g ( p a 1 − p r ) l o g ( ( n − δ ) ε δ ( 1 − ε ) ) (one check suffices when p a = 0 p_a=0 p a = 0 ). Because s t ≥ a t = ( 1 − ε ) ( 1 − p r ) t s_t \ge a_t=(1-\varepsilon)(1-p_r)^t s t ≥ a t = ( 1 − ε ) ( 1 − p r ) t can itself shrink exponentially, the exact cost retains the false-reject penalty that an O ( n t c v ) O(ntc_v) O ( n t c v ) approximation would omit. ◻
Remark 8 (Short-circuit checking). If the t t t checks of a candidate are run in sequence and stopped at its first rejection, the acceptance probabilities a t a_t a t and b t b_t b t , hence s t s_t s t , q t q_t q t and the attempt and model-call counts of Theorem 5 , are unchanged; only the number of checks per attempt changes. A correct candidate is checked ∑ j = 0 t − 1 ( 1 − p r ) j \sum_{j=0}^{t-1}(1-p_r)^j ∑ j = 0 t − 1 ( 1 − p r ) j times in expectation and a wrong one ∑ j = 0 t − 1 p a j \sum_{j=0}^{t-1}p_a^j ∑ j = 0 t − 1 p a j times, so an attempt makes v t = ( 1 − ε ) ∑ j < t ( 1 − p r ) j + ε ∑ j < t p a j ≤ t v_t=(1-\varepsilon)\sum_{j<t}(1-p_r)^j+\varepsilon\sum_{j<t}p_a^j\le t v t = ( 1 − ε ) ∑ j < t ( 1 − p r ) j + ε ∑ j < t p a j ≤ t checks in expectation. Attempts are i.i.d. and the number of attempts is a stopping time with mean 1 / s t 1/s_t 1/ s t , so Wald’s identity [41 ] gives E [ N v e r ] = v t / s t \mathbb{E}[N_{\mathrm{ver}}]=v_t/s_t E [ N ver ] = v t / s t per accepted transition and E [ C o s t ] = ( 1 + c v v t ) / s t \mathbb{E}[\mathrm{Cost}]=(1+c_vv_t)/s_t E [ Cost ] = ( 1 + c v v t ) / s t in place of ( 1 + t c v ) / s t (1+tc_v)/s_t ( 1 + t c v ) / s t . With at most M M M attempts per transition, the last candidate being kept if all are rejected (Corollary 25(ii)), attempt j ≤ M j\le M j ≤ M is reached with probability ( 1 − s t ) j − 1 (1-s_t)^{j-1} ( 1 − s t ) j − 1 , an event determined by the earlier attempts and independent of the j j j -th attempt’s checking cost, so it contributes ( 1 − s t ) j − 1 ( 1 + c v v t ) (1-s_t)^{j-1}(1+c_vv_t) ( 1 − s t ) j − 1 ( 1 + c v v t ) in expectation; summing over j ≤ M j\le M j ≤ M and the n n n executed transitions gives E [ C o s t ] = n ( 1 + c v v t ) ( 1 − ( 1 − s t ) M ) / s t \mathbb{E}[\mathrm{Cost}]=n(1+c_vv_t)(1-(1-s_t)^M)/s_t E [ Cost ] = n ( 1 + c v v t ) ( 1 − ( 1 − s t ) M ) / s t , the forced commitment at the cap changing correctness but not this cost sum. For p r > 0 p_r>0 p r > 0 and fixed ( ε , p a , p r ) (\varepsilon,p_a,p_r) ( ε , p a , p r ) , v t → ( 1 − ε ) / p r + ε / ( 1 − p a ) v_t\to(1-\varepsilon)/p_r+\varepsilon/(1-p_a) v t → ( 1 − ε ) / p r + ε / ( 1 − p a ) as t → ∞ t\to\infty t → ∞ , so the factor 1 + c v Θ ( log ( n / δ ) ) 1+c_v\Theta(\log(n/\delta)) 1 + c v Θ ( log ( n / δ )) of Corollary 25 is a cost of paying for all t t t checks and disappears, whereas the n 1 + α n^{1+\alpha} n 1 + α false-reject penalty in model calls, which comes from s t s_t s t , remains; Theorem 5 as stated is the conservative variant. If verifier rates depend on the candidate (a correct candidate is accepted with a random probability U U U , a wrong one with V V V , checks independent given the candidate), the powers become moments, a t = ( 1 − ε ) E [ U t ] a_t=(1-\varepsilon)\mathbb{E}[U^t] a t = ( 1 − ε ) E [ U t ] and b t = ε E [ V t ] b_t=\varepsilon\mathbb{E}[V^t] b t = ε E [ V t ] , and the ratio b t / a t b_t/a_t b t / a t need not fall geometrically (Corollary 23).
Corollary 23 (Candidate-dependent checking). Suppose candidate attempts are i.i.d., a candidate is correct with probability 1 − ε 1-\varepsilon 1 − ε , and, conditional on the candidate, its t ≥ 1 t\ge1 t ≥ 1 checks are independent, each accepting a correct candidate with a candidate-specific probability U U U and a wrong one with probability V V V (U , V U,V U , V random, drawn with the candidate). Put a t = ( 1 − ε ) E [ U t ] a_t=(1-\varepsilon)\mathbb{E}[U^t] a t = ( 1 − ε ) E [ U t ] , b t = ε E [ V t ] b_t=\varepsilon\mathbb{E}[V^t] b t = ε E [ V t ] and s t = a t + b t > 0 s_t=a_t+b_t>0 s t = a t + b t > 0 . Then retry-until-accept with unanimous checks commits a wrong candidate with probability q t = b t / s t q_t=b_t/s_t q t = b t / s t and makes 1 / s t 1/s_t 1/ s t model calls and t / s t t/s_t t / s t verifier calls in expectation per accepted step, and the chain-level conclusions of Theorem 5 (Pr [ chain failure ] ≤ n q t \Pr[\text{chain failure}]\le nq_t Pr [ chain failure ] ≤ n q t ; exactly 1 − ( 1 − q t ) n 1-(1-q_t)^n 1 − ( 1 − q t ) n with totals n / s t n/s_t n / s t , n t / s t nt/s_t n t / s t , n ( 1 + t c v ) / s t n(1+tc_v)/s_t n ( 1 + t c v ) / s t under the stationary law) hold verbatim. The odds q t / ( 1 − q t ) = ε E [ V t ] / ( ( 1 − ε ) E [ U t ] ) q_t/(1-q_t)=\varepsilon\mathbb{E}[V^t]/((1-\varepsilon)\mathbb{E}[U^t]) q t / ( 1 − q t ) = ε E [ V t ] / (( 1 − ε ) E [ U t ]) need not fall geometrically in t t t ; Theorem 5 is the case U ≡ 1 − p r U\equiv1-p_r U ≡ 1 − p r , V ≡ p a V\equiv p_a V ≡ p a .
Proof. Conditional on a correct candidate with acceptance probability U U U , its t t t independent checks all accept with probability U t U^t U t ; averaging over U U U gives Pr [ attempt correct and accepted ] = a t \Pr[\text{attempt correct and accepted}]=a_t Pr [ attempt correct and accepted ] = a t , and likewise Pr [ attempt wrong and accepted ] = b t \Pr[\text{attempt wrong and accepted}]=b_t Pr [ attempt wrong and accepted ] = b t . Attempts being i.i.d., attempt j j j is the first accepted one and is wrong with probability ( 1 − s t ) j − 1 b t (1-s_t)^{j-1}b_t ( 1 − s t ) j − 1 b t ; summing over j ≥ 1 j\ge1 j ≥ 1 gives b t / s t b_t/s_t b t / s t . The number of attempts is geometric with mean 1 / s t 1/s_t 1/ s t , and each attempt costs one model call and t t t verifier calls. The union bound over the first error and, under the stationary law, the product ( 1 − q t ) n (1-q_t)^n ( 1 − q t ) n and the summed totals are the calculations of the proof of Theorem 5 with a t , b t a_t,b_t a t , b t in place of ( 1 − ε ) ( 1 − p r ) t , ε p a t (1-\varepsilon)(1-p_r)^t,\varepsilon p_a^t ( 1 − ε ) ( 1 − p r ) t , ε p a t . The odds are b t / a t b_t/a_t b t / a t by definition of q t q_t q t . □
Corollary 24 (Batch-acceptance account). Fix a checking procedure that makes t t t checks per candidate and accepts on an event A t A_t A t . Attempts, including candidate generation and the checking randomness, are i.i.d.; the checks within one attempt may be
arbitrarily dependent. Let a t = Pr [ candidate correct , A t ] a_t = \Pr[\text{candidate correct}, A_t] a t = Pr [ candidate correct , A t ] , b t = Pr [ candidate wrong , A t ] b_t = \Pr[\text{candidate wrong}, A_t] b t = Pr [ candidate wrong , A t ] and s t = a t + b t > 0 s_t = a_t + b_t > 0 s t = a t + b t > 0 . Then retry-until-accept commits a wrong candidate with probability q t = b t / s t q_t = b_t/s_t q t = b t / s t and makes 1 / s t 1/s_t 1/ s t model calls and t / s t t/s_t t / s t verifier calls in expectation per accepted transition, and the chain-level conclusions of Theorem 5 hold verbatim with these a t , b t a_t,b_t a t , b t under its stationary trajectory law and absorbing-error objective. Theorem 5 is the case A t = { all t checks accept } A_t = \{\text{all }t\text{ checks accept}\} A t = { all t checks accept } with conditionally independent checks and Corollary 23 the case with candidate-specific rates.
Proof. The proof of Corollary 23 uses only that attempts are i.i.d. with Pr [ correct and accepted ] = a t \Pr[\text{correct and accepted}] = a_t Pr [ correct and accepted ] = a t and Pr [ wrong and accepted ] = b t \Pr[\text{wrong and accepted}] = b_t Pr [ wrong and accepted ] = b t : attempt j j j is the first accepted one and is wrong with probability ( 1 − s t ) j − 1 b t (1-s_t)^{j-1}b_t ( 1 − s t ) j − 1 b t , which sums to b t / s t b_t/s_t b t / s t ; the number of attempts has tail ( 1 − s t ) j (1-s_t)^j ( 1 − s t ) j , hence mean 1 / s t 1/s_t 1/ s t ; and every attempt makes one model call and t t t verifier calls. The union bound, the product ( 1 − q t ) n (1-q_t)^n ( 1 − q t ) n and the summed totals follow as there. No independence among the checks of one attempt enters. ◻
Corollary 25 (False-reject penalty; the capped policy). (i) Let 0 < p a < 1 − p r < 1 0 < p_a < 1-p_r < 1 0 < p a < 1 − p r < 1 , 0 < ε < 1 0 < \varepsilon< 1 0 < ε < 1 , 0 < δ < 1 0 < \delta< 1 0 < δ < 1 and n ≥ 2 n \ge2 n ≥ 2 , put ρ = p a / ( 1 − p r ) \rho= p_a/(1-p_r) ρ = p a / ( 1 − p r ) , K p e n = ( ( n − δ ) ε δ ( 1 − ε ) ) α \mathcal{K}_{\mathrm{pen}} = \left(\frac{(n-\delta)\varepsilon}{\delta(1-\varepsilon)}\right)^\alpha K pen = ( δ ( 1 − ε ) ( n − δ ) ε ) α with
α = − log ( 1 − p r ) log ( ( 1 − p r ) / p a ) > 0 , \alpha= \frac{-\log(1-p_r)}{\log((1-p_r)/p_a)} > 0, α = log (( 1 − p r ) / p a ) − log ( 1 − p r ) > 0 , assume the stationary attempt law of Theorem 5 at every visited state, and let t t t be the smallest integer with n q t ≤ δ nq_t \le\delta n q t ≤ δ , which is at least 1 exactly when n ε > δ n\varepsilon> \delta n ε > δ , assumed here. Then
( n − δ ) K p e n 1 − ε ≤ E [ N m o d e l ] = n s t ≤ n K p e n ( 1 − ε ) ( 1 − p r ) , \frac{(n-\delta)\mathcal{K}_{\mathrm{pen}}}{1-\varepsilon} \le\mathbb{E}[N_{\mathrm{model}}] = \frac{n}{s_t} \le\frac{n\mathcal{K}_{\mathrm{pen}}}{(1-\varepsilon)(1-p_r)}, 1 − ε ( n − δ ) K pen ≤ E [ N model ] = s t n ≤ ( 1 − ε ) ( 1 − p r ) n K pen , with E [ C o s t ] = ( 1 + t c v ) E [ N m o d e l ] \mathbb{E}[\mathrm{Cost}] = (1+tc_v)\mathbb{E}[N_{\mathrm{model}}] E [ Cost ] = ( 1 + t c v ) E [ N model ] and t = ⌈ log K p e n 1 / α / log ( 1 / ρ ) ⌉ t=\lceil\log\mathcal{K}_{\mathrm{pen}}^{1/\alpha}/\log(1/\rho)\rceil t = ⌈ log K pen 1/ α / log ( 1/ ρ )⌉ . For fixed ( ε , p a , p r ) (\varepsilon,p_a,p_r) ( ε , p a , p r ) the model-call count is therefore Θ ( n ( n / δ ) α ) \Theta\left(n(n/\delta)^\alpha\right) Θ ( n ( n / δ ) α ) , polynomial rather than linear in n / δ n/\delta n / δ , and the weighted cost carries a further factor 1 + c v Θ ( log ( n / δ ) ) 1+c_v\Theta(\log(n/\delta)) 1 + c v Θ ( log ( n / δ )) ; the linear scaling of Theorem 22 is recovered only when α log ( n / δ ) = O ( 1 ) \alpha\log(n/\delta)=O(1) α log ( n / δ ) = O ( 1 ) , i.e. at fixed p a p_a p a , when p r → 0 p_r\to0 p r → 0 fast enough that α = O ( 1 / log ( n / δ ) ) \alpha=O(1/\log(n/\delta)) α = O ( 1/ log ( n / δ )) ; for fixed p a p_a p a and fixed p r > 0 p_r>0 p r > 0 the count is superlinear. Finally α < 1 \alpha<1 α < 1 exactly when p a < ( 1 − p r ) 2 p_a<(1-p_r)^2 p a < ( 1 − p r ) 2 .
(ii) With t = 1 t=1 t = 1 , s = s 1 s=s_1 s = s 1 , r = 1 − s r=1-s r = 1 − s and at most M M M attempts, the last candidate being kept if all are rejected, the expected numbers of attempts, model calls and verifier calls are each ( 1 − r M ) / s (1-r^M)/s ( 1 − r M ) / s , and the committed candidate (the accepted one, or the last one kept by the cap) is incorrect with probability b 1 ( 1 − r M ) / s + r M − 1 ε ( 1 − p a ) b_1(1-r^M)/s+r^{M-1}\varepsilon(1-p_a) b 1 ( 1 − r M ) / s + r M − 1 ε ( 1 − p a ) , the second term being the price of the cap, so that a chain of n n n transitions commits n [ b 1 ( 1 − r M ) / s + r M − 1 ε ( 1 − p a ) ] n\left[b_1(1-r^M)/s+r^{M-1}\varepsilon(1-p_a)\right] n [ b 1 ( 1 − r M ) / s + r M − 1 ε ( 1 − p a ) ] wrong states in expectation under the stationary law.
Proof. (i) By the proof above, n q t ≤ δ nq_t\le\delta n q t ≤ δ holds if and only if ε 1 − ε ρ t ≤ δ n − δ \frac{\varepsilon}{1-\varepsilon}\rho^t\le\frac{\delta}{n-\delta} 1 − ε ε ρ t ≤ n − δ δ , i.e. t ≥ t ⋆ : = log K p e n 1 / α / log ( 1 / ρ ) t\ge t^\star:=\log\mathcal{K}_{\mathrm{pen}}^{1/\alpha}/\log(1/\rho) t ≥ t ⋆ := log K pen 1/ α / log ( 1/ ρ ) , so the smallest sufficient t t t is ⌈ t ⋆ ⌉ \lceil t^\star\rceil ⌈ t ⋆ ⌉ and t ⋆ ≤ t < t ⋆ + 1 t^\star\le t<t^\star+1 t ⋆ ≤ t < t ⋆ + 1 ; here t ⋆ > 0 t^\star>0 t ⋆ > 0 , equivalently K p e n > 1 \mathcal{K}_{\mathrm{pen}}>1 K pen > 1 , exactly when ( n − δ ) ε > δ ( 1 − ε ) (n-\delta)\varepsilon>\delta(1-\varepsilon) ( n − δ ) ε > δ ( 1 − ε ) , i.e. n ε > δ n\varepsilon>\delta n ε > δ . Since ( 1 − p r ) − t ⋆ = exp ( t ⋆ log 1 1 − p r ) = K p e n (1-p_r)^{-t^\star}=\exp\left(t^\star\log\frac{1}{1-p_r}\right)=\mathcal{K}_{\mathrm{pen}} ( 1 − p r ) − t ⋆ = exp ( t ⋆ log 1 − p r 1 ) = K pen by the definition of α \alpha α , we have K p e n ≤ ( 1 − p r ) − t < K p e n / ( 1 − p r ) \mathcal{K}_{\mathrm{pen}}\le(1-p_r)^{-t}<\mathcal{K}_{\mathrm{pen}}/(1-p_r) K pen ≤ ( 1 − p r ) − t < K pen / ( 1 − p r ) . The upper bound uses s t ≥ a t = ( 1 − ε ) ( 1 − p r ) s_t\ge a_t=(1-\varepsilon)(1-p_r) s t ≥ a t = ( 1 − ε ) ( 1 − p r ) . For the lower bound, at t ≥ t ⋆ t\ge t^\star t ≥ t ⋆ the accepted-error odds b t / a t b_t/a_t b t / a t are at most δ / ( n − δ ) \delta/(n-\delta) δ / ( n − δ ) , so s t = a t ( 1 + b t / a t ) ≤ a t ( n / ( n − δ ) ) s_t=a_t(1+b_t/a_t)\le a_t(n/(n-\delta)) s t = a t ( 1 + b t / a t ) ≤ a t ( n / ( n − δ )) and s t ≥ ( n − δ ) K p e n / ( n ( 1 − ε ) ) s_t\ge(n-\delta)\mathcal{K}_{\mathrm{pen}}/(n(1-\varepsilon)) s t ≥ ( n − δ ) K pen / ( n ( 1 − ε )) ; the two sides of the bracket differ by the factor n / ( ( n − δ ) ( 1 − p r ) ) n/((n-\delta)(1-p_r)) n / (( n − δ ) ( 1 − p r )) . The cost identity is E [ C o s t ] = n ( 1 + t c v ) / s t \mathbb{E}[\mathrm{Cost}]=n(1+tc_v)/s_t E [ Cost ] = n ( 1 + t c v ) / s t , and t = Θ ( log ( n / δ ) ) t=\Theta(\log(n/\delta)) t = Θ ( log ( n / δ )) for fixed parameters. Finally α < 1 \alpha<1 α < 1 iff − log ( 1 − p r ) < log ( ( 1 − p r ) / p a ) -\log(1-p_r)<\log((1-p_r)/p_a) − log ( 1 − p r ) < log (( 1 − p r ) / p a ) iff p a < ( 1 − p r ) 2 p_a<(1-p_r)^2 p a < ( 1 − p r ) 2 , and α → 0 \alpha\to0 α → 0 as p r → 0 p_r\to0 p r → 0 .
(ii) Attempt j ≤ M j\le M j ≤ M is reached with probability r j − 1 r^{j-1} r j − 1 , so the expected number of attempts is ∑ j = 1 M r j − 1 = ( 1 − r M ) / s \sum_{j=1}^M r^{j-1}=(1-r^M)/s ∑ j = 1 M r j − 1 = ( 1 − r M ) / s , each attempt costing one model call and one verifier call. The accepted candidate is wrong either because some attempt j ≤ M j\le M j ≤ M was wrongly accepted, probability ∑ j = 1 M r j − 1 b 1 = b 1 ( 1 − r M ) / s \sum_{j=1}^M r^{j-1}b_1=b_1(1-r^M)/s ∑ j = 1 M r j − 1 b 1 = b 1 ( 1 − r M ) / s , or because all M M M attempts were rejected and the M M M -th, kept by the cap, is wrong, probability r M − 1 ε ( 1 − p a ) r^{M-1}\varepsilon(1-p_a) r M − 1 ε ( 1 − p a ) , the last attempt being rejected-and-wrong with probability ε ( 1 − p a ) \varepsilon(1-p_a) ε ( 1 − p a ) . ◻
Proof of Theorem 6. Exact cost. Assume first that k ∣ n k\mid n k ∣ n . A segment of k k k transitions plus one verification costs k + c v k+c_v k + c v and is accepted iff all k k k transitions are correct, which has probability ( 1 − ε ) k (1-\varepsilon)^k ( 1 − ε ) k . Attempts are i.i.d., so the expected number of attempts is ( 1 − ε ) − k (1-\varepsilon)^{-k} ( 1 − ε ) − k and the expected cost of a segment is ( k + c v ) ( 1 − ε ) − k (k+c_v)(1-\varepsilon)^{-k} ( k + c v ) ( 1 − ε ) − k . There are n / k n/k n / k segments and rollback is to the last accepted checkpoint, so segments are independent: T ( k ) = n k ( k + c v ) ( 1 − ε ) − k T(k)=\frac{n}{k}(k+c_v)(1-\varepsilon)^{-k} T ( k ) = k n ( k + c v ) ( 1 − ε ) − k . If n = q k + r n=qk+r n = q k + r with 0 < r < k 0<r<k 0 < r < k , the exact expression is
q ( k + c v ) ( 1 − ε ) − k + ( r + c v ) ( 1 − ε ) − r , q(k+c_v)(1-\varepsilon)^{-k}+(r+c_v)(1-\varepsilon)^{-r}, q ( k + c v ) ( 1 − ε ) − k + ( r + c v ) ( 1 − ε ) − r , so the displayed T ( k ) T(k) T ( k ) is not called exact outside the divisibility assumption.
Continuous optimum. For 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 , let β = − log ( 1 − ε ) \beta=-\log(1-\varepsilon) β = − log ( 1 − ε ) (so ε ≤ β \varepsilon\le\beta ε ≤ β , with β ≤ ε ( 1 + ε ) \beta\le\varepsilon(1+\varepsilon) β ≤ ε ( 1 + ε ) for ε ≤ 1 2 \varepsilon\le\frac12 ε ≤ 2 1 ) and F ( k ) = log ( T ( k ) / n ) = log ( 1 + c v / k ) + β k F(k)=\log(T(k)/n)=\log(1+c_v/k)+\beta k F ( k ) = log ( T ( k ) / n ) = log ( 1 + c v / k ) + β k . Then
F ′ ( k ) = β − c v k ( k + c v ) , F ′ ′ ( k ) = c v ( 2 k + c v ) k 2 ( k + c v ) 2 > 0. F'(k)=\beta-\frac{c_v}{k(k+c_v)}, \qquad F''(k)=\frac{c_v(2k+c_v)}{k^2(k+c_v)^2}>0. F ′ ( k ) = β − k ( k + c v ) c v , F ′′ ( k ) = k 2 ( k + c v ) 2 c v ( 2 k + c v ) > 0.
so F F F is strictly convex; F ′ ( 0 + ) = − ∞ F'(0^+)=-\infty F ′ ( 0 + ) = − ∞ and F ′ ( ∞ ) = β > 0 F'(\infty)=\beta>0 F ′ ( ∞ ) = β > 0 , so F ′ F' F ′ has a unique zero, solving k 2 + c v k = c v / β k^2+c_vk=c_v/\beta k 2 + c v k = c v / β , whence k ⋆ = 1 2 ( c v 2 + 4 c v / β − c v ) k^\star=\frac{1}{2}\left(\sqrt{c_v^2+4c_v/\beta}-c_v\right) k ⋆ = 2 1 ( c v 2 + 4 c v / β − c v ) .
Two-sided bound on the optimum. Put z = c v β z=\sqrt{c_v\beta} z = c v β . For the lower bound, use e y ≥ 1 + y e^y\ge1+y e y ≥ 1 + y and then AM–GM:
T ( k ) n = ( 1 + c v k ) e β k ≥ ( 1 + c v k ) ( 1 + β k ) = 1 + β k + c v k + c v β ≥ 1 + 2 z + z 2 . \frac{T(k)}{n}=\left(1+\frac{c_v}{k}\right)e^{\beta k}\ge\left(1+\frac{c_v}{k}\right)(1+\beta k)=1+\beta k+\frac{c_v}{k}+c_v\beta\ge1+2z+z^2. n T ( k ) = ( 1 + k c v ) e β k ≥ ( 1 + k c v ) ( 1 + β k ) = 1 + β k + k c v + c v β ≥ 1 + 2 z + z 2 .
uniformly in k k k (AM–GM on the two middle terms, and c v β = z 2 c_v\beta=z^2 c v β = z 2 ), so T ( k ⋆ ) / n ≥ 1 + 2 z + z 2 ≥ 1 + 2 c v β T(k^\star)/n\ge1+2z+z^2\ge1+2\sqrt{c_v\beta} T ( k ⋆ ) / n ≥ 1 + 2 z + z 2 ≥ 1 + 2 c v β . For the upper bound evaluate at the feasible point k 1 = c v / β k_1=\sqrt{c_v/\beta} k 1 = c v / β , where c v / k 1 = β k 1 = z c_v/k_1=\beta k_1=z c v / k 1 = β k 1 = z , giving T ( k ⋆ ) / n ≤ T ( k 1 ) / n = ( 1 + z ) e z T(k^\star)/n\le T(k_1)/n=(1+z)e^z T ( k ⋆ ) / n ≤ T ( k 1 ) / n = ( 1 + z ) e z . The gap between the two bounds is ( 1 + z ) e z − ( 1 + 2 z + z 2 ) = 1 2 z 2 + O ( z 3 ) = O ( c v β ) (1+z)e^z-(1+2z+z^2)=\frac{1}{2}z^2+O(z^3)=O(c_v\beta) ( 1 + z ) e z − ( 1 + 2 z + z 2 ) = 2 1 z 2 + O ( z 3 ) = O ( c v β ) , so T ( k ⋆ ) / n = 1 + 2 c v β + O ( c v β ) T(k^\star)/n=1+2\sqrt{c_v\beta}+O(c_v\beta) T ( k ⋆ ) / n = 1 + 2 c v β + O ( c v β ) . Both bounds hold for every 0 < ε < 1 0<\varepsilon<1 0 < ε < 1 and c v > 0 c_v>0 c v > 0 in the positive-real relaxation, provided the horizon permits c v / β ≤ n \sqrt{c_v/\beta}\le n c v / β ≤ n .
Leading order and finite horizons. Since c v β → 0 c_v\beta\to0 c v β → 0 implies 4 c v / β ≫ c v 2 4c_v/\beta\gg c_v^2 4 c v / β ≫ c v 2 , k ⋆ = c v / β ( 1 + O ( c v β ) ) k^\star=\sqrt{c_v/\beta}\left(1+O(\sqrt{c_v\beta})\right) k ⋆ = c v / β ( 1 + O ( c v β ) ) . If in addition ε → 0 \varepsilon\to0 ε → 0 , then β = ε ( 1 + O ( ε ) ) \beta=\varepsilon(1+O(\varepsilon)) β = ε ( 1 + O ( ε )) and this becomes k ⋆ = c v / ε ( 1 + o ( 1 ) ) k^\star=\sqrt{c_v/\varepsilon}(1+o(1)) k ⋆ = c v / ε ( 1 + o ( 1 )) . Since F = log ( T / n ) F=\log(T/n) F = log ( T / n ) is strictly convex, the minimiser of T T T over the integers k ≥ 1 k\ge1 k ≥ 1 is max { 1 , ⌊ k ⋆ ⌋ } \max\{1,\lfloor k^\star\rfloor\} max { 1 , ⌊ k ⋆ ⌋} or ⌈ k ⋆ ⌉ \lceil k^\star\rceil ⌈ k ⋆ ⌉ ; hence the optimal integer checkpoint interval lies within one of the continuous minimiser k ⋆ k^\star k ⋆ . Restricting to divisors of n n n gives a coarser admissible grid. For finite n n n , clip the continuous solution to [ 1 , n ] [1,n] [ 1 , n ] and evaluate the exact divisible or remainder expression over admissible integer k k k . At ε = 0 \varepsilon=0 ε = 0 there are no failed segments; verification may be omitted, or a required final check is minimised by k = n k=n k = n . The closed form, rather than its leading-order approximation, should be used unless both ε \varepsilon ε and c v ε c_v\varepsilon c v ε are small.
Correspondence with Young–Daly. Writing M T B F = 1 / ε \mathrm{MTBF}=1/\varepsilon MTBF = 1/ ε (mean transitions between errors) and checkpoint cost c v c_v c v , the classical first-order optimum 2 ⋅ c o s t ⋅ M T B F \sqrt{2}\cdot\mathrm{cost}\cdot\mathrm{MTBF} 2 ⋅ cost ⋅ MTBF [27 , 28 ] coincides with k ⋆ k^\star k ⋆ up to the factor 2 \sqrt{2} 2 , which arises because the classical model loses on average half a segment per failure while ours re-executes the whole segment. This distinction, and the resulting first-order optimum without the factor 2, are those of the silent-error checkpoint-with-verification model of the resilience literature [44 , 45 ] , of which Theorem 6 is the discrete, per-transition instance; for this discrete per-transition model, the calculation above gives the closed-form minimiser, the neighbouring-integer rule and the bracket 1 + 2 z + z 2 ≤ T ( k ⋆ ) / n ≤ ( 1 + z ) e z 1+2z+z^2\le T(k^\star)/n\le(1+z)e^z 1 + 2 z + z 2 ≤ T ( k ⋆ ) / n ≤ ( 1 + z ) e z . □
Remark 9 (The checkpoint policy as a machine of Definition 3; verifiers whose cost grows with k k k ). § 7 states its results over strategy classes; the policies are machines of Definition 3 once L L L is stochastic, i.e. consumes fresh random-tape bits at each call, so that (opcode, arguments) determine a distribution over (block, tag) rather than a value. The policy of Theorem 6 runs on ram(1) with C = 2 C=2 C = 2 . The current state occupies one slot; a transition is one L L L -call on it, the returned block taking the second slot and the old state being evicted. At the start of a segment the state is written to M [ 1 ] M[1] M [ 1 ] (the checkpoint, one unit of Q b l k Q_{\mathrm{blk}} Q blk ); after k k k transitions the checkpoint is read back into the free slot (one unit) and the verifier is called on the two blocks (checkpoint, current state), returning accept or reject as a tag; on reject the current state is evicted and the checkpoint block becomes the current state, so rollback moves no further block; on accept the checkpoint copy is evicted and the current state is written as the next checkpoint. Under the absorbing-state semantics of § 7 , in which an erroneous transition never returns to the correct trajectory, the endpoint is correct exactly when all k k k transitions were, so this two-argument verifier is the theorem’s perfect segment verifier, and its cost c v c_v c v does not depend on k k k . The operation trace is exact: initialisation writes x 0 x_0 x 0 to M [ 1 ] M[1] M [ 1 ] (one movement); a rejected attempt costs k k k model calls, one read, one verifier call and no write; an accepted non-final segment costs k k k model calls, one read, one verifier call and one write; the final accepted segment omits the write and emits the state. Hence E [ N m o d e l + c v N v e r ] = T ( k ) \mathbb{E}[N_{\mathrm{model}}+c_vN_{\mathrm{ver}}]=T(k) E [ N model + c v N ver ] = T ( k ) , Q b l k = 1 + N v e r + ( n / k − 1 ) = n / k + N v e r Q_{\mathrm{blk}}=1+N_{\mathrm{ver}}+(n/k-1)=n/k+N_{\mathrm{ver}} Q blk = 1 + N ver + ( n / k − 1 ) = n / k + N ver exactly, T i n ≤ b ( N m o d e l + 2 N v e r ) T_{\mathrm{in}}\le b(N_{\mathrm{model}}+2N_{\mathrm{ver}}) T in ≤ b ( N model + 2 N ver ) and Q m o v e = 0 Q_{\mathrm{move}}=0 Q move = 0 ; every accepted checkpoint is correct, so T ( k ) T(k) T ( k ) is unconditional. The policy of Theorem 5 is the same machine with k = 1 k=1 k = 1 , verifier calls on the two resident blocks (state, candidate) per attempt, eviction of the candidate on any reject and no write, so N v e r = t N m o d e l N_{\mathrm{ver}}=tN_{\mathrm{model}} N ver = t N model , Q b l k = 0 Q_{\mathrm{blk}}=0 Q blk = 0 and C = 2 C=2 C = 2 ; every reliability policy of § 7 is thus a machine of Definition 3. If instead the verifier must see the k k k intermediate states, it needs k + 1 k+1 k + 1 argument blocks resident at once, hence C ≥ k + 1 C\ge k+1 C ≥ k + 1 (a verifier call inserts no block, Definition 3), and a cost V ( k ) V(k) V ( k ) that grows with k k k : the per-transition objective becomes ( 1 + V ( k ) / c v ) e β k (1+V(k)/c_v)e^{\beta k} ( 1 + V ( k ) / c v ) e β k , which for V ( k ) = c v V(k)=c_v V ( k ) = c v is the theorem at V ( k ) V(k) V ( k ) equals ( 1 + ν ) e β k (1+\nu)e^{\beta k} ( 1 + ν ) e β k , increasing in k k k , so the optimum is k = 1 k=1 k = 1 , i.e. Theorem 22 with c v = ν c_v=\nu c v = ν . For the mixed cost V ( k ) = ν + η k V(k)=\nu+\eta k V ( k ) = ν + η k it equals ( 1 + η ) ( 1 + ν / ( 1 + η ) k ) e β k (1+\eta)\left(1+\frac{\nu/(1+\eta)}{k}\right)e^{\beta k} ( 1 + η ) ( 1 + k ν / ( 1 + η ) ) e β k , the theorem’s objective with c v c_v c v replaced by c ′ = ν / ( 1 + η ) c'=\nu/(1+\eta) c ′ = ν / ( 1 + η ) and a constant factor 1 + η 1+\eta 1 + η , so k ⋆ = 1 2 ( c ′ 2 + 4 c ′ / β − c ′ ) k^\star=\frac{1}{2}\left(\sqrt{c'^2+4c'/\beta}-c'\right) k ⋆ = 2 1 ( c ′2 + 4 c ′ / β − c ′ ) : a fixed-plus-proportional verifier keeps the square-root law with the fixed part discounted by 1 + η 1+\eta 1 + η . The law is specific to verifiers whose cost has a fixed part; a purely proportional cost returns the optimum to k = 1 k=1 k = 1 .
Extensions and deployment mapping
We record several extensions of the base model and describe how its resource counters map to deployment-level measurements.
Mapping to serving traces.
A deployment trace records model, verifier, and tool calls together with semantic-memory transfers and logical input/output traffic. Tool calls may invoke domain models far from the language model itself, such as camera-controllable video generators [46 ] , multi-scale flow-matching generators [47 ] , physics-informed neural-operator controllers [48 ] , or perception modules for tracking and neural-field reconstruction [49 ] , [50 ] ; each is charged as an oracle call whose argument and output sizes enter the same counters. Prefix caching introduces a distinct physical-prefill quantity: T i n l o g i c a l T_{\mathrm{in}}^{\mathrm{logical}} T in logical records the oracle argument, whereas T i n p r e f i l l T_{\mathrm{in}}^{\mathrm{prefill}} T in prefill records tokens whose KV state is actually computed. Runtime KV movement is a separate systems resource and should not be identified with semantic block movement.
A scalar deployment cost is obtained by assigning explicit weights to these events. When event costs depend on call size, cache state, or execution parallelism, the event-level costs should be aggregated directly rather than represented by a single universal coefficient.
Charged controller computation.
Strict VPA can be relaxed by representing value-producing controller operations as explicit charged provenance nodes. Query-bandwidth bounds remain unchanged after charging source observations, while the pebbling correspondence applies to the resulting augmented occurrence DAG rather than necessarily to the original DAG. Pointer-chasing bounds continue to apply when unseen memory contents cannot be manufactured locally, and reliability bounds require that controller computation provide no uncharged correctness signal. There is no task-independent conversion from a controller-work budget to a universal loss in the original lower bounds: the effect depends on which semantic values the added operations can create.
Control state and the single-stack frontier.
Theorem 17 is unchanged by arbitrarily rich tags or content-dependent routing state so long as that state cannot store or re-materialize semantic blocks. Allowing it to do so introduces an additional semantic memory and therefore changes the machine class.
Proposition 26 (Joint local verification and segment rollback). Use the imperfect local verifier of Theorem 5 with t > 0 t > 0 t > 0 unanimous checks per accepted step (t = 0 t = 0 t = 0 denoting no local check, with s 0 = 1 s_0 = 1 s 0 = 1 and q 0 = ε q_0 = \varepsilon q 0 = ε ), and let g t = ( 1 + t c v ) / s t g_t = (1 + tc_v)/s_t g t = ( 1 + t c v ) / s t and q t = b t / s t q_t = b_t/s_t q t = b t / s t . After every k k k accepted steps, call an independent perfect segment verifier of cost c s c_s c s that accepts exactly when all k k k states are correct; on rejection, roll back the segment. Under the theorem’s stationarity and independence assumptions, for k ∣ n k \mid n k ∣ n the exact expected weighted cost is
T ( t , k ) = n k ( k g t + c s ) ( 1 − q t ) − k . T(t,k) = \frac{n}{k}(kg_t + c_s)(1-q_t)^{-k}. T ( t , k ) = k n ( k g t + c s ) ( 1 − q t ) − k . For fixed t t t and 0 < q t < 1 0 < q_t < 1 0 < q t < 1 , put β t = − log ( 1 − q t ) \beta_t = -\log(1-q_t) β t = − log ( 1 − q t ) . The positive-real minimiser is
k t ∗ = c s 2 + 4 g t c s / β t − c s 2 g t . k_t^* = \frac{\sqrt{c_s^2 + 4g_tc_s/\beta_t} - c_s}{2g_t}. k t ∗ = 2 g t c s 2 + 4 g t c s / β t − c s . clipped to [ 1 , n ] [1,n] [ 1 , n ] ; the exact finite optimum enumerates integer t , k t,k t , k and the shorter final segment. Interior hybrids can strictly beat both no-local-check checkpointing and sufficient local checking without rollback.
Proof. One accepted local step has expected cost g t g_t g t and residual error q t q_t q t . In the competing hazards calculation of Theorem 5 , the number of rejected attempts is independent of whether the first accepted attempt is correct. Hence a segment attempt costs k g t + c s kg_t + c_s k g t + c s in expectation and succeeds with probability ( 1 − q t ) k (1-q_t)^k ( 1 − q t ) k ; geometric repetition and n / k n/k n / k segments give the formula. For fixed t t t ,
log ( T ( t , k ) / n ) = log ( g t + c s / k ) + β t k , \log(T(t,k)/n) = \log(g_t + c_s/k) + \beta_t k, log ( T ( t , k ) / n ) = log ( g t + c s / k ) + β t k ,
whose derivative is β t − c s / [ k ( g t k + c s ) ] \beta_t - c_s/[k(g_tk + c_s)] β t − c s / [ k ( g t k + c s )] . Its unique zero gives the displayed quadratic solution. Integer enumeration proves the finite claim.
For a concrete witness, take ( ε , p Δ , p r , c v , c s ) = ( 0.05 , 0.01 , 0.05 , 0.2 , 2 ) (\varepsilon,p_\Delta,p_r,c_v,c_s) = (0.05,0.01,0.05,0.2,2) ( ε , p Δ , p r , c v , c s ) = ( 0.05 , 0.01 , 0.05 , 0.2 , 2 ) and n = 1020 n = 1020 n = 1020 . No local check (t = 0 t = 0 t = 0 ) is minimised near k = 5 k = 5 k = 5 at cost 1.809 n 1.809n 1.809 n ; local checking alone needs t = 2 t = 2 t = 2 to make n q t ≤ 0.05 nq_t \le0.05 n q t ≤ 0.05 and costs 1.633 n 1.633n 1.633 n . The hybrid t = 1 , k = 51 t = 1,k = 51 t = 1 , k = 51 has perfect final correctness and cost 1.407 n 1.407n 1.407 n , strictly below both. If local plurality sampling is used instead, substitute its per-accepted-step cost and residual error for ( g t , q t ) (g_t,q_t) ( g t , q t ) ; with only the Hoeffding error ceiling from Theorem 21 (Appendix § 16 ), the same expression is an upper bound rather than an equality. □
Corollary 27 (Transfer-priced joint policy). Run the policy of Proposition 26 on the machine of Remark 9 (ram(1), C = 2 C = 2 C = 2 , endpoint segment verifier under absorbing-state semantics, k ∣ n k \mid n k ∣ n ) and charge every semantic block transfer or read λ b l k ≥ 0 \lambda_{\mathrm{blk}} \ge0 λ blk ≥ 0 in addition to the weighted call cost. Then, pathwise, Q b l k = n / k + V s Q_{\mathrm{blk}} = n/k + V_s Q blk = n / k + V s with V s V_s V s the number of segment-verifier calls, and
E [ C o s t λ ] = n k [ ( k g t + c s + λ b l k ) ( 1 − q t ) − k + λ b l k ] . \mathbb{E}[\mathrm{Cost}_\lambda] = \frac{n}{k}\left[(kg_t + c_s + \lambda_{\mathrm{blk}})(1-q_t)^{-k} + \lambda_{\mathrm{blk}}\right]. E [ Cost λ ] = k n [ ( k g t + c s + λ blk ) ( 1 − q t ) − k + λ blk ] .
Proof. Write m = n / k m = n/k m = n / k . The trace of Remark 9 writes the initial checkpoint once and each of the m − 1 m - 1 m − 1 accepted non-final checkpoints once, and every segment attempt, accepted or rejected, reads its checkpoint once; local checks see the two resident blocks (state, candidate), insert no block and move none. Hence Q b l k = m + V s Q_{\mathrm{blk}}=m+V_s Q blk = m + V s pathwise, as in the remark’s identity Q b l k = n / k + N v e r Q_{\mathrm{blk}}=n/k+N_{\mathrm{ver}} Q blk = n / k + N ver for t = 0 t=0 t = 0 . A segment attempt succeeds with probability ( 1 − q t ) k (1-q_t)^k ( 1 − q t ) k independently of the others, so E [ V s ] = m ( 1 − q t ) k \mathbb{E}[V_s]=m(1-q_t)^k E [ V s ] = m ( 1 − q t ) k . Adding λ b l k E [ Q b l k ] \lambda_{\mathrm{blk}}\mathbb{E}[Q_{\mathrm{blk}}] λ blk E [ Q blk ] to the cost m ( k g t + c s ) ( 1 − q t ) k m(kg_t+c_s)(1-q_t)^k m ( k g t + c s ) ( 1 − q t ) k of Proposition 26 gives the display. The term λ b l k m \lambda_{\mathrm{blk}}m λ blk m depends on k k k , so the optimum is not that of the proposition with c s c_s c s replaced by c s + λ b l k c_s+\lambda_{\mathrm{blk}} c s + λ blk ; it is found by enumerating the admissible ( t , k ) (t,k) ( t , k ) . □
Proposition 28 (Conditional-hazard checkpoint envelope). Consider the regular length-k k k rollback policy with a perfect segment verifier of cost c s c_s c s . A segment attempt always executes all k k k transitions before verification and costs k + c s k+c_s k + c s . Drop independence, but retain the absorbing-state semantics and suppose that, for every prior run history and every position i i i whose preceding transitions in the current attempt were correct, the conditional error hazard lies in ε ≤ Pr ( E i ∣ E 1 , … , E i − 1 , H ) ≤ ε ˉ < 1 \varepsilon\le\Pr(E_i \mid E_1,\ldots,E_{i-1},\mathcal{H}) \le\bar{\varepsilon}<1 ε ≤ Pr ( E i ∣ E 1 , … , E i − 1 , H ) ≤ ε ˉ < 1 . The bounds must continue to hold after every rollback. Then, without independence within or between attempts, the expected cost for k ∣ n k\mid n k ∣ n obeys
n k ( k + c s ) ( 1 − ε ) − k ≤ E [ T ( k ) ] ≤ n k ( k + c s ) ( 1 − ε ˉ ) − k . \frac{n}{k}(k+c_s)(1-\varepsilon)^{-k}\le\mathbb{E}[T(k)]\le\frac{n}{k}(k+c_s)(1-\bar{\varepsilon})^{-k}. k n ( k + c s ) ( 1 − ε ) − k ≤ E [ T ( k )] ≤ k n ( k + c s ) ( 1 − ε ˉ ) − k . Thus the independent formula is recovered when the two hazards coincide. If only marginal error rates are known, neither this envelope nor sampling amplification follows in general: perfectly correlated replicas provide a counterexample.
Proof. By the conditional chain rule, after any pre-attempt history H \mathcal{H} H the probability that all k k k transitions are correct lies in [ ( 1 − ε ˉ ) k , ( 1 − ε ) k ] [(1-\bar{\varepsilon})^k,(1-\varepsilon)^k] [( 1 − ε ˉ ) k , ( 1 − ε ) k ] . Let A A A be the number of attempts until the perfect verifier accepts. Iterating the same conditional bounds after each failure sandwiches Pr ( A > m ∣ H ) \Pr(A>m\mid\mathcal{H}) Pr ( A > m ∣ H ) between the tails of geometric variables with those two success probabilities. Summing the tails gives ( 1 − ε ) − k ≤ E [ A ∣ H ] ≤ ( 1 − ε ˉ ) − k (1-\varepsilon)^{-k}\le\mathbb{E}[A\mid\mathcal{H}]\le(1-\bar{\varepsilon})^{-k} ( 1 − ε ) − k ≤ E [ A ∣ H ] ≤ ( 1 − ε ˉ ) − k . Multiplication by the fixed attempt cost and summation over n / k n/k n / k segments proves the claim. Perfect correlation across replicas shows why a marginal error rate alone cannot imply a concentration gain. □
Controlled execution checks
We use controlled simulators to check that the constructive schedules in § 4 –Section 6 respect the stated context and memory capacities and reproduce their analytical resource accounting. Communication, access, and recomputation checks use deterministic semantic transitions; reliability checks use stochastic transitions with prescribed error laws.
These experiments are implementation and scaling checks for the stated constructions. They are not treated as empirical evidence for the lower bounds themselves.
Communication and access checks
Bounded-context communication.
On grid DAGs, we compare row-major execution with a tiled schedule under the formal context bound. The tiled construction exhibits the Θ ( n 2 / C ) \Theta(n^2/C) Θ ( n 2 / C ) communication scaling predicted by Corollary 11, whereas row-major execution remains quadratic until a live row fits in context. On sequential chains, full-history replay and dependency-only prompting reproduce the quadratic and linear input-accounting laws of Proposition 12.
Memory access.
For pointer chasing, we compare random access with the demand-following, non-speculative sequential execution class of Theorem 2 . Random access incurs one block read per pointer, while sequential access pays for the intervening head movement. The observed scaling is consistent with the separation proved in Theorem 2 .
Reliability checks
The reliability simulator implements the execution classes used in § 7 . Sampling-only policies commit stage by stage without correctness feedback, whereas verification and checkpoint policies receive the corresponding feedback and pay the stated verifier costs.
For checkpointing, simulated retry costs closely follow the exact objective T ( k ) T(k) T ( k ) of Theorem 6 , and the observed optimum tracks its closed-form minimizer. The square-root approximation is accurate only in its stated asymptotic regime; outside that regime the exact expression is the appropriate prediction.
Recomputation implementation check
The simulator executes the constructive schedules from the proof of Theorem 3 while explicitly enforcing the context and persistent-memory capacities. Every model call requires its arguments to be resident, and an execution terminates on any context or storage overflow.
Across the tested capacity regimes, the checkpoint construction reproduces the predicted dependence
N = ( n 2 C + S + n ) . N=\left(\frac{n^2}{C+S}+n\right). N = ( C + S n 2 + n ) .
Its measured schedule counts satisfy
N n 2 / ( C + S ) + n ∈ [ 0.58 , 2.0 ] , \frac{N}{n^2/(C+S)+n} \in[0.58, 2.0], n 2 / ( C + S ) + n N ∈ [ 0.58 , 2.0 ] ,
within the explicit constants of Theorem 3, while its context–memory traffic satisfies Q b l k ≤ 2 n Q_{\mathrm{blk}}\le2n Q blk ≤ 2 n . With sufficient persistent storage, the construction uses exactly 2 n − 1 2n-1 2 n − 1 model calls, recovering linear call complexity (Figure 3 ).
Figure 3. Recomputation implementation check. (a) Model-call count N N N for the checkpoint construction of Theorem 3 on Δ n r e v \Delta_n^{\mathrm{rev}} Δ n rev as total semantic capacity C + S C+S C + S varies. Dashed curves show the theorem’s bounds 1 32 ( n 2 / ( C + S ) + n ) \frac{1}{32}\left(n^2/(C+S)+n\right) 32 1 ( n 2 / ( C + S ) + n ) and 4 ( n 2 / ( C + S ) + n ) 4\left(n^2/(C+S)+n\right) 4 ( n 2 / ( C + S ) + n ) . (b) Call count as a function of n n n without persistence (S = 0 S=0 S = 0 , filled) and with sufficient persistence (S = n S=n S = n , open); the dashed line 2 n − 1 2n-1 2 n − 1 is the persistent schedule.
The execution check also reproduces the feasibility boundary of the construction: at C = 3 C=3 C = 3 , no-persistence execution fails from insufficient semantic capacity, whereas adding one persistent block makes the schedule feasible. Thus the runs verify the capacity use and resource accounting of the constructive upper bounds; they are implementation checks rather than independent empirical evidence for the lower bound.
GPT-6 Astra evaluation details
Prompts and evaluation artifacts are provided with the released code.
Common protocol.
All experiments use GPT-6 Astra [1 ] , accessed through the OpenAI API with reasoning effort set to medium, and a common harness. We record model and verifier calls, input and output traffic, cached input traffic, external-memory transfers, and peak prompt length. Calls producing semantic state are counted as model calls; verdict-only calls are counted as verifier calls.
The controller performs deterministic parsing, normalisation, and routing, but does not receive credit for semantic computation. Development or calibration data and held-out evaluation data are disjoint; forecast parameters and policy-selection rules determined from the former remain fixed on the latter. Success rates use Wilson 95% intervals, token means use chain-level bootstrap intervals, and paired comparisons use exact McNemar tests.
Communication and cache accounting
Synthetic chain.
We compare full-history replay, which repeatedly transmits the accumulated history, with dependency-only prompting, which supplies only the state required for the next transition. For fixed-width state and record encodings, their logical input traffic is
T i n d e p = n h , T i n r e p l a y = n h + b n ( n − 1 ) 2 , T_{\mathrm{in}}^{\mathrm{dep}}=nh,\qquad T_{\mathrm{in}}^{\mathrm{replay}}=nh+b\frac{n(n-1)}{2}, T in dep = nh , T in replay = nh + b 2 n ( n − 1 ) ,
for fixed per-step overhead h h h and history-record width b b b . The measured logical traffic follows these identities across the evaluated depths, recovering the linear-versus-quadratic separation of Proposition 12.
Prefix caching.
Replay prompts share long prefixes, so logical traffic can overstate physical prefill when prefix caching is available. We therefore also evaluate an exact-prefix accounting. On the deepest synthetic setting, the replay-to-dependependency-only ratio falls from 7.14 × in logical traffic to 1.72 × with exact-prefix caching; on chained MATH the corresponding ratio falls from 11.0 × to 3.05 ×. Thus caching narrows, but does not eliminate, the communication advantage of dependency-aware prompting.
Reliability
Calibration and controlled checks.
We evaluate reliability policies on modular-affine chains whose transitions are executed by the model. A disjoint calibration split estimates the candidate error rate together with the error rates and relative cost of the learned verifier. These quantities parameterize the sampling, local-verification, and checkpoint policies evaluated in § 8.2 . Controlled checkpoint experiments additionally use a perfect segment verifier at stipulated costs to isolate the prediction of Theorem 6 from verifier error.
Dependence diagnostics.
Repeated sampling reveals substantial variation in error rates across chain states, so a pooled homogeneous i.i.d. model does not adequately describe the observed sampling process. The predeclared m ⋆ = 15 m^{\star} = 15 m ⋆ = 15 voting policy nevertheless solved 6/6 chains with 0/96 wrong plurality decisions.
Verifier errors are likewise candidate dependent: naturally wrong, correct, and synthetically corrupted candidates exhibit different acceptance behaviour. This observation motivates the candidate-dependent formulation of imperfect verification in Appendix § 16 , rather than a single candidate-independent false-accept probability.
Held-out checkpoint-policy tournament.
The tournament compares the principal reliability mechanisms studied in § 7 : unverified execution, sampling, local verification, segment rollback, and a joint local-verification–rollback policy. Calibration and held-out evaluation use disjoint chains. Forecast parameters and the policy-selection rule are determined from the calibration split and remain fixed on the held-out split. The resulting arm-level success and cost measurements are reported in § 8.2 and Figure 2 .
For segment rollback, the verifier checks the affine map obtained by composing the public transition constants within a segment. This composition is controller-side arithmetic rather than a charged semantic call. The tournament therefore tests prospective checkpoint-policy selection conditional on this implemented segment-check interface, rather than an end-to-end realization of the VPA restriction.
The sampling results additionally confirm that state heterogeneity materially affects reliability prediction: a model that preserves the observed state-dependent error structure describes held-out failures substantially better than a pooled homogeneous i.i.d. approximation.
Bit-reversal implementation check
The real-model task instantiates Δ n r e v \Delta_{n}^{\mathrm{rev}} Δ n rev using fixed semantic vertex operations. Each model call receives only the blocks required by its scheduled vertex, and the controller enforces the prescribed context and persistent-memory capacities. We compare recomputing, persistent, and resident schedules together with a one-call Direct reference.
Rule-specific error and token costs are estimated on disjoint calibration data and held fixed when evaluating the scheduled executions. The schedules’ model-call, recomputation, and context–memory transfer counts are determined analytically.
Across the evaluated instances, every prescribed schedule reproduces these analytical counts without a capacity violation. Persistent execution achieves linear model-call complexity with linear context–memory traffic, resident execution removes the transfer cost when all required state fits in context, and recomputing execution incurs the predicted additional semantic calls when persistent state is unavailable. Figure 2 (d) summarizes these implementation checks.