---
title: 1-Bounded Space Algorithms
url: https://www.emergentmind.com/topics/1-bounded-space-algorithms
type: topic
---

# 1-Bounded Space Algorithms

1-bounded space algorithms are algorithms designed under a stringent restriction on mutable state, but the phrase does not denote a single uniform model across the literature. In parallel combinatorial search it refers to **constant space per processor**, so that each processor stores only a constant number of words or tree nodes during execution [1306.2552]. In approximation algorithms for bin packing it means a **1-bounded space algorithm** in the sense of keeping at most one open bin at all times [2508.18718]. In restricted-RAM and read-only models it typically denotes computation with only \(O(S)\) bits of workspace, often with \(S\) as small as \(\Theta(\lg N)\) or \(O(\log n)\) [1510.07185, 1212.5353, 1507.01767]. In width-bounded dynamic programming it is closely related to **frontier width** \( \omega=1 \), which yields polylogarithmic-space traceback rather than full-table storage [2512.10132]. Across these settings, the common objective is to preserve strong time or approximation guarantees while replacing explicit state retention by compressed encodings, recomputation, batching, lazy updates, or structural decompositions.

## 1. Terminology, models, and scope

The literature uses “1-bounded” and closely related terms in several technically distinct ways. A **bounded space algorithm** for bin packing keeps at most a constant number \(B\) of open bins, and a **1-bounded space algorithm** keeps at most one open bin [2508.18718]. In distributed-memory search, the relevant claim is that each processor stores only a constant number of words or nodes, even while exploring an \(n\)-node tree of height \(h\) [1306.2552]. In restricted-RAM work, the defining resource is a workspace of \(O(S)\) bits with read-only random-access input and write-only output, typically under the regime \(S \ge \lg N\) [1510.07185]. Read-only geometric algorithms similarly measure extra space in bits and aim for \(O(\log n)\), \(O(\sqrt n)\), or \(\Theta(s)\) bits, depending on the problem [1212.5353, 1507.01767]. Parameterized and DP-DAG settings instead isolate structural parameters such as treedepth \(t\) or frontier width \(\omega\), and show that low-space behavior is possible when the active dependency interface is small [1607.00945, 2512.10132].

A concise comparison of meanings is useful because many apparent disagreements are only model differences rather than substantive contradictions.

| Setting | Meaning of bounded/1-bounded space | Representative guarantee |
|---|---|---|
| Parallel tree search | Constant space per processor | Backtrack search in \(O(n/p+h)\) Las Vegas time w.h.p. [1306.2552] |
| Bin packing | At most one open bin | \(R_{MM}\le 1.5\) for \(MM\) [2508.18718] |
| Restricted RAM | \(O(S)\) bits workspace | Sorting and 2D convex hull in \(O(N^2/S+N\lg S)\) [1510.07185] |
| Read-only geometry | \(O(\log n)\) or \(\Theta(s)\) bits | 2D/3D LP in \(O(n^{1+\epsilon})\) time and \(O(\log n)\) space [1212.5353] |
| Width-bounded DP | Frontier width \( \omega \) controls memory | Traceback in \(O(\omega\log T+\polylog T)\) cells [2512.10132] |

This multiplicity of definitions is itself a central feature of the area. A common misconception is that “1-bounded” always means logarithmic-space computation in the classical complexity-theoretic sense. The cited work shows instead that the phrase ranges from one open combinatorial container, to constant local memory in parallel settings, to workspace bounds in bits, to constant active-frontier width.

## 2. Constant-space-per-processor parallel search

A foundational result for constant-space parallelism is the distributed-memory message-passing framework for backtrack search and branch-and-bound on an \(n\)-node tree of height \(h\), under the assumption that a node can be accessed only through its father or its children [1306.2552]. The model has \(p\) processors \(P_0,\dots,P_{p-1}\); each processor performs \(O(1)\) local work per step, sends or receives \(O(1)\) words per step, and stores one tree node per memory word. The searched tree is assumed binary for simplicity.

