Papers
Topics
Authors
Recent
Search
2000 character limit reached

Two Linear Passes Are Necessary for Sum-Exclude-Self Under Sublinear Space

Published 1 Apr 2026 in cs.DS | (2604.01012v1)

Abstract: We prove that any algorithm computing the sum-exclude-self of an unsigned dd-bit integer array of length nn under sublinear space must perform two linear passes over the input. More precisely, the algorithm must read at least n1n-1 input elements before any output cell receives its final value, and at least nt/dn - \lfloor t/d \rfloor additional elements thereafter, where t=o(nd)t = o(nd) bits is the working memory size. This gives a total of 2n1t/d2n - 1 - \lfloor t/d \rfloor element reads. A trivial modification of the standard two-pass algorithm achieves this bound exactly for all practical input sizes. The proof uses this toy problem as a worked example to demonstrate the choke-point technique for proving sublinear-space lower bounds.

Authors (1)

Summary

  • The paper establishes that two linear passes are necessary for the sum-exclude-self transform under sublinear space constraints.
  • It introduces an information-theoretic choke-point approach to justify why one pass is insufficient, ensuring correctness through entropy analysis.
  • The results yield near-tight lower bounds for streaming computations and highlight the trade-offs between memory constraints and algorithmic passes.

Necessity of Two Linear Passes for Sum-Exclude-Self in Sublinear Space

Problem Formulation and Computational Model

The paper establishes lower bounds on computing the sum-exclude-self transform under stringent space constraints. Specifically, for an input array In{0,,2d1}n\mathit{In} \in \{0, \ldots, 2^d - 1\}^n of dd-bit unsigned integers, the task is to produce an output array OutZn\mathit{Out} \in \mathbb{Z}^n such that

Out[i]=jiIn[j].\mathit{Out}[i] = \sum_{j \neq i} \mathit{In}[j].

The computational model allows for random access reads from the read-only input array and arbitrary writes to the output array, which is strictly write-only—outputs cannot be read or used as auxiliary memory. The working memory is restricted to t=o(nd)t = o(nd) bits, sublinear in the total input size. Output correctness is required for all legal inputs, and all arithmetic is conducted over unbounded integers.

Lower Bound Analysis: Eventuality of Two Passes

The central result is that any correct algorithm under these memory constraints must make two linear passes over the data, modulo lower order terms: at least n1n-1 element reads are required before any output cell can receive its final value, with an additional nt/dn - \lfloor t/d \rfloor reads required subsequently. The crux of the argument is an information-theoretic "choke-point" technique: since the input domain {0,,2d1}n\{0, \ldots, 2^d-1\}^n has ndnd bits of entropy, and the working memory can store only tt bits at the first output-producing event, at least dd0 bits must be read after this point to guarantee input recoverability and thus correctness.

This claim is substantiated as follows. After dd1 elements are read, any output cell can be computed but not before, since otherwise, by the pigeonhole principle and output unidirectionality, one could perturb an unread input cell not yet influencing the algorithm's state but affecting the output—contradicting correctness. At termination, the combined information traversing the algorithm's working memory and final-stage input reads must admit an injective mapping from input to output, as the sum-exclude-self operator is invertible (per explicit reconstruction), enforcing a minimal throughput of dd2 bits through a channel of capacity dd3, where dd4 is the number of bits read in the second phase.

Explicit Reconstruction and Choke-Point Tightness

A salient element in the argument is the explicit reconstruction lemma: the output vector dd5 immediately determines the original input vector dd6, as

dd7

provides the total input sum, and each dd8 is then dd9. This invertibility validates the information-theoretic argument: any loss of input entropy through the computation's choke-point makes lossless recovery impossible, which is incompatible with correctness.

The lower bound is tight for all practical input sizes with a trivial algorithmic modification. The canonical two-pass solution (first pass computes OutZn\mathit{Out} \in \mathbb{Z}^n0, second pass writes OutZn\mathit{Out} \in \mathbb{Z}^n1) uses OutZn\mathit{Out} \in \mathbb{Z}^n2 reads and only OutZn\mathit{Out} \in \mathbb{Z}^n3 bits of memory. An optimization exists that reduces the required reads to OutZn\mathit{Out} \in \mathbb{Z}^n4, aligning precisely with the lower bound for OutZn\mathit{Out} \in \mathbb{Z}^n5 (for instance, OutZn\mathit{Out} \in \mathbb{Z}^n6 when OutZn\mathit{Out} \in \mathbb{Z}^n7), up to a small additive gap which diminishes as OutZn\mathit{Out} \in \mathbb{Z}^n8 grows.

Implications for Streaming and Memory-Limited Computation

This result reinforces the necessity of at least two sequential passes over the input for invertible transforms in restricted-memory scenarios, an archetype extending to a broad class of data streaming and online aggregation problems. The choke-point technique, operationalized here, demonstrates how information bottlenecks invoked by sublinear working memory inexorably force either multi-pass computation or exponential memory scaling—even for algebraically trivial operators. The sum-exclude-self function, despite its simplicity, exposes the full strength of these lower bounds, as it is both linear and invertible, yet resistant to one-pass, sublinear space computation.

This work also illustrates that for bounded input alphabet problems, such lower bounds become sharp via information-theoretic analysis—whereas, for unbounded integer domains, such methods collapse due to the lack of finite entropy.

Future Directions

The explicit gap between the information-theoretic lower bound and current algorithms is asymptotically negligible for constant OutZn\mathit{Out} \in \mathbb{Z}^n9, but the precise minimum number of element reads required remains open for all Out[i]=jiIn[j].\mathit{Out}[i] = \sum_{j \neq i} \mathit{In}[j].0 and Out[i]=jiIn[j].\mathit{Out}[i] = \sum_{j \neq i} \mathit{In}[j].1. This motivates further exploration of alternative summary structures and potential tradeoffs between output latency and memory constraints in invertible streaming algorithms. More generally, the methodology demonstrated here lends itself to the analysis of other data transforms and domain-limited invertible operators, likely yielding similar multi-pass lower bounds or inspiring new algorithmic paradigms in the streaming and external-memory setting.

Conclusion

The paper rigorously establishes that two linear passes, in terms of total element reads, are necessary for computing the sum-exclude-self transform under sublinear space constraints. This minimal lower bound is nearly achieved by variant forms of the standard algorithm, with any further reduction strictly limited by the entropy bottleneck dictated by the working memory. The results provide a clear, archetypal demonstration of the choke-point technique for lower bounds in data streaming and point toward broad implications for similar operators in sublinear-memory computation models.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.