Manuscript Offprint
arXiv:2610.02488Harnessing LLMs as Agents: What Does It Cost?
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Zelin Zhao, Xinyu Guo, Jingyuan Zhang, Yuxuan Zhang, Yongxin Chen
Georgia Institute of Technology, Etude AI
Language-model agents increasingly rely on harnesses that manage bounded context, persistent memory, tools, verification, and repeated execution, but existing notions of model capability do not quantify the computational resources these mechanisms consume. We develop a theory of these costs through the Language Model Agent Machine (LAM), a resource-bounded model that fixes the underlying semantic model while explicitly charging harness-level resources. Our theory yields four classes of results. Communication: LAM execution and red–blue pebbling are instancewise equivalent at the level of simultaneous call–transfer budgets, yielding the full discrete resource frontier and transferring classical I/O lower bounds to context–memory traffic. Access: memory interface changes asymptotic cost, including a separation between random and non-speculative sequential access on pointer chasing and an exact single-stack FIFO frontier. Recomputation: bit-reversal DAGs require model calls with context capacity C and persistent-memory capacity S, quantifying when stored intermediate state avoids repeated semantic computation. Reliability: we derive tight stage-local sampling bounds, exact imperfect-verification costs, and a Young–Daly-type checkpoint law with a closed-form optimal verification interval. Controlled experiments and held-out evaluations on GPT-6 Astra [1] compare development-derived communication and reliability predictions with measurements, including checkpoint optima and a held-out policy-selection tournament conditional on a programmatic segment check; held-out chained MATH additionally exposes an observed tradeoff between whole-task call granularity, logical input traffic, and reliability. Prescribed-schedule runs are reported separately as implementation checks. Together, these results provide a resource theory for the computational cost of language-model agent harnesses.
Main Contact: zelin@gatech.edu
(a) From deployed LM system to agent system
An LM agent interacts with context, memory, tools, and verifiers to accomplish user tasks.

(b) LAM formalization

L=model interface
Language model
that maps contexts
to outputs
(next-token oracle).

ctrl= controller
Routing controller
that orchestrates
calls, tool use,
memory, and
verification.

X=active context
Active context /
working set.
Bounded model-
facing state used
for the current
operation.

M=memory
Persistent
memory retaining
blocks across
calls.

External tools
(e.g., search. code
execution,
databases).

Verification and
checking (e.g.,
self-critique,
external verifiers,
reward models).
(c) Tracked resources
| Resource | Description | Quantity (notation) |
|---|---|---|
| Calls | Number of calls to each module (model, tools, verifier). | |
| Tokens | Input and output tokens (to/from the language model). | |
| Memory interface | Memory read/write operations (e.g., blocks retrieved or moved). | |
| Capacities | active-context capacity, persistent-memory capacity. | C, S |
| Reliability | Allowed error probability (for wrong outputs or checks). | δ |
(d) Red--blue pebbling interpretation
A computation can be viewed as placing and removing pebbles on intermediate results.
(i) Computation DAG

Z depends on A and B.
(ii) Pebble A

A is stored in persistent memory, represented by a blue pebble.
(iii) Pebble B

Loading A and B into active context changes their pebbles from blue to red.
(iv) Pebble Z

With A and B in active context, the model can compute Z, placing a red pebble on Z.
(v) Remove A and B