The backtrack-search algorithm is organized into **epochs** consisting of a traversal phase, a pairing phase, and a donation phase. Its crucial technical idea is a **lazy implementation** of subtree donation. Rather than storing a path of length up to \(h\), a busy processor keeps only
\(r_i\) (root of its assigned subtree), \(v_i\) (next node to touch), \(d_i \in \{\mathtt{left},\mathtt{right},\mathtt{parent}\}\), and two nodes \((t_i,q_i)\) that identify a tail and a possible right subtree to donate [1306.2552]. Quick donation acts immediately when \(q_i\) is defined; slow donation climbs the tail lazily and, if unfinished within one epoch, resumes later from a constant-size saved state. This removes the \(h\)-space path storage present in earlier approaches.

The resulting bounds are strong. For backtrack search, the deterministic algorithm runs in
\[
O(n/p+h\log p),
\]
and the Las Vegas randomized algorithm runs in
\[
O(n/p+h)
\]
with high probability, under \(p=O(n/\log n)\) [1306.2552]. The deterministic analysis partitions execution into full epochs and non-full epochs, with full epochs contributing \(O(n/p)\), donating epochs before a node \(q\) is touched contributing \(O(h_q\log p)\), and preparing epochs contributing \(O(E_q+h_q\log p)\). The randomized pairing scheme uses constant-length traversal and pairing phases; a non-full epoch is donating or preparing with probability at least \(1/8\), which yields geometric control over waiting epochs.

The same constant-space design extends to branch-and-bound through a generalized selection problem. For a heap-ordered infinite tree \(T\), \(T_c\) is the subtree of nodes with cost at most \(c\), and \(c(n,h)\) is defined as the largest cost such that \(T_{c(n,h)}\) has at most \(n\) nodes and height at most \(h\) [1306.2552]. Goodness testing of a node \(u\) is performed by exploring \(T_{c(u)}\) and stopping when the subtree is fully visited, exceeds \(n\) nodes, or exceeds height \(h\). Random splitter selection uses **reservoir sampling** locally and combines samples in \(\log p\) rounds, still in constant space. The generalized selection algorithm determines \(c(n,h)\) in
\[
O((n/p+h\log p)h\log n)
\]
time with high probability and constant space per processor, and the branch-and-bound algorithm requires
\[
O((n/p+h\log p)h\log^2 n)
\]
parallel steps with high probability and constant space per processor; the abstract also states
\[
O((n/p+h\log p \log n)h\log^2 n)
\]
to emphasize the generalized-selection dependence [1306.2552].

The significance of these results is not only that parallel search can be made space-efficient, but that strong time bounds survive the elimination of per-processor stacks or frontier structures whose size depends on \(h\) or \(n/p\). A plausible implication is that constant local memory is compatible with nontrivial load balancing when the donation protocol itself is encoded as a fixed-size state machine.

## 3. Restricted-RAM and read-only workspace algorithms

In the restricted RAM model, the input is stored in a read-only random-access array, output is written to a write-only sequential stream, and the available workspace is \(O(S)\) bits for a tunable parameter \(S\) [1510.07185]. The principal data structure in this regime is the **adjustable navigation pile**, a priority queue over a read-only array that supports \(\mathit{minimum}\) and \(\mathit{insert}\) in \(O(1)\) worst-case time and \(\mathit{extract}\) in \(O(N/S+\lg S)\) worst-case time for any \(S \ge \lg N\) [1510.07185]. It partitions the input into \(\bar S=2^{\lg S}\) buckets, builds a complete binary tree over the buckets, and stores compressed navigation information: a bit vector for nonempty ranges, relative bucket indices, active quantiles, and, in the augmented version, additional bits for nonmonotone candidate management. The bit budget satisfies
\[
\sum_{h=1}^{\lg \bar S} \frac{\bar S}{2^h}\cdot \min\{2h,\lg N\} < 4\bar S,
\]
which yields \(\Theta(S)\) bits overall [1510.07185].

This compact priority queue gives optimal time-space tradeoffs for basic problems. Sorting \(N\) elements by repeated insert and extract takes
\[
O\!\left(\frac{N^2}{S}+N\lg S\right),
\]
and 2D convex hull computation achieves the same asymptotic bound with \(\Theta(S)\) bits of workspace [1510.07185]. The convex-hull algorithm uses an **augmented navigation pile** with \(\mathit{alive}\), \(\mathit{start}\), and \(\mathit{count}\) structures, and proceeds in slabs: select the next \(S\) candidate points by \(x\)-coordinate, build the augmented structure, compute their upper hull, prune by scanning points to the right, output hull points, and repeat [1510.07185]. The paper states that both sorting and convex hull are optimal because of a known lower bound for the space-time product of any branching program for finding unique elements.

A related but distinct line concerns read-only geometric optimization via **prune-and-search** [1212.5353]. With the input in read-only memory, standard in-place pruning is impossible, so the algorithms rely on recomputation, read-only median selection, short pruning histories, and recursion paths of logarithmic depth. The reported bounds are:
\[
O(n^{3/2+\epsilon}) \text{ time and } O(n^{1/2}) \text{ extra space}
\]
for unrestricted 2D convex hull,
\[
O(n^{1+\epsilon}) \text{ time and } O(\log n) \text{ extra space}
\]
for sorted-input 2D convex hull,
and the same \(O(n^{1+\epsilon})\)-time, \(O(\log n)\)-space bounds for 2D and 3D linear programming, where
\[
\sqrt{\frac{\log\log n}{\log n}} < \epsilon < 1
\]
[1212.5353]. These results show that prune-and-search survives the loss of writable input.

Space-efficient plane sweep develops a more general read-only model with \(\Theta(s)\) bits of workspace for \(\lg n \le s \le n\lg n\), and introduces three reusable techniques: **stretching**, **batching**, and **multi-scanning** [1507.01767]. Representative bounds include closest pair in
\[
O\!\left(\frac{n^2}{s}+n\lg s\right),
\]
general line-segment intersection enumeration in
\[
O\!\left(\frac{n^2}{s^{2/3}}\cdot \lg s + k\right),
\]
counting axis-parallel segment intersections in
\[
O\!\left(\frac{n^2}{s}\lg^{4/3} s + n^{4/3}\lg^{1/3} n\right),
\]
and unsorted Klee’s measure in
\[
O\!\left(\left(\frac{n^2}{s}+n\lg s\right)\sqrt{\left(\frac{n}{s}\right)\lg n}\right)
\]
[1507.01767]. The common pattern is to replace a full sweep-line status or global event queue by stripwise or cellwise local structures that fit in the available workspace.

Taken together, these works establish that severe workspace restrictions do not merely permit toy computations. They support optimal sorting, convex hulls, plane sweep, and low-dimensional linear programming, provided the algorithm is reorganized around compressed navigation, read-only median selection, slab decomposition, or explicit time-space tradeoffs.

## 4. Space-efficient graph traversal

Graph traversal offers a different manifestation of bounded space: the challenge is to avoid storing explicit stacks or queues of \(\Theta(n)\) vertex identifiers. For breadth-depth search, the classical implementation uses \(O(m+n)\) time and \(O(n\lg n)\) bits in the word-RAM model, but both Jiang’s \(BDS_j\) and Horowitz–Sahni’s \(BDS_{hs}\) can be implemented with substantially less space [1906.07874]. The central devices are 3-color arrays, **delayed insertion** for \(BDS_j\), **delayed removal** for \(BDS_{hs}\), hierarchical blocking, reconstruction by replay, and compact adjacency-array pointer structures. The main theorem gives randomized \(O(m\lg^* n)\) time using \(O(n)\) bits with high probability, or deterministic \(O(m+n)\) time using
\[
O\!\left(n\lg(m/n)\right)
\]
bits [1906.07874]. These space bounds are too small to store the classical stack explicitly, so the traversal state is represented only implicitly and reconstructed when needed.

Breadth-first search and depth-first search have parallel developments in the read-only input / write-only output model [1606.04718]. A new dictionary maintains a subset \(S\) of a universe of size \(n\) using \(n+o(n)\) bits, supports insert, delete, search, and **findany** in constant time, can enumerate all elements of the set in \(O(k+1)\) time, and can be initialized in \(O(1)\) time [1606.04718]. Using this structure, BFS can be performed in \(O(m+n)\) time using at most
\[
2n+o(n)
\]
bits, by maintaining color classes corresponding to white, two grey levels, and black [1606.04718]. The same paper further reduces BFS space to
\[
n\lg 3 + o(n)
\]
bits, first with polynomial time, then with \(O(mn)\) time via repeated scans, and finally with
\[
O(m\lg^2 n)
\]
time using small queues and overflow flags [1606.04718]. The \(n\lg 3\) bound arises because vertices are stored in three color states rather than four.