A and B may be evicted from active context, while 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, token traffic , , memory operations, capacities, target failure probability ); (d) red–blue pebbling (context blocks red, memory blocks blue, transfers communication).
1. 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 (Section 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-realisable 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 logical input symbols, versus for full-history replay (Proposition 12).
• The memory interface changes computational complexity (Section 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 pointers in k reads, whereas every always-correct non-speculative sequential execution requires expected head movements; even unrestricted always-correct read-only sequential execution retains an lower bound (Theorem 2, Proposition 14).
• Persistent state trades directly against semantic recomputation (Section 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 , 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 is linear in ; without persistence, the same computation incurs a multiplicative recomputation overhead when .
• Correctness feedback changes the cost of reliable execution (Section 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
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 (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.
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:
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.
| Resource | Harness-specific obstacle | LAM result |
| Communication | A harness may copy, evict, reload, and recompute physical block occurrences while the controller manages state outside the computation DAG. | Value provenance yields an instancewise correspondence with red-blue pebbling and equality of the feasible budget region, hence the full discrete call-traffic Pareto frontier. |
| Access | Equal-capacity memories expose different admissible operations, and buffering or copying can invalidate ordinary stack or stream arguments. | Random versus non-speculative sequential access has a separation on pointer chasing, while FIFO retrieval admits an exact single-stack feasibility and traffic frontier. |
| Recomputation | Only active context participates directly in semantic calls, while persistent state must be explicitly recovered and the input may be delivered only once. | Bit-reversal execution has optimal call complexity , with an exact feasibility region and a matching linear-transfer construction. |
| Reliability | Errors occur inside a dependent state trajectory and correctness feedback is itself a priced resource. | Stage-local sampling is tight, imperfect verification has an exact error-cost law, and rollback admits a closed-form optimal checkpoint interval. |
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 (Section 8).
Communication, access, and recomputation. Red-blue pebbling [16] and classical bit-reversal tradeoffs [17] 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 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.
Reliability and cost-aware execution. Noisy-query theory, reliable computation, verifier-assisted generation, and checkpointing study different aspects of computation under uncertainty [10], [18], [19], [20], [21], [22], [23]. 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 [24], [25]; our theory instead predicts feasible resource tradeoffs and harness choices before execution, which we test prospectively in Section 8.
3. 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 1a). 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.
Semantic block. Fix an input size and a finite alphabet . A semantic block, a fixed-width unit of task-relevant information, is an element of , where is the block width.
Machine model. A LAM is a tuple , drawn in Figure 1b, where is the model interface, is the harness controller, is the active context, is the persistent memory, and and are the tool and verifier interfaces. The active context holds at most blocks available to the next model call; the persistent memory holds at most blocks across calls outside , and a stored block must be retrieved into before a call can use it, the persistent copy staying in place. A call to consumes blocks in and inserts its output as a new block of , so a call takes at most argument blocks. A tool returns a semantic block through an explicitly charged operation. A verifier returns a tag (e.g. accept/reject in Section 7), inserts no block, and may inspect all resident blocks. Each of , and is a fixed map of its opcode and argument blocks alone (the interface clause): no interface sees the input, , 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 and public step counters; Definition 3 (Appendix A) 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.
4. Communication: Moving State Across Bounded Context
Communication cost. For model-facing traffic, let be the total number of symbols supplied to model calls over an execution and the number produced by them; for context-memory traffic, let be the number of semantic blocks transferred between X and M, that is symbols.
Computation graph. We represent dependencies among semantic blocks by a DAG 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 meaning that 's block is required to compute 's. is -realisable if every internal vertex can be computed by the same interface from its predecessor blocks.
Red-blue pebbling. The red-blue pebble game [16] represents block movement between X and M (Figure 1d): a red pebble on v means its block is in X, a blue pebble that a copy is in 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, blue pebbles by S, and each load or store adds one to . 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; is the least number of loads and stores of such a pebbling ( when 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-evaluation). A vertex-granular evaluation of an L-realisable DAG G is a VPA-respecting LAM execution that produces the designated sinks of G, where each charged semantic call implements at most one declared vertex operation of 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, the context is initially empty, and every designated sink is resident in X or 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 be an L-realisable computation DAG with designated sinks. Every memory-initialized vertex-granular G-evaluation with capacities (C, S) induces a legal red–blue pebbling with at most C red and 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 grid bound yields for when persistent storage is nonbinding (Corollary 11).
5. 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 be the number of unit head movements and the equal-weight memory-interface operation count (written Q in the appendices); for random access (separate deployment weights in Appendix E).
Pointer chasing. A memory table has entries, entry storing an index for a permutation of . Starting from , the agent reads entry to obtain for steps and outputs . One semantic block holds one index in , so , and is fixed. For the sequential interface the table is read-only, entry occupies cell and the head starts at cell 1; we consider non-speculative executions: every READ is of cell or of a cell whose index is the content of a block previously read into .
Theorem 2 (Demand-following pointer chasing). For the pointer-chasing task above, let be uniformly random over permutations of , and let . A random-access LAM follows the pointers with and : at with no model call when SETADDR decodes each entry, at with calls when an oracle call decodes each entry instead. Every always-correct, non-speculative sequential LAM, deterministic or zero-error randomised, satisfies over and its random tape, hence .
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 hops moves the head in expectation (Appendix C.1). Beyond this class, Proposition 14 gives for every always-correct read-only sequential execution, and Remark 3 a speculative bounded-workspace machine with expected head movements for .
Exact one-stack frontier (Corollary 19). In , 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 for its constant set (Theorem 17). Its exact worst-case frontier is
feasible and , ,
with lower bounds valid under arbitrary write-phase buffering, whereas copy-free streaming requires (Theorem 17(iii)); a content-blind schedule attains the frontier (Corollary 19, Appendix C.3), and random access works at , . 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 ; a single-copy normal form makes the count independent of buffering (Lemma 18, Appendix C.3).
6. Recomputation: Persistence versus Regeneration
Persistence and recomputation. In the bit-reversal DAG many intermediate results are reused after leaving active context. Let and let rev (i) reverse the m-bit binary string of . The DAG consists of two length-n chains and with edges , so the first chain's results are reused by the second in a different order.
Theorem 3 (Persistence versus recomputation). Let be L-realisable and a power of two. Over input-delivered vertex-granular evaluations of (Definition 2) with context , random-access persistent memory of capacity and , the least number of model calls is , explicitly , the upper bound attained by a RAM-LAM with ; the displayed lower bound also holds for every input-delivered vertex-granular G-evaluation with and . For , an input-delivered vertex-granular G-evaluation exists if and only if and . Thus gives calls with , under the memory-initialized convention as well, and requires .
Within the feasible region, if and only if : sublinear total semantic capacity forces superlinear calls however it is split between context and persistence, the split setting the transfer cost (Appendix C; Appendix G.3). Proof idea. For , the u-arguments of consecutive outputs lie apart and at most of the gaps hold a pebble, so each window forces fresh first-row placements (Lemma 20); disjoint windows give the term, and evenly spaced checkpoints attain it.
7. Reliability: Verification and Check-pointing
Consider a chain of n semantic transitions in which, given a correct state, a model call returns the intended successor with probability ; an undetected error propagates to the end; we ask how sampling and verification change the cost of an overall failure probability at most .
Sampling without correctness feedback. For independent repeated calls at a fixed state, let 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 [21]: under independent samples, if at most A incorrect alternatives have nonzero probability at each correct state, each with probability at most , a plurality vote over samples per transition reaches overall failure probability at most with model calls (Theorem 21, Appendix D); on the binary hard family ( ) this order is optimal, so the upper and lower orders match for bounded A.
Theorem 4 (Stage-local sampling lower bound). There exists a depth-n binary-tree family of -separated transition distributions, , its nodes encoded as blocks of width , 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 , , over labels, samples and its own randomness, satisfies , which is for .
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 D).
Local verification. With verification the agent receives a correctness signal before committing to the next state. Let a verifier call have weighted cost relative to one model call, so that . With a perfect local verifier, fresh independent attempts of error probability , and uncapped retries, retry-until-accept terminates almost surely with zero error and expected weighted cost (Appendix D, Theorem 22). On the hard family of Theorem 4 this removes the factor for constant and : the gain comes from feedback, not from more sampling. For an implemented checking procedure with joint acceptance masses and , i.i.d. attempts give accepted-error probability and mean attempt count , dependent checks within an attempt included; Theorem 5 below is the content-independent, conditionally independent case, generalised in Corollary 23–Corollary 24 (Appendix D).
Theorem 5 (Imperfect local verification). Let be the probability that the verifier accepts a wrong candidate and the probability that it rejects a right one, the same whatever the candidate's content, and let . Suppose candidate attempts are independent, the checks of a candidate are conditionally independent given its correctness, every attempt pays for all t checks, and a candidate is accepted only if all t accept. Define , , and . Then, at any transition whose earlier accepted transitions are all correct, the accepted candidate is incorrect with probability and the expected numbers of attempts, model calls and verifier calls are , and ; hence . If the attempt law is the same at every visited state, the chain fails with probability exactly , and summing over the transitions gives the unconditional totals , and .
The accepted-error odds strictly decrease with if and only if , since ; at one check makes them zero. Under the stationary attempt law at fixed with and , the smallest with gives , , with (Corollary 25; varying- bracket, capped-retry law and short-circuit costs in Appendix D, Remark 8).
Checkpointing. Alternatively, verify every k transitions and roll a rejected segment back to the last accepted checkpoint.
Theorem 6 (Checkpoint law). Assume independent transition errors with probability , a perfect segment verifier of cost , and a policy that verifies every transitions and rolls back the entire rejected segment. If divides , its expected weighted cost is . For and , writing , the positive-real minimizer is . When , , and if also .
The square-root scaling is the checkpointing law of J. W. Young [22], [23] in the whole-segment form of silent-error checkpointing (Appendix D); an optimum of the integer extension of lies within one of , and a verifier cost linear in returns the optimum to (Appendix D). For absorbing-error length- rollback attempts costing under a perfect segment verifier, conditional hazards in , , after every history and rollback bracket , , between at and at , without independence within or between attempts (Proposition 28, Appendix E).
A joint decision. Local checks and rollback combine into a policy cheaper than either mechanism alone in an explicit regime; Proposition 26 (Appendix E) prices it exactly, , with the expected weighted cost per locally accepted step, its residual error (Theorem 5) and the perfect segment-verifier cost (transfer price in Corollary 27).
8. 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 G.
(a) Held-out MATH · GPT-6 Astra final answer all links

held-out success (Wilson 95%)
(b) Held-out policy tournament,
held-out success (Wilson 95%) cost / chain
(c) Checkpoint , stipulated prices 1, 4, 16
(d) Bit reversal implementation check
Recompute Persistent Resident Direct
n = 16 n = 32 Forecast cost Measured cost
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 ; the horizontal dashed line is the target success probability 0.90. (c) Checkpoint cost 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, and hollow/filled markers denote forecast/measured cost.
Communication. As Proposition 12 predicts, replay-to-dependency-only logical input grows linearly with depth: at on the synthetic chain ( under the exact-prefix cache model) and cached) on development MATH (Appendix G.1).
8.1. Held-out MATH: traffic, success, and granularity
From the 207 eligible MATH-500 problems [26], [27] we build 100 depth-16 answer-dependent chains following Compositional GSM [28]: 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 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.
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.
8.2. Reliability: checkpoint forecasts and held-out policy selection
An arm is a policy of Section 7 on a length-16 modular-affine chain with target failure probability . Forecast quantities are fixed before evaluation and compared against held-out measurements and their 95% intervals. The deployment’s calibrated step error is , and its YES/NO check costs solver calls in tokens (Appendix G.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 . Checkpoint attempts per segment match the frozen predictions at (1.051/1.222/2.230 forecast versus 1.049/1.208/2.083 measured), the cost forecast 24.4 is measured at 24.2 [22.3, 26.3], and forecast and measured grid minimisers coincide at every price ( ; 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. A decision rule calibrated on disjoint data is held fixed on 100 shared held-out chains per arm. At the primary setting , the frozen decision rule selects rollback . On the held-out chains, 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 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 G.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 G.3).
9. 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
[1] OpenAI, “GPT-6 Astra: A New Generation of Intelligence.” [Online]. Available: https://openai.com/index/gpt-6-astra/
[2] Z. Li, H. Liu, D. Zhou, and T. Ma, “Chain of thought empowers transformers to solve inherently serial problems,” in International Conference on Learning Representations, 2024, pp. 11911–11943.
[3] W. Merrill and A. Sabharwal, “The expressive power of transformers with chain of thought,” in International Conference on Learning Representations, 2024, pp. 7690–7706.
[4] C. Viriyasuthee, “Computability of Agentic Systems.” [Online]. Available: https://openreview.net/forum?id=ZrFZW2xGjK
[5] C. Zhou et al., “Externalization in LLM Agents: A Unified Review of Memory, Skills, Protocols and Harness Engineering.” [Online]. Available: https://arxiv.org/abs/2604.08224
[6] M. Hahn, “Theoretical limitations of self-attention in neural sequence models,” Transactions of the Association for Computational Linguistics, vol. 8, pp. 156–171, 2020.
[7] J. Pérez, P. Barceló, and J. Marinkovic, “Attention is turing-complete,” Journal of Machine Learning Research, vol. 22, no. 75, pp. 1–35, 2021.
[8] D. Schuurmans, “Memory augmented large language models are computationally universal,” arXiv preprint arXiv:2301.04589, 2023.
[9] S. Yao et al., “ReAct: Synergizing Reasoning and Acting in Language Models,” in International Conference on Learning Representations (ICLR), 2023.
[10] E. Botta, Y. Li, A. Mehta, J. T. Ash, C. Zhang, and A. Risteski, “On the query complexity of verifier-assisted language generation,” arXiv preprint arXiv:2502.12123, 2025.
[11] U. Tiwari, S. S. Nalli, and A. Deshpande, “Modeling Tool Use in Transformers via Computation Oracles,” in Workshop on Latent {backslash&} Implicit Thinking {backslashstextendash} Going Beyond CoT Reasoning, 2026.
[12] C. Packer et al., “MemGPT: Towards LLMs as Operating Systems,” arXiv preprint arXiv:2310.08560, 2023.
[13] Z. Zhao, K. Samel, B. Chen, and L. Song, "ProTo: Program-Guided Transformer for Program-Guided Tasks," in Advances in Neural Information Processing Systems, M. Ranzato, A. Beygelzimer, Y. Dauphin, P. Liang, and J. W. Vaughan, Eds., Curran Associates, Inc., 2021, pp. 17021–17036. [Online]. Available: https://proceedings.neurips.cc/paper_files/paper/2021/file/8d34201a5b85900908db6cae92723617-Paper.pdf
[14] Z. Zhao, C. Gan, J. Wu, X. Guo, and J. B. Tenenbaum, "Augmenting policy learning with routines discovered from a single demonstration," in Proceedings of the AAAI Conference on Artificial Intelligence, 2021, pp. 11024–11032.
[15] Z. Zhao, B. Yuan, Y. Zhu, J. Choi, and Y. Chen, “RMA: an Agentic System for Research-Level Mathematical Problems,” in COLM 2026 The 2nd Workshop on Lifelong Agents: Learning, Aligning, and Evolving, 2026. [Online]. Available: https://openreview.net/forum?id=zQzDazhvAA
[16] J.-W. Hong and H. T. Kung, “I/O complexity: The red-blue pebble game,” in Proceedings of the Thirteenth Annual ACM Symposium on Theory of Computing (STOC '81), New York, NY, USA: Association for Computing Machinery, 1981, pp. 326–333. doi:10.1145/800076.802486.
[17] T. Lengauer and R. E. Tarjan, “Asymptotically tight bounds on time-space trade-offs in a pebble game,” J. ACM, vol. 29, no. 4, pp. 1087–1130, Oct. 1982, doi: 10.1145/322344.322354.
[18] U. Feige, P. Raghavan, D. Peleg, and E. Upfal, “Computing with Noisy Information,” SIAM Journal on Computing, vol. 23, no. 5, pp. 1001–1018, 1994, doi: 10.1137/S0097539791195877.
[19] J. von Neumann, “Probabilistic Logics and the Synthesis of Reliable Organisms From Unreli-
able Components," in Automata Studies, Princeton: Princeton University Press, 1956, pp. 43–98. doi: doi:10.1515/9781400882618-003.
[20] N. Pippenger, “Reliable computation by formulas in the presence of noise,” IEEE Transactions on Information Theory, vol. 34, no. 2, pp. 194–197, 1988, doi: 10.1109/18.2628.
[21] X. Wang et al., “Self-Consistency Improves Chain of Thought Reasoning in Language Models,” in International Conference on Learning Representations (ICLR), 2023.
[22] J. W. Young, “A first order approximation to the optimum checkpoint interval,” Commun. ACM, vol. 17, no. 9, pp. 530–531, Sep. 1974, doi: 10.1145/361147.361115.
[23] J. Daly, “A higher order estimate of the optimum checkpoint interval for restart dumps,” Future Generation Computer Systems, vol. 22, no. 3, pp. 303–312, 2006, doi: https://doi.org/10.1016/j.future.2004.11.016.
[24] S. Kapoor, B. Stroebl, Z. S. Siegel, N. Nadgir, and A. Narayanan, “AI Agents That Matter,” arXiv preprint arXiv:2407.01502, 2024.
[25] L. Chen, M. Zaharia, and J. Zou, “FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance,” arXiv preprint arXiv:2305.05176, 2023.
[26] D. Hendrycks et al., “Measuring Mathematical Problem Solving With the MATH Dataset,” in Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, 2021.
[27] H. Lightman et al., “Let’s Verify Step by Step,” in International Conference on Learning Representations, 2024.
[28] A. Hosseini, A. Sordoni, D. Toyama, A. Courville, and R. Agarwal, “Not All LLM Reasoners Are Created Equal,” arXiv preprint arXiv:2410.01748, 2024.
[29] C. Yang, N. Srebro, D. Mcallester, and Z. Li, “PENCIL: Long Thoughts with Short Memory,” in Proceedings of the 42nd International Conference on Machine Learning, A. Singh, M. Fazel, D. Hsu, S. Lacoste-Julien, F. Berkenkamp, T. Maharaj, K. Wagstaff, and J. Zhu, Eds., in Proceedings of Machine Learning Research, vol. 267. PMLR, 13 2025, pp. 71092–71156.
[30] G. Ballard, J. Demmel, O. Holtz, and O. Schwartz, "Minimizing communication in numerical linear algebra," SIAM Journal on Matrix Analysis and Applications, vol. 32, no. 3, pp. 866–901, 2011.
[31] N. Nisan and A. Wigderson, “Rounds in Communication Complexity Revisited,” SIAM Journal on Computing, vol. 22, no. 1, pp. 211–219, 1993, doi: 10.1137/0222016.
[32] W. Hoeffding, “Probability Inequalities for Sums of Bounded Random Variables,” Journal of the American
Statistical Association, vol. 58, no. 301, pp. 13–30, 1963, doi: 10.1080/01621459.1963.10500830.
[33] A. Wald, Sequential Analysis. New York: John Wiley & Sons, 1947.
[34] J. Bretagnolle and C. Huber, “Estimation des densités: risque minimax,” Zeitschrift für Wahrscheinlichkeits-theorie und verwandte Gebiete, vol. 47, no. 2, pp. 119–137, 1979.
[35] A. B. Tsybakov, Introduction to nonparametric estimation, vol. 11. Springer, 2009.
[36] G. Aupy, A. Benoit, T. Hérault, Y. Robert, F. Vivien, and D. Zaidouni, “On the Combination of Silent Error Detection and Checkpointing,” in 2013 IEEE 19th Pacific Rim International Symposium on Dependable Computing (PRDC), IEEE, 2013, pp. 11–20. doi:10.1109/PRDC.2013.10.
[37] A. Benoit, A. Cavelan, Y. Robert, and H. Sun, “Assessing General-Purpose Algorithms to Cope with Fail-Stop and Silent Errors,” ACM Transactions on Parallel Computing, vol. 3, no. 2, p. 13:1–13:36, 2016, doi:10.1145/2897189.
[38] Z. Zhao et al., “CETCam: Camera-Controllable Video Generation via Consistent and Extensible Tokenization,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Findings, Jun. 2026, pp. 4749–4758.
[39] Z. Zhao, P. Molodyk, H. Xue, and Y. Chen, “Laplacian Multi-scale Flow Matching for Generative Modeling,” arXiv preprint arXiv:2602.19461, 2026.
[40] Z. Zhao et al., “Physics-informed Neural-operator Predictive Control for Drag Reduction in Turbulent Flows.” [Online]. Available: https://arxiv.org/abs/2510.03360
[41] Z. Zhao, Z. Wu, Y. Zhuang, B. Li, and J. Jia, “Tracking objects as pixel-wise distributions,” in European Conference on Computer Vision, 2022, pp. 76–94.
[42] Z. Zhao, F. Fan, W. Liao, and J. Yan, “Grounding and enhancing grid-based models for neural fields,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024, pp. 19425–19435.
Table 2. Prior models of language-model computation as LAM parameter settings. is the number of reasoning steps. Context is measured in blocks; physical symbol/token width is . 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.
| Model | Memory | Context | Verifier | Resource that grows |
|---|---|---|---|---|
| Direct inference | — | — | nothing () | |
| Chain of thought [3] | — | — | context | |
| Managed context [29] | — | — | calls only | |
| Memory-augmented [8] | ram | — | calls, memory I/O | |
| Tool-augmented [11] | any | — | oracle queries | |
| Verifier-assisted [10] | any | yes | verifier queries | |
| LAM (this work) | any | any | optional | all of them, jointly |
A. Formal machine semantics
Relation to prior inference abstractions. Table 2 places several existing inference abstractions within the resource coordinates of LAM.
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 , the block space , a finite tag alphabet , a finite set of constant blocks, and capacities and . A configuration consists of
-
a finite-control state , finite;
-
the active context : 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 , an interface-specific store of at most blocks ( may be unbounded): for RAM an array of cells ; 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 and, for RAM, an address register . A STREAM machine has no address register: its only address state is the head position , which the controller may consult but which changes only by MOVE(); a STACK machine has neither;
-
public structural counters: finitely many integers whose values after steps are fixed functions of and 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 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 -evaluation (Definition 2), each value-producing call is assigned a vertex of ; 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 hold bits, the last term being the address or head state for RAM and STREAM (zero when ) 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 to , the counters and the occupancy pattern of (which slots are full, not what they hold) to choose the next control state and one operation:
-
CALL(, opcode, slots), and likewise a tool call: the blocks in the named occupied slots, at most 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(, opcode, slots), returns a tag only and inserts no block, so the cap does not apply to it: its arguments may be all resident blocks (Remark 9 uses two at ). Interface clause: , each tool and each verifier is a fixed map from (opcode, argument-block tuple) to (block, tag), or to a tag alone for a verifier; it has no access to the input, to , to the registers or to any block not among its arguments, so equal opcodes and arguments always return equal results.
-
COPY(slot free slot), EVICT(slot), and CONST( free slot) for .
-
Memory operations. RAM: READ() copies into a free slot and WRITE(, slot) copies the slot into , the address being the address register or a fixed function of the public counters. STREAM: MOVE(), counted by 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 ; a READ of a cell that holds no block delivers the blank constant , with constant provenance.
-
SETADDR(slot) and SHIFT(), 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 , clipped to , reading no block. No interface turns
block content into a position for free: a STREAM head reaches a cell only through MOVES charged to , one per cell traversed, and a stack only through PUSH/POP charged to ; 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 instead.
• EMIT(slot): the block in the slot is the next output block; a halting step may also emit a tag.
The observation counter 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 ; they are counted through N. A randomised LAM additionally gives a random tape. Content-dependent state. Besides the registers, 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 bits, and a step counter carries 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, bits in all; the context adds 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 Section 4–Section 6 bounds this state (the simulation of Theorem 16, Appendix C.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 Section 4–Section 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 Section 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: 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 do not depend on 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 be a single deterministic LAM of Definition 3, its finite control, interfaces, tag alphabet and constants fixed independently of the input length, with (no persistent memory), fixed block width b, total active semantic capacity C blocks, and no public structural schedule counters, reading its input as a stream of blocks. Then the language decided by is regular; conversely every regular language is decided by such a LAM with 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 between input blocks is, by Definition 3, the tuple (control state, contents of the at-most-C active semantic slots, last tag, address register). There are at most such configurations, a finite number because and hence are fixed in this proposition and . Named routing block registers do not contribute an additional factor: by definition they are names for slots inside the same 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) configuration is a well-defined finite transition function, i.e. a DFA over the alphabet . Conversely, given a DFA , encode the DFA state in the controller’s finite control, pass the current input block to an oracle implementing , and return the next DFA state as a constant-size tag. The input and returned block co-reside, so under our insertion convention.
Proposition 8 (Resource-accounted universality). For every one-tape Turing machine T running in time and space there is a LAM deciding with memory, blocks and a single deterministic oracle, with oracle calls, block movements, , and .
Proof. Take 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'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, returns the new symbol block , and emits a tag . 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 , and SHIFT( ) the address as selected by . At most the input symbol and returned symbol co-reside, so 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 calls and movements per step, at C = 3. Everything the controller does is copying, addressing and finite branching, so VPA holds. Summing over t steps gives the claim. Universality per se is not new [8]; the content here is that it costs calls and block movements per simulated step at constant context. □
B. Context-memory communication
B.1. Proof of Theorem 1
We use the red–blue convention of Section 4. Red pebbles model the active semantic store of capacity C, and blue pebbles slow memory of capacity ( suffices for the grid of Corollary 11, whose lower bounds hold for every smaller 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 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 is its minimum over pebblings that end with every designated sink red or blue ( when 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-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 was read from M or returned by a call, and every block in M was there initially or was written from 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 or in 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 and apply the same argument to .
Proof of (i), soundness. Fix a halting vertex-granular G-evaluation R. By VPA, every semantic block is an input, a constant, or an -call output corresponding to a vertex of 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,
The active semantic slots include named controller block-register slots, so and there is no additional uncharged semantic fast storage. Now map events: (i) an call producing has the blocks labelled by as its arguments, so at that instant. The returned block is appended before eviction and the call is a legal COMPUTE of ; allows the predecessors and result to co-reside; (ii) a Read(a) moving a block labelled from RAM into an active semantic slot is a LOAD (legal: , as the cell was written earlier or holds an input); (iii) a Write(a, ) of a resident block labelled is a STORE; (iv) an eviction of the last resident copy of a block labelled , 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 ; copying or renaming among active semantic slots does not create extra pebbles, and because the run uses no CONST or INPUT, (i)–(iii) 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 , exactly COMPUTE moves and at most 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 be a legal pebbling of the fixed L-realisable functional DAG G with red bound C, P COMPUTE and I I/O moves. Assign each blue-pebble lifetime interval of (a node v from a STORE, or from time zero for a source, until that blue pebble is deleted) a ram address by a fixed static allocation: is fixed and carries at most S blue pebbles at any time, so greedy colouring of these intervals in order of their left endpoints uses at most S distinct addresses; a deleted blue pebble's block stays in its cell, ignored, until the address is reused, and since at most S addresses are ever used, never holds more than blocks (one address per node suffices when ). Build a controller whose control states are , one per move — a finite set, since and are fixed — with executing : COMPUTE() the fixed oracle call realising on the resident predecessor blocks with its allowed opcode; LOAD() Read(); STORE() Write(, ); DELETE() evict. Before this, drop from every LOAD or COMPUTE of a vertex already red: under set semantics such a move changes no pebble, so legality is preserved and neither nor increases, and every remaining LOAD or COMPUTE finds a free slot, since a legal placement on a vertex not yet red requires fewer than red pebbles at that instant. Legality of then guarantees each precondition holds and that at most 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 -evaluation: the sources sit at their addresses from the start, the context starts empty, no CONST or INPUT is used, and since ends with every sink red or blue the run ends with a block for each sink resident or stored. It has and . 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 over memory-initialized vertex-granular -evaluations of this fixed realisation.
Corollary 9 (Priced call-traffic optimum). For every , , where ranges over memory-initialized vertex-granular -evaluations of with capacities and over legal red-blue pebblings of with at most red and blue pebbles, being the number of COMPUTE moves and the number of LOAD and STORE moves; a RAM memory-initialized vertex-granular -evaluation attains the optimum, and one side is feasible if and only if the other is (an infeasible minimum being ).
Proof. For any memory-initialized vertex-granular G-evaluation R, the proof of (i) produces a legal pebbling with exactly COMPUTE moves and I/O moves, so the minimum pebbling objective is at most the minimum machine objective. Conversely, the proof of (ii) turns any legal into a RAM memory-initialized vertex-granular G-evaluation (one machine per pebbling, non-uniform as in the theorem) with and , 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 , a memory-initialized vertex-granular G-evaluation of G with capacities , and exists if and only if a legal red-blue pebbling with at most C red and S blue pebbles, COMPUTE moves and 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 and , coincide.
Proof. The proof of (i) maps an evaluation with to a pebbling with and ; the proof of (ii) maps a pebbling with to a RAM evaluation with and . 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 per use. If outputs could be streamed, a run could emit a sink and evict it: with one source, , and four unary sinks, a run loads the source once and computes, emits and evicts each sink, for , 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 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-evaluations (Definition 2), over which Theorem 3 states its 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 C), 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 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 , use no blue pebble at all, and neither is an input-delivered run. Theorem 3 needs no converse, its 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 inputs this costs model calls and transfers, against . Input reads stay charged; what collapses is the value creation. The 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.
B.2. Corollary 11 and Proposition 12: statements and proofs
We give the full statements and proofs of the communication consequences used in Section 4.
Corollary 11 (Communication bounds). Let the grid DAG have vertices , sources on row 0 and column 0, sink , and edges into each internal vertex , from and . Over memory-initialized vertex-granular G-evaluations with and , the minimum transfer count is , hence for . For the ordinary -operation matrix-multiplication DAG on inputs, with , enough to hold all sources initially (a memory-initialized vertex-granular G-evaluation also needs ; Appendix B), .
Both orders are bounds of J.-W. Hong and H. T. Kung [16]; the grid is reproved below with explicit constants, recomputation allowed, and matched by tiles of side . Both bound evaluation of the prescribed DAG, not computation of its function by other means.
Proposition 12 (Sequential input traffic). Consider an n-step chain in which each step produces one semantic block of width b. If the i-th call receives all earlier blocks, its input size is and . If each step instead depends on only earlier blocks and only those blocks are supplied, then , and no LAM evaluating a non-degenerate chain vertex by vertex, each call taking the previous block as an argument, has .
Proof of Corollary 11. Both DAGs have in-degree at most two, so the insertion convention needs only , and Theorem 1, whose hypotheses on memory-initialized vertex-granular G-evaluations the corollary inherits, reduces the claim to bounds on in the red–blue game of Appendix B, recomputation allowed, with S at least the number of sources, as the corollary assumes; the lower bounds hold a fortiori for smaller S, and the schedules of the upper bounds hold at most 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 I/O moves. Cut its move sequence after every -th I/O move; this gives consecutive phases, each containing at most I/O moves. Let be the set of internal vertices that receive a COMPUTE in phase , and let be the set of vertices outside with an edge into .
Claim 1: . Let with an edge , . At the COMPUTE of in phase , is red. A red pebble on is placed by COMPUTE( ), which does not occur in the phase since , or by LOAD( ); so either was red at the start of the phase, or it was loaded during the phase. At most vertices are red at the start and at most loads occur in the phase.
Claim 2: . Let be the set of rows and the set of columns that meet . In a row let be the leftmost vertex of ; it is internal, so and is an in-neighbour of it outside , hence in . Distinct rows give distinct such vertices, so ; the topmost vertex of each column gives ; and .
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 , so and . For the subtracted term is at most , giving . Independently, each of the sources is a predecessor of an internal vertex and must be loaded once, so . Together, for every and ,
where the last inequality uses and, for , . This is the Hong–Kung partition argument with the immediate-predecessor frontier 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 put and cover the internal vertices by tiles (smaller at the boundary) taken in row-major order of tiles. For a tile, load its north halo (the row above it, values) and west halo (the column to its left, 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 ( values). While computing the resident blocks are the unused north-halo or previous-row values in columns , the current-row values in columns , the unused west-halo values, and the output: at most . Each tile costs at most 4s transfers, and there are at most tiles, so
using for and . At the row-major schedule, which loads two predecessors and stores one result per vertex, gives . For the row-major schedule keeps the previous row resident, loads each of the sources with a successor once and leaves the sink resident, so , meeting the source count of the lower bound; for use . Hence for every , and with the lower bound . 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 and adds the products of each entry along a chain, so its in-degree is two; J.-W. Hong and H. T. Kung [16] prove for it, for an absolute constant and all with a constant (see also G. Ballard, J. Demmel, O. Holtz, and O. Schwartz [30]); we carry 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 additional stores turn a pebbling of our game into one of that game, so the bound transfers with an additive loss of at most . Put . For one has , i.e. , so ; for the input loads alone give . Both cases are with a constant depending on and only. This is a bound for evaluating that DAG, not for computing the product by another algorithm. The hypothesis 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 -evaluation exists. (A memory-initialized vertex-granular -evaluation of this DAG needs : a source cannot be regenerated, so just before the first deletion of a source's last copy all sources still hold slots, and each of the vertex-disjoint paths from that source to distinct outputs must already hold a non-source block, blocks in slots; if no source is ever deleted, the output blocks of the final configuration join the sources instead. At , , this is 36 blocks in 35 slots, so no memory-initialized vertex-granular -evaluation exists although .) 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 , held in from the start (if it is instead delivered once by INPUT, one further WRITE puts it there), and calls , call producing . Replay. Call takes the blocks as arguments, so with the inserted output it needs slots, at call , and . Persistent memory. The controller loads (one block movement), calls the oracle with the two blocks , three slots with the inserted output, and stores (one block movement): , , and . Lower bound. Assume each chain step is non-degenerate, i.e. is not a copy of any earlier block. Then every , , 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 , and since that call takes the block standing for as an argument, it carries at least symbols and . Definition 3 permits zero-argument calls, which is why the proposition names this hypothesis. Hence replay is a factor from optimal in prompt tokens.
C. Memory architecture
C.1. Proof of Theorem 2
Upper bound. The ram controller keeps the current index in the address register and repeats k times: Read(a) into its one slot, then SETADDR on that slot, which decodes the stored index into the address register, then evict; after the k-th read it emits the block instead. Per hop there is one block read and no head motion, so , , , and C = 1. If decoding the entry is instead charged as an oracle call, its returned block is the argument of SETADDR, giving and C = 2; a tag cannot carry the index in a uniform family, being fixed as n grows, whereas the instancewise lower bounds place no bound on and use none.
Lower bound. Work in the read-only stream model of the theorem: cell i contains , the head starts at cell , and
(the appendices write Q for the main text’s ), where reads contribute to and unit head displacement contributes to . Put and let be the event that 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 the revealed addresses are , so the first reads of new cells occur in the order . Correctness on every permutation forces these reads to happen. Fix with and suppose the run on never reads cell ; then it reads only cells among . 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 with for , whatever its constants or tags. Among these permutations one has , so that the orbit of is the cycle and the correct answer lies in ; another continues the orbit through
further distinct cells, which exist since , so that lies outside . The machine answers the same on both and errs on one, contradicting always-correctness. Hence on the run first reads in this order, the first read of after that of ; 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 the largest index for which holds,
For a uniformly random permutation, conditional on and on the values , the next value is uniform on the indices outside . At most indices lie at distance less than from any given point, so for at least of those indices differ from and lie at distance at least from ; therefore . The cycle of has length uniform on , so . Summing over , for , and . Consequently some permutation incurs this aggregate memory-interface-step cost. It is dominated by sequential head motion and is not an lower bound on physically transferred symbols; only 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 and ” holds tape by tape. Hence 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 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 is the wrong question even there. Bounding the context alone does not suffice: for one fixed , Definition 3 allows and , and then a machine scans the tape once , passes each cell's block to a verifier whose tag is the index it holds , records in its finite control, computes there, moves the head to cell (at most ), reads it and emits the block: for every . Bounding the control alone does not suffice either: with and , 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 , a machine with control scans the tape once, folding each cell into one accumulator block by a model call, and obtains from the accumulator by one more call, so for every . Finally, the content-dependent state of Definition 3 is not the registers alone: the step counter, which reads and can advance by waiting, holds bits, unbounded when the running time is. A machine with , and control states writes into the counter during one scan, one base- digit per cell, by waiting after reading cell until digit of the counter equals the tag just read (that digit is 0 when the wait begins and the steps taken since the previous wait are fewer than , 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 from the counter, walks to it and reads: in steps. Fifth, a writable tape: with blank writable cells beside the table, the arrangement of blocks on them is bits of state that no count of registers, pattern and counters sees, and pointer doubling by external-memory sorting (a merge pass costs head moves with blocks of context) reaches in moves, at once .
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 , whose tape holds the table cells and nothing else ( ) with WRITE unavailable, with context slots, register bits (so , which every uniform family on this task satisfies) and steps, so that the counters hold bits; tool and verifier calls are unrestricted in number, each a fixed map of its arguments. Such a machine holds bits of content-dependent state in all (context, registers, pattern and counters), fewer than the bits of , so it cannot memorise the table in a scan.
nevertheless fails in this class for large , because blocks can hold shortcuts along rather than itself. Fix landmark cells including cell 1 (so , which makes ). 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 , initially ; the count never exceeds , because with landmarks the next landmark on an orbit is at most hops away, so it fits one index block. It also keeps one block 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: 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 by the same tool. The target , a public parameter of the task, is held in the control's bits and enters the blocks only through the accumulator, initialised to by 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 index blocks that a verifier call reports as a tag, and one verifier call on all 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 it reads the cell into the working slot and, for each walker in turn (the control holds the walker index, bits), calls a verifier on and the walker's three blocks; when the tag reports an unfinished walker at position , 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 sweeps, 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 , 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 hops on the tape, each hop moving the head to the cell named by the current block: a comparison verifier on and that block returns a tag in , which gives the direction and says when to stop, so a hop costs at most Moves (an equality-only verifier would cost , 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 slots, register bits (the control indexes walkers, slots and opcodes) and steps. For uniformly random the orbit from a landmark visits fresh cells uniformly, so and , whence, for every ,
(at most sweeps of moves and hops of at most moves), which is whenever ; at and it is against for the non-speculative class. Together with the demand-following scan, which costs moves inside the class, the best bound exhibited is for .
The question for the bounded-workspace class is therefore the trade-off between context and head motion, not the exponent of kn. We conjecture that every deterministic machine of the class has up to a factor polylogarithmic in : a scan costs moves and advances at most walkers, and only walkers on the orbit of 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 and its tape is an average of deterministic machines’ expectations over . What is proved is the separation for the non-speculative class; what is exhibited is the speculative upper bound in expectation over ; the remaining step is the converse, which the proof of the theorem cannot supply because a scan may read before is revealed and retain it, and the sum of distances between successively revealed cells has no analogue once a 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 for and (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 bits of content-dependent state, and cutting the tape between cells and 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 cuts, some cut in the middle half is crossed times in expectation over the same uniform , and stopping the protocol after messages gives an -round protocol correct with probability ; crossings of one cut, not passes over the tape, are what two-party round elimination consumes. The landmark algorithm is such a protocol with expected rounds of bits, so , and relaying the orbit is one with at most about rounds of bits. The conjecture would therefore follow from a distributional round lower bound for this instance: that no deterministic protocol with rounds of bits and outputs with probability over a uniform permutation split by cell position. (A worst-case version on rectangles of density is false: such a rectangle can force the orbit to stay on one side for steps.) For the classical alternating instance the corresponding statements are the round-elimination bounds of N. Nisan and A. Wigderson [31]; 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 be a deterministic always-correct machine of the bounded-workspace class of Remark 3 (on every it emits exactly one block, the one encoding ) on a linear tape of cells 1, ..., n with no MOVE off either end, with a fixed alphabet, and let 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 context slots ( in the class). Let over uniform . For a cut let be the number of MOVES between cells c and on input , and let be the two-party protocol in which Alice holds cells 1, ..., c, Bob holds cells , ..., n, the party whose cells contain the head simulates , 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 and .
-
is deterministic, Alice speaks first, and on every it sends at most messages of bits and outputs ; moreover .
-
, so some has ; stopping when an -st message would be sent gives a protocol with at most messages that outputs with probability at least over .
-
If , and , then there are a c-subset with , a set of
bijections with and a set of bijections with such that on every with the protocol sends at most messages and outputs .
Proof. The configuration is encoded in bits, padded to this fixed length, where is the largest running time over the finitely many inputs; in the class , and , so . 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 .
(1) We show by induction on that the active party can execute step of exactly. It knows the configuration after step (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 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 to or from to 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 (Alice sent) or at (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 on up to its first EMIT, and the announced block encodes by always-correctness. Messages are sent only at crossings of the cut before that step, so there are at most of them, each of exactly bits; the head starts in Alice's cells and moves by unit steps, so the first crossing is from to and Alice speaks first, after which the speakers alternate. Finally, a MOVE changes the head position by or, if clipped at an end of the tape, not at all, so it crosses at most one of the boundaries , , exactly one when the head moves; summing over gives .
(2) Taking expectations in (1) and dropping the non-negative terms with gives for ). The number of integers in is at least for , so . The stopped protocol is deterministic, Alice first, sends at most messages, and coincides with whenever , in which case it outputs by (1); as is a non-negative integer, Markov's inequality gives .
(3) For a transcript let be the set of on which produces . Alice's messages, and her decision to stop, are functions of and of the previous messages, Bob's of and the previous messages, so for some sets , , and outputs on all of by (1). On , an event of probability at least by Markov's inequality, sends at most messages, so the sets with at most messages cover it; there are at most such transcripts, so some has probability at least . Condition on , a uniformly random -subset of :
given S, the restrictions and are independent uniform bijections onto S and S, and
with and . The count is hypergeometric with mean for , so by Hoeffding's inequality for sampling without replacement [32] it is below with probability at most , which is at most when . Hence the subsets with carry at least of the probability of , and one of them has ; both factors are at most 1, so each is at least . Take and .
The density in (3) is too small for a worst-case round lower bound on such rectangles: a rectangle of density can force the orbit of 1 to stay on one side of the cut for k steps, after which one message suffices.
Proposition 14 (Every deterministic always-correct machine moves ). Let be a deterministic always-correct STREAM LAM for the pointer-chasing task on a read-only linear tape with and the head initially at cell 1, with no restriction on , the control, the tags, the counters, the block width or the calls, and let and . Let be the event that are distinct. Then for every , and .
Proof. Let be the set of cells read during the run on . (i) The run depends on only. If agrees with on , the runs on and coincide step by step: by induction on , 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 on which . (ii) If and ,
then . Otherwise has at least elements, so contains two distinct cells . Let and ; both are permutations, and both agree with on because they differ from only at , so by (i) emits the same block on , and . For the cell lies outside , so and, by induction, for all ; hence , and likewise . The correct answers on and differ while the outputs coincide, contradicting always-correctness. (iii) Pointwise bound. The head starts at cell 1 and each MOVE changes it by on a linear tape, so reading cell costs at least moves, and if some cell is read. For , either and , or , by (ii) and . (iv) Expectation. The length of the cycle of 1 in a uniform is uniform on (the probability of length is ), and is the event that this length is at least , so . Conjugation by a permutation with preserves the uniform measure and and sends to .
. Therefore
the last step because when . For and , , so .
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 ; no restriction on 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 of random tapes. Fix . 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 and that agree on the cells read consume the same tape prefix, and steps (ii)–(iv) use nothing else. Hence for every , and averaging over gives the bound.
C.2. Query bandwidth: adaptive observations (Theorem 16)
We now formalize the observation bandwidth available to an adaptive LAM execution.
Query bandwidth. Consider a task with input blocks. We use for the minimum worst-case number of input blocks required by a deterministic procedure to compute , and 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 denote the number of model calls, and let 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 argument blocks, these channels together expose at most input blocks.
Theorem 16 (Query bandwidth). Under value provenance and , every deterministic LAM computing , its output being the block it EMITS or the tag it halts with, has, on some input, , hence . Every randomized LAM with error probability at most 1/3 on each input satisfies .
The bound tracks the information the task requires, not how many input blocks could affect the output: for the selector an execution decodes into an address and emits , two observations, and , whereas parity of blocks needs all , . Output is charged through EMIT: identity on a block already in costs , 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-evaluations.
Remark 4 (Content-oblivious schedules). Call a source globally relevant if some pair of inputs differing only there changes , and let be the number of such sources. A LAM with whose schedule does not depend on block contents and whose output is a single block (emitted or terminal, not a halting tag), counting every value-producing call (model or tool) as a call, needs calls, and this is tight for group sums. The output clause is needed: a schedule that loads blocks and halts with the tag of a parity verifier on them makes no value-producing call. This bound concerns the call complexity of content-oblivious schedules, whereas Theorem 16 bounds the observation budget of arbitrary, adaptive ones; neither dominates the other pointwise, and adaptive access can be far cheaper than any content-oblivious schedule.
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 be its output occurrence. If a globally relevant source were not an ancestor of o, changing only would leave all ancestors and hence the output unchanged for every pair of inputs, contradicting relevance. Thus all relevant sources occur in the ancestor subgraph.
Every call has at most arguments under the insertion convention. In the ancestor subgraph of , every vertex is an ancestor of the single sink, so every non-sink vertex has out-degree at least one; with internal vertices of in-degree at most and sources it therefore has at least and at most edges, whence . Hence and .
For tightness, let be an abelian group and . A fixed -ary fold uses 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 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 , 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 per call, counted through 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 , 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 . The clause is where the argument would otherwise fail: a verifier with side access to the input could report the parity of m blocks as a tag, for against . On input x it makes at most queries; more precisely, the simulation charges each model call by its number of input-block arguments, so it proves, on some input, , of which the statement is the corollary obtained from the bound C - 1 on the arguments of a call. Since every deterministic decision tree computing f has worst-case depth at least , the claimed worst-case input exists. The output charge is not optional: without it the machine that reads into a slot and emits it computes the identity with while D = 1, and the per-block charge on tool calls is what stops one tool call from absorbing C - 1 observations for the price of one. Output semantics. The theorem's machine computes f by emitting ; a block that merely resides in X or M when the machine halts is not an output. Under the final-configuration convention of memory-initialized vertex-granular G-evaluations (Section 4) the statement would need an output-observation rule, a terminal exposure of each designated output block charged to : with it, identity on a source block held in M costs 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, at most queries. Randomising over tapes therefore gives a randomised decision tree with the same worst-input error and, on each x, expected query count at most . By the definition of , its worst-input expected count is at least . □
Remark 5 (Global relevance versus query complexity). Every data coordinate of the selector is globally relevant, but an execution observes only (one decoded address) and (one emitted input block): while in the block-query model. The former controls only an input-independent schedule, and the latter is the right quantity for adaptive content addressing.
C.3. Exact single-stack FIFO frontier
For FIFO retrieval, a single stack exhibits an exact context threshold: with unrestricted buffering during the write phase, and under copy-free streaming.
Theorem 17 (A single stack needs context for FIFO). In the input blocks are delivered one at a time, in order, during a write phase; a read phase begins after has been delivered, and during it the machine must emit 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 , and assume , so that an input of pairwise distinct blocks outside exists.
-
A ram-LAM with solves with and .
-
Every correct one-stack LAM has , and suffices (stack capacity ), 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 , and suffices (with ).
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 . 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 in context (at the delivery of , , two slots are free, one for the arrival and one for its copy), emit those first in the read phase, and pop into the slots so freed, which works whenever ; so streaming with retained copies costs exactly , 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, and an input of pairwise distinct blocks outside . From a correct run one obtains a sequence of INPUT, PUSH, POP, EVICT and EMIT operations that is legal for the same C, emits in order after all deliveries, and in which at every instant each 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 or of a constant, because INPUT and CONST are the only block-creating operations available to the machine. The block emitted at position has content , which is not a constant and differs from every , ; so it is a copy of . 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 . Call the copies on this trace the lineage of . 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 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 has at most one copy at any instant. □
Proof of Theorem 17. (i). The RAM controller writes each delivered block to address i, taken from a public counter, and evicts it; in the read phase it reads address i into its one slot and emits. This uses C = 1 and 2n 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 is in a slot, at one stack position, or already emitted. Let be the end of the write phase and let the stack at hold from bottom to top. If , all blocks are in slots at , since nothing has been emitted, so . Otherwise let be the instant of the last PUSH of before and the instant of the first Pop of after . Then is in the stack throughout : it is in the stack at and is its last push before , so it is not popped in , and is its first pop after . It occupies the bottom position at , and the positions below a resident block never change; so the stack is empty just before , and just before it consists of alone. Write and split the other blocks into and .
Just before , every block of has been delivered, because deliveries are in index order and 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 occupy distinct slots, and .
Just after , has been popped into a slot and has not been emitted, having been in the stack since ; emissions are in index order, so no block of has been emitted; and the stack is empty. So the blocks of occupy distinct slots, and .
Adding the two counts, , that is, .
(ii), upper bound. Let ; if , keep every block in context. Otherwise deliver into the slots and push them in the order , so that is on top and the context is empty; deliver into slots. In the read phase pop into the free slot and emit it, then , and so on up to , 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 has a single copy at ; for it was pushed before was delivered and never popped, so at the stack holds in index order from the bottom, constant blocks possibly interleaved, and is on the stack above them or still in its delivery slot; the context holds no other input block. The first emission is of and needs a copy of in a slot, hence a pop of ; let be the first one. Just before nothing is above on the stack, so every copy of , whether original or made after , is off the stack, popped and not pushed back or never pushed; none of these blocks has been emitted, since has not; and each still has a copy, by value provenance, which is therefore in a context slot. These slots and the free slot that receives at give . Conversely, with the read phase pops all blocks into the slots and emits them in order. The copy-free schedule uses stack operations; the buffered schedule of (ii) uses when and none when . The storage-optimal construction, with and operations, is Corollary 19. □
Remark 6 (The buffered upper bound is tight). Buffering arrivals before pushing them, or retaining copies of the first , halves the copy-free streaming requirement, which is why Theorem 17 states the two regimes separately: against . 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 is resident at the first, every block of larger index at the second, and the bottom block at both. The buffered schedule, whose bottom block is , meets both counts with equality resident before the first push; resident after its pop), so no schedule, content-dependent or not, does better. This pins the requirement at blocks, against for ram. Two stacks would remove it (push each arrival on the first; in the read phase pop all onto the second and pop them again, emitting: and 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 and stack capacity S solves if and only if and , and every such machine makes at least pushes and pops; a content-blind schedule attains both bounds.
Proof. Necessity of is Theorem 17(ii). Nothing is emitted during the write phase and no block is manufactured (no model or tool call; constants lie in , disjoint from the input), so at the end of the write phase every has a copy in a slot or on the stack, and at most of the blocks have a copy in a slot; hence at least blocks are on the stack only, , and each of them was pushed at least once and must be popped before it is emitted, giving at least pushes and pops. For sufficiency let , so that : keep in a slot, buffer as they arrive ( slots), push them in the order , which leaves on top, and buffer , which together with occupy
slots. In the read phase emit , then pop and emit in turn, then emit : m pushes, m pops, stack height m, and no block content is read. □
C.4. Proof of Theorem 3
Proof. The bit-reversal graph has two rows and , path edges along each row, and crossing edges . It has one source , one sink , 2n vertices and maximum in-degree two. The machine of the last claim is a memory-initialized vertex-granular G-evaluation and the machines of the law are input-delivered vertex-granular G-evaluations (Section 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 at the start and receive exactly once by INPUT.
Persistent memory. Let . A topological RAM schedule computes every vertex once, keeps the current or resident, stores each after computing it and loads before computing : , , . This is a uniform family-level schedule: public structural counters enumerate the rows, and the fixed permutation rev is applied only to the public index ; no block content is inspected.
Lower bound for capacities (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 or 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 or M. At most 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 pebbles in which the source is placed exactly once and every other placement is one oracle call. The order of the call-space trade-off for bit reversal is classical [17]; 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 , , and let be the least power of two with . Every pebbling of with at most black pebbles that places a pebble on every , recomputation and repeated placements on the source allowed, makes at least placements on the row ( when is a power of two).
Proof. Let be the time of the first placement on . Since a placement on requires pebbled, . Write ; since and is a power of two, , and . Partition the -row into the windows and let be the time interval ; the intervals are pairwise disjoint because .
Fix a window. Two indices in it share their top bits and differ in their low bits, so rev and rev share their low bits and differ in their top bits: . Write for the values rev , , set , and let , , be the resulting disjoint intervals of -indices, so that for . Let be the set of -indices carrying a pebble immediately before the placement at time (“pebbled at time ” likewise means immediately before the placement of ), , and let be the set of -indices receiving a placement during . Call blocked if meets . The being disjoint, at most indices are blocked, so at least indices are unblocked.
Let be unblocked, and let have rev . The index of rev is blocked, since carries a pebble at time , so and ; as while is pebbled at time , the vertex was placed during : . Moreover, whenever lies in , the placement on found pebbled, by a pebble either present at time , so that , or placed during , so that . Descending from , and since contains no element of , all of lies in . Hence , and at least placements on the -row fall in . Summing over the disjoint intervals gives at least placements, and when .
The induced pebbling of the run uses pebbles, and every placement on the -row other than the single INPUT delivery is a model call. For the lemma gives ; for every and , each of the internal vertices needs a call, . Averaging the two bounds, for , since ; for one has , so . Hence for every , and , the lower bound needing no hypothesis beyond ; the upper bound below needs and .
Feasibility and the constant. Placing for needs , and a slot for the result, so is necessary for every ; at and , is insufficient: when is placed the three slots hold , and , so the source has been evicted and can never return, and , which precedes on its chain, can no longer be produced. With
and the schedule below works with every checkpoint stored, so for an input-delivered vertex-granular G-evaluation exists exactly when and , the hypothesis of the theorem, and the upper bound below is proved on this whole feasible region ( is its threshold at ). For Lemma 20's u-row placement bound, exhaustive search over pebble configurations gives minimum u-row placement counts of 100, 49, 392 and 187 at , , and , against 5.3, 4, 21.3 and 16 from and 8, 8, 32, 32 from . The theorem's 1/32 call constant follows by combining this placement bound with the mandatory internal-vertex calls (below).
Upper bound for capacities . The bound is matched by an elementary checkpoint schedule, so no strategy is imported. Let , and . Take the checkpoints ; up to of them are kept resident in reserved slots, the source among them when , in its slot throughout, and the remaining are stored in when reached (at every checkpoint is stored, the source immediately on delivery). First compute along the chain with two sliding slots, keeping or storing each checkpoint as it is reached: at most resident blocks and calls. Then for compute : let be the largest index with , load into a sliding slot if it is stored, recompute from it with the two sliding slots, at most calls since , and call once with arguments (absent for ) and . At the moment a block is placed the resident blocks are the resident checkpoints, at most one sliding block, and the new block, at most ; afterwards and the sliding block are evicted. The run uses no CONST, its traversal is generated from public structural indices, and it ends with resident. Its call count is at most , every non-source placement being one fixed-oracle call, and its traffic is at most stores and loads, . If then and ; otherwise , using , so . With this is the schedule with calls; with it stores every and makes calls. This is a polynomial call-space trade-off, not an exponential one.
D. Reliable computation
Throughout, a chain of dependent transitions is executed; given a correct input, a call returns the correct block with probability ; the correct block has probability and every incorrect block probability at most ; errors are absorbing.
Theorem 21 (Sampling amplification). Suppose that at most A incorrect alternatives have nonzero probability at each correct state and each has probability at most . Taking a plurality vote over independent samples per transition yields overall failure probability at most using model calls.
Proof of Theorem 21. Fix a step and draw i.i.d. samples. Let be the empirical frequency of block . By Hoeffding, for each of the at most incorrect alternatives , since and the difference is an average of i.i.d. variables in . A union bound over gives per-step error , which is for . A union bound over the steps gives overall failure , at .
Proof of Theorem 4. Hard family without a lookahead signal. Consider the complete binary tree of depth , with a node represented by its root-to-node bit string (so the direct encoding uses bits at maximum depth). Every internal node carries an independent hidden bit . A call at returns child with probability and the other child with probability . Repeated calls at the same node are conditionally i.i.d. given . Starting at the root, the designated correct path is obtained by following the preferred child 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 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, conditioned on all previous commitments being correct, let denote the full pre-stage history. The current node u is then fixed by , while is still uniform and independent of that history. A stage-local strategy draws a stopping-time number of samples at u before committing. For a fixed history h put
Distinguishing the two possible preferred-child laws is exactly testing against . Their directed KL divergence is
Fix and let be the laws of the stopped sample sequence at under and , with expected lengths and , so that . If or is infinite then and there is nothing to prove, so let both be finite. Wald's identity [33] gives the two directed divergences of the stopped experiment, and (the per-sample divergence is in both directions, the two Bernoulli laws being mirror images). The Bretagnolle-Huber inequality [34], in the form of A. B. Tsybakov [35, Lemma 2.6 and Theorem 2.2], applied to the commitment event once with and once with the roles exchanged, gives and , hence , the minimum being at most the average; this is why the average stopped sample count suffices even when the two conditional expected counts differ. Since is uniform given , the error probability is half that sum:
Average over and use Jensen's inequality, since is convex. With ,
Let be the event that the first commitments follow the designated correct path. The events are nested and overall success is . Therefore
For , so . By AM-GM,
and hence
Moreover , and conditioned on the hidden bit at the current node is uniform, so
Using and gives
as claimed. For one has , so the bound is at least , the stated order; since , every qualifies. For the displayed bound is non-positive and the theorem is vacuous.
Remark 7. The lower bound is intentionally scoped to the stage-local no-feedback class defined in Section 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, and no cap on retries, sampling a transition until the verifier accepts terminates almost surely with zero error and and , which is for fixed and . On the hard family of Theorem 4, this removes the overhead of stage-local sampling for constant and .
Proof of Theorem 22. With a perfect verifier the agent repeats a step until acceptance. Attempts are geometric with success probability , so and . No wrong state is propagated. On the binary-tree hard family of Theorem 4, , so stage-local sampling-only strategies need a factor more at constant , .
Proof of Theorem 5. One attempt falls into three disjoint outcomes: correct and unanimously accepted with probability , wrong and unanimously accepted with probability , or rejected. The first accepted attempt therefore arrives after a geometric number of trials with parameter and is wrong with conditional probability . 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 without further assumption. Summing over 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 accepted candidates are wrong independently with probability each, so the chain fails with probability exactly . 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 : 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 , rearranges exactly to
For general t, accepted-error odds are
Thus unanimous repetition improves accuracy only if . Since chain failure is at most , the target holds as soon as , that is, when , for every / (one check suffices when ). Because can itself shrink exponentially, the exact cost retains the false-reject penalty that an approximation would omit. □
Remark 8 (Short-circuit checking). If the checks of a candidate are run in sequence and stopped at its first rejection, the acceptance probabilities and , hence , 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 times in expectation and a wrong one times, so an attempt makes checks in expectation. Attempts are i.i.d. and the number of attempts is a stopping time with mean , so Wald's identity [33] gives per accepted transition and in place of . With at most attempts per transition, the last candidate being kept if all are rejected (Corollary 25(ii)), attempt is reached with probability , an event determined by the earlier attempts and independent of the -th attempt's checking cost, so it contributes in expectation; summing over and the executed transitions gives , the forced commitment at the cap changing correctness but not this cost sum. For and fixed as , so the factor of Corollary 25 is a cost of paying for all checks and disappears, whereas the false-reject penalty in model calls, which comes from , 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 , a wrong one with , checks independent given the candidate), the powers become moments, and , and the ratio need not fall geometrically (Corollary 23).
Corollary 23 (Candidate-dependent checking). Suppose candidate attempts are i.i.d., a candidate is correct with probability , and, conditional on the candidate, its checks are independent, each accepting a correct candidate with a candidate-specific probability and a wrong one with probability ( , random, drawn with the candidate). Put , and . Then retry-until-accept with unanimous checks commits a wrong candidate with probability and makes model calls and verifier calls in expectation per accepted step, and the chain-level conclusions of Theorem 5 (Pr[chain failure] ; exactly with totals , , under the stationary law) hold verbatim. The odds need not fall geometrically in ; Theorem 5 is the case , .
Proof. Conditional on a correct candidate with acceptance probability , its independent checks all accept with probability ; averaging over gives , and likewise . Attempts being i.i.d., attempt is the first accepted one and is wrong with probability ; summing over gives . The number of attempts is geometric with mean , and each attempt costs one model call and verifier calls. The union bound over the first error and, under the stationary law, the product and the summed totals are the calculations of the proof of Theorem 5 with in place of , . The odds are by definition of .
Corollary 24 (Batch-acceptance account). Fix a checking procedure that makes t checks per candidate and accepts on an event . Attempts, including candidate generation and the checking randomness, are i.i.d.; the checks within one attempt may be arbitrarily dependent. Let , and . Then retry-until-accept commits a wrong candidate with probability and makes model calls and verifier calls in expectation per accepted transition, and the chain-level conclusions of Theorem 5 hold verbatim with these , under its stationary trajectory law and absorbing-error objective. Theorem 5 is the case 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 and : attempt is the first accepted one and is wrong with probability , which sums to ; the number of attempts has tail , hence mean ; and every attempt makes one model call and verifier calls. The union bound, the product 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 , , and , put , with
assume the stationary attempt law of Theorem 5 at every visited state, and let be the smallest integer with , which is at least 1 exactly when , assumed here. Then
with and For fixed the model-call count is therefore , polynomial rather than linear in , and the weighted cost carries a further factor ; the linear scaling of Theorem 22 is recovered only when , i.e. at fixed , when fast enough that ; for fixed and fixed the count is superlinear. Finally exactly when . (ii) With , , and at most attempts, the last candidate being kept if all are rejected, the expected numbers of attempts, model calls and verifier calls are each , and the committed candidate (the accepted one, or the last one kept by the cap) is incorrect with probability , the second term being the price of the cap, so that a chain of transitions commits wrong states in expectation under the stationary law.
Proof. (i) By the proof above, holds if and only if , i.e. , so the smallest sufficient is and ; here , equivalently , exactly when , i.e. . Since by the definition of , we have . The upper bound uses . For the lower bound, at the accepted-error odds are at most , so and ; the two sides of the bracket differ by the factor . The cost identity is , and for fixed parameters. Finally iff iff , and as . (ii) Attempt is reached with probability , so the expected number of attempts is , each attempt costing one model call and one verifier call. The accepted candidate is wrong either because some attempt was wrongly accepted, probability , or because all attempts were rejected and the -th, kept by the cap, is wrong, probability , the last attempt being rejected-and-wrong with probability .
Proof of Theorem 6. Exact cost. Assume first that . A segment of transitions plus one verification costs and is accepted iff all transitions are correct, which has probability . Attempts are i.i.d., so the expected number of attempts is and the expected cost of a segment is . There are segments and rollback is to the last accepted checkpoint, so segments are independent: . If with , the exact expression is
so the displayed is not called exact outside the divisibility assumption.
Continuous optimum. For , let (so , with for ) and . Then
so is strictly convex; and , so has a unique zero, solving , whence .
Two-sided bound on the optimum. Put . For the lower bound, use and then AM-GM:
uniformly in (AM–GM on the two middle terms, and ), so . For the upper bound evaluate at the feasible point , where , giving . The gap between the two bounds is , so . Both bounds hold for every and in the positive-real relaxation, provided the horizon permits .
Leading order and finite horizons. Since implies , . If in addition , then and this becomes . Since is strictly convex, the minimiser of over the integers is or ; hence the optimal integer checkpoint interval lies within one of the continuous minimiser . Restricting to divisors of gives a coarser admissible grid. For finite , clip the continuous solution to and evaluate the exact divisible or remainder expression over admissible integer . At there are no failed segments; verification may be omitted, or a required final check is minimised by . The closed form, rather than its leading-order approximation, should be used unless both and are small.
Correspondence with Young–Daly. Writing MTBF = 1/ε (mean transitions between errors) and checkpoint cost , the classical first-order optimum [22], [23] coincides with up to the factor , 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 [36], [37], 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 . □
Remark 9 (The checkpoint policy as a machine of Definition 3; verifiers whose cost grows with k). Section 7 states its results over strategy classes; the policies are machines of Definition 3 once 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. The current state occupies one slot; a transition is one 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] (the checkpoint, one unit of ); after 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 Section 7, in which an erroneous transition never returns to the correct trajectory, the endpoint is correct exactly when all k transitions were, so this two-argument verifier is the theorem's perfect segment verifier, and its cost does not depend on k. The operation trace is exact: initialisation writes to M[1] (one movement); a rejected attempt costs k model calls, one read, one verifier call and no write; an accepted non-final segment costs k model calls, one read, one verifier call and one write; the final accepted segment omits the write and EMITS the state. Hence , exactly, and ; every accepted checkpoint is correct, so is unconditional. The policy of Theorem 5 is the same machine with k = 1, t verifier calls on the two resident blocks (state, candidate) per attempt, eviction of the candidate on any reject and no write, so , and C = 2; every reliability policy of Section 7 is thus a machine of Definition 3. If instead the verifier must see the k intermediate states, it needs argument blocks resident at once, hence (a verifier call inserts no block, Definition 3), and a cost that grows with k: the per-transition objective becomes , which for is the theorem and for equals , increasing in k, so the optimum is k = 1, i.e. Theorem 22 with . For the mixed cost it equals , the theorem's objective with replaced by and a constant factor , so : a fixed-plus-proportional verifier keeps the square-root law with the fixed part discounted by . The law is specific to verifiers whose cost has a fixed part; a purely proportional cost returns the optimum to k = 1.
E. 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 [38], multi-scale flow-matching generators [39], physics-informed neural-operator controllers [40], or perception modules for tracking and neural-field reconstruction [41], [42]; each is charged as an oracle call whose argument and output sizes enter the same counters. Prefix caching introduces a distinct physical-prefill quantity: records the oracle argument, whereas 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 unanimous checks per accepted step ( denoting no local check, with and ), and let and . After every accepted steps, call an independent perfect segment verifier of cost that accepts exactly when all states are correct; on rejection, roll back the segment. Under the theorem's stationarity and independence assumptions, for the exact expected weighted cost is
For fixed t and , put . The positive-real minimiser is
clipped to ; the exact finite optimum enumerates integer 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 and residual error . 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 in expectation and succeeds with probability ; geometric repetition and segments give the formula. For fixed ,
whose derivative is . Its unique zero gives the displayed quadratic solution. Integer enumeration proves the finite claim.
For a concrete witness, take and . No local check is minimised near at cost ; local checking alone needs to make and costs . The hybrid has perfect final correctness and cost , strictly below both. If local plurality sampling is used instead, substitute its per-accepted-step cost and residual error for ; with only the Hoeffding error ceiling from Theorem 21 (Appendix D), 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, endpoint segment verifier under absorbing-state semantics, ) and charge every semantic block transfer in addition to the weighted call cost. Then, pathwise, with the number of segment-verifier calls, and
Proof. Write . The trace of Remark 9 writes the initial checkpoint once and each of the 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 pathwise, as in the remark's identity for . A segment attempt succeeds with probability independently of the others, so . Adding to the cost of Proposition 26 gives the display. The term depends on , so the optimum is not that of the proposition with replaced by ; it is found by enumerating the admissible .
Proposition 28 (Conditional-hazard checkpoint envelope). Consider the regular length-k rollback policy with a perfect segment verifier of cost . A segment attempt always executes all transitions before verification and costs . Drop independence, but retain the absorbing-state semantics and suppose that, for every prior run history and every position whose preceding transitions in the current attempt were correct, the conditional error hazard lies in . The bounds must continue to hold after every rollback. Then, without independence within or between attempts, the expected cost for obeys
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 the probability that all transitions are correct lies in . Let be the number of attempts until the perfect verifier accepts. Iterating the same conditional bounds after each failure sandwiches between the tails of geometric variables with those two success probabilities. Summing the tails gives . Multiplication by the fixed attempt cost and summation over segments proves the claim. Perfect correlation across replicas shows why a marginal error rate alone cannot imply a concentration gain.
F. Controlled execution checks
We use controlled simulators to check that the constructive schedules in Section 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.
F.1. 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 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.
F.2. Reliability checks
The reliability simulator implements the execution classes used in Section 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 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.
F.3. 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
(a) bit-reversal DAG, bracket at n = 1024

(b) persistence jump: filled S = 0, open S = n
Figure 3. Recomputation implementation check. (a) Model-call count for the checkpoint construction of Theorem 3 on as total semantic capacity varies. Dashed curves show the theorem's bounds and . (b) Call count as a function of without persistence (, filled) and with sufficient persistence (, open); the dashed line is the persistent schedule.
Its measured schedule counts satisfy
within the explicit constants of Theorem 3, while its context-memory traffic satisfies . With sufficient persistent storage, the construction uses exactly model calls, recovering linear call complexity (Figure 3).
The execution check also reproduces the feasibility boundary of the construction: at 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.
G. 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.
G.1. 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
for fixed per-step overhead h and history-record width 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-depen-dency-only ratio falls from in logical traffic to with exact-prefix caching; on chained MATH the corresponding ratio falls from to . Thus caching narrows, but does not eliminate, the communication advantage of dependency-aware prompting.
G.2. 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 Section 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 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 D, rather than a single candidate-independent false-accept probability.
Held-out checkpoint-policy tournament. The tournament compares the principal reliability mechanisms studied in Section 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 Section 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.
G.3. Bit-reversal implementation check
The real-model task instantiates 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.