For DFS, the paper first gives a linear-time implementation in \(O(m+n)\) bits and then improves the bound to
\[
O(n\lg(m/n))
\]
bits while preserving \(O(m+n)\) time [1606.04718]. The key lemma states that an auxiliary structure of size \(O(n\lg(m/n))\) bits can store a pointer into an arbitrary position within each vertex’s adjacency array, with \(O(1)\)-time updates [1606.04718]. This yields an on-the-fly parent-pointer representation of the DFS tree and extends to chain decomposition, biconnectivity, 2-edge connectivity, bridges, and cut vertices within the same time and space bounds [1606.04718].

A central point emerging from these graph algorithms is that low space is achieved not by weakening traversal order, but by weakening the representation of the active frontier. Delayed insertion, delayed removal, replay, succinct color arrays, and adjacency-array pointers all preserve the combinatorial semantics while discarding explicit queue or stack materialization.

## 5. One-open-bin algorithms in bin packing

In one-dimensional bin packing, the notion of a **1-bounded space algorithm** is completely different: it means that the algorithm keeps at most one open bin at all times [2508.18718]. The 2025 analysis of Zhu’s heuristic \(MM\) places it at the intersection of two classes. A **max-min algorithm** first sorts items in non-increasing order by size and then repeatedly packs either the head or tail item of the remaining sequence into the current bin, without looking at interior items. A **1-bounded space algorithm** maintains a single open bin [2508.18718]. Zhu’s \(MM\) algorithm sorts the sequence, repeatedly packs as many largest remaining items as possible and then as many smallest remaining items as possible into the current single open bin, and opens a new bin only when the current one cannot accept the next tail item [2508.18718].

The paper proves the universal bound
\[
MM(I) \le \frac{3}{2}\cdot OPT(I) + 1,
\]
hence
\[
R_{MM}\le \frac{3}{2}=1.5
\]
for the asymptotic approximation ratio [2508.18718]. It also proves a lower bound for the entire class intersection: for any max-min 1-bounded space algorithm \(ALG\),
\[
R_{ALG}\ge \frac{5}{4}=1.25,
\]
and more precisely, for any even \(m\), there exists a sorted item sequence \(I\) such that
\[
OPT(I)=m
\quad\text{and}\quad
ALG(I)\ge \frac{5}{4}\cdot OPT(I)-\frac{1}{4}
\]
[2508.18718]. The lower-bound construction uses item sizes
\[
a_i = \frac{1}{2}+\delta r^{i-1},\quad
c = \frac{1}{4}+\varepsilon,\quad
b_i = \frac{1}{4}-\varepsilon-\delta r^{i-1},
\]
with the property
\[
a_i+c+b_i=1.
\]

This frames the performance of the class intersection sharply:
\[
1.25 \le R \le 1.5.
\]
The same paper also derives lower bounds for larger space classes of max-min algorithms,
\[
R_{ALG}\ge \frac{7}{6}
\]
for max-min bounded space and
\[
R_{ALG}\ge \frac{16}{15}
\]
for max-min unbounded space, showing that allowing more open bins improves possible guarantees [2508.18718]. It contrasts these results with pre-sorted online algorithms such as \(NFD\) and \(FFD\), noting that \(FFD\) has asymptotic ratio \(11/9 \approx 1.22\) but is not max-min 1-bounded, while the optimal asymptotic ratio for pre-sorted online bounded-space algorithms remains
\[
\gamma = \sum_{i=1}^{\infty}\frac{1}{\pi_i-1} \approx 1.69
\]
[2508.18718].

The framework extends to \(k\)-cardinality constrained bin packing via \(MM_k\), which opens a new bin when the current bin already contains \(k\) items. The bound proved is
\[
MM_k(I) \le \left(\lambda_k-\frac{1}{k}\right)\cdot OPT_k(I)+k
\qquad (k\ge 3),
\]
hence
\[
R_{MM_k}\le \lambda_k-\frac{1}{k},
\]
where
\[
\lambda_k=\sum_{i=1}^{k}\max\left\{\frac{1}{\pi_i-1},\frac{1}{k}\right\}
\]
[2508.18718]. This branch of the literature shows that “1-bounded space” can encode a strong online-like restriction on feasible packing state rather than a bit-level memory bound.

## 6. Dynamic programming, treedepth, and width-bounded traceback

A major negative result for low-space algorithm design is that standard dynamic programming on decompositions is inherently space-expensive. For treedepth, treewidth, and pathwidth decompositions, a DPTM model captures one left-to-right pass over a valid decomposition encoding, with working space corresponding to the size of the DP tables [1607.00945]. Using Myhill-Nerode families of boundaried graphs, the paper proves that for every \(\epsilon>0\), no DPTM can solve Dominating Set using
\[
O((3-\epsilon)^k\log n)
\]
space, no DPTM can solve 3-Coloring using
\[
O((3-\epsilon)^k\log n)
\]
space, and no DPTM can solve Vertex Cover using
\[
O((2-\epsilon)^k\log n)
\]
space, where \(k\) is the decomposition width or depth [1607.00945]. This formalizes the intuition that bottom-up DP stores exponentially many boundary states.

The same work shows that treedepth is nevertheless useful for **branching** algorithms, which trade time for space. For 3-Coloring and Vertex Cover on treedepth \(t\), branching yields
\[
O(3^t\cdot n) \text{ time and } O(t\log n) \text{ space},
\]
and
\[
O(2^t\cdot n) \text{ time and } O(t\log n) \text{ space},
\]
respectively; for 3-Coloring the space can be reduced to essentially
\[
O(t+\log n)
\]
using a logarithmic-space depth-first traversal of the treedepth tree [1607.00945]. For Dominating Set, the pure branching algorithm runs in
\[
t^{O(t^2)}\cdot n
\]
time and
\[
O(t^3\log t+t\log n)
\]
space, while a hybrid branching-plus-DP algorithm runs in
\[
O(3^t\log t\cdot n)
\]
time and
\[
O(2^t t\log t+t\log n)
\]
space [1607.00945]. The conceptual conclusion is explicit: low-space tractability on treedepth comes from non-DP methods, not from better compression of standard tables.

A complementary positive result appears in the generalization of Hirschberg’s algorithm to width-bounded DP DAGs [2512.10132]. A DP is modeled as deterministic time evolution over a topologically ordered DAG with frontier width
\[
\omega(G,\tau)=\max_{0\le \ell\le T}|Front(\ell)|,
\]
bounded in-degree, a max-type semiring recurrence, and deterministic tie-breaking [2512.10132]. The framework replaces backward DP by forward-only recomputation over a height-compressed recursion tree whose nodes expose small middle frontiers. The central theorem states that deterministic traceback requires
\[
O(\omega\log T+\polylog T)
\]
cells over a fixed finite alphabet [2512.10132]. For \(\omega=1\), traceback therefore uses \(O(\polylog T)\) cells. The paper gives corollaries for one-dimensional recurrences, banded alignment, asymmetric alignment, and DP formulations on graphs of bounded pathwidth, and proves an \(\Omega(\omega)\) bits lower bound in forward single-pass models [2512.10132].

These two lines of work clarify an important misconception. Small structural width does not automatically imply low-space dynamic programming. For decomposition-based DP, exponential-space barriers remain. For width-bounded DP DAGs with random access and recomputation, however, traceback can be reduced to near the active-frontier cost. The difference is algorithmic architecture, not merely parameter choice.

## 7. Randomness, privacy, statistics, and quantum space

Space-bounded computation also reshapes derandomization and information-theoretic tasks. In the classical finite-state-machine model underlying Nisan’s generator, a randomized program uses space \(w\) and reads its random bits in blocks of size \(n\) [2304.06853]. The PRG called **HashPRG** or **FastPRG** generalizes Nisan’s construction by allowing \(b\)-ary branching, yielding seed length
\[
O(bkn)
\]
bits, output length
\[
b^k\cdot n,
\]
and \(O(k)\) time to compute any \(n\)-bit output block on a Word RAM with word size \(\Omega(n)\) [2304.06853]. Rewritten in space-vs-randomness form, a space-\(S\) algorithm making a single pass over a random string of length \(R\le \exp(S)\) can be fooled with seed length
\[
O\big((R/S)^{1/k}\cdot k \cdot S\big),
\]
while still computing a block of \(S\) random bits in \(O(k)\) time [2304.06853]. The same paper derives streaming applications with optimal or near-optimal space, including \(\ell_\infty\) estimation in
\[
O(\varepsilon^{-2}\log(1/\varepsilon)\log d)
\]
bits and update time \(O(\log(1/\varepsilon))\), together with a matching lower bound up to constants [2304.06853].

Algorithmic statistics provides another bounded-space reinterpretation. Using space-bounded distinguishing complexity \(CD^m(x)\) and \(CD^m(A)\), the paper defines bounded-space randomness deficiency
\[
d^m(x\mid A)=\log|A|-CD^m(x\mid A)
\]
and optimality deficiency
\[
\delta^m(x,A)=CD^m(A)+\log|A|-CD^m(x)
\]
[1702.08084]. It proves a bounded-space analogue of the classical connection between the two deficiencies, including
\[
d^{p(m+n)}(x\mid A)\le \delta^m(x,A)+c\log(CD^m(A))
\]
for a suitable polynomial \(p\), and a converse-style theorem for acceptable families of hypotheses [1702.08084]. A notable conceptual difference from the unbounded setting is that every string admits a good bounded-space explanation. This suggests that resource bounds weaken the distinction between stochastic and non-stochastic objects even while complicating exact optimization.

In privacy and adaptive data analysis, bounded space becomes an impossibility source rather than merely an implementation constraint. A two-stage model \(A=(A_1,A_2)\) is used, where \(A_1\) compresses the dataset or distribution into an \(s\)-bit summary and \(A_2\) answers queries using only that summary [2302.05707]. Under standard cryptographic assumptions, the paper constructs a decoded-average problem for which the non-private space cost is
\[
O(\lambda\log d),
\]
while every efficient \((\varepsilon,\delta)\)-CDP algorithm requires
\[
s=\Omega\!\left(\frac{\sqrt d}{\log n}\right)
\]
space in the formal corollary, yielding an exponential gap between private and non-private space requirements in the informal theorem [2302.05707]. The same work argues that adaptive data analysis lower bounds reflect a **space bottleneck** rather than a pure sample bottleneck, proving an \(\Omega(\sqrt{k})\)-type space lower bound up to representation-length factors [2302.05707].

Quantum bounded space exhibits analogous structural phenomena. For logspace quantum circuits preparing states \(\rho_0\) and \(\rho_1\), space-bounded quantum state testing for trace distance, Hilbert-Schmidt distance, entropy difference, and quantum Jensen–Shannon divergence all characterize the same bounded-space quantum class in the logspace regime [2308.05079]. The technical engine is a space-efficient form of **quantum singular value transformation** on projected unitary encodings. The paper states that implementing QSVT for any bounded polynomial approximating a piecewise-smooth function incurs only a **constant overhead** in the required special-form space [2308.05079]. This yields complete problems for unitary coRQL and BQL, and an algorithmic Holevo–Helstrom measurement. The broader implication is that even in quantum settings, bounded-space algorithm design depends on making the preprocessing and transformation layers themselves space-efficient, not only the final decision procedure.

Across these advanced directions, the role of space is not uniform. Sometimes it is a parameter to be traded against rescanning or seed length; sometimes it is the central hardness measure; and sometimes it collapses distinctions that are pronounced in time-bounded settings. What remains constant is that bounded-space computation forces algorithms to encode only the information that must cross an interface—between epochs, strips, frontiers, query stages, or circuit layers—and to reconstruct the rest on demand.

Source: https://www.emergentmind.com/topics/1-bounded-space-algorithms