Approximate Data Structures with Applications

Yossi Matias, Jeffrey Scott Vitter, Neal E. Young

Abstract

Traditional data structures prioritize exactness, often at the cost of computational efficiency. This paper introduces approximate data structures that trade a small, controlled amount of output error for significantly faster performance. By developing approximate variants of the van Emde Boas (vEB) data structure, we demonstrate that fundamental algorithms such as Prim’s Minimum Spanning Tree (MST) and Dijkstra’s shortest paths can achieve substantial speedups—reaching linear time in some cases—while maintaining provable accuracy bounds. Our approach utilizes universe reduction to map large value ranges into smaller, more manageable effective universes, enabling constant-time operations under specific error regimes.

Introduction

In the realm of theoretical computer science, data structures are typically expected to be exact. However, the time complexity of these exact structures frequently serves as a bottleneck for large-scale algorithmic performance. For example, the van Emde Boas (vEB) tree, a cornerstone for maintaining ordered sets, requires $O(\log \log U)$ time per operation for a universe of size $U$.

This research explores whether relaxing the requirement for absolute precision can yield significant computational gains. In many practical scenarios—such as finding a "sufficiently good" shortest path or a "nearly minimal" spanning tree—absolute precision is secondary to execution speed. We formalize this trade-off by introducing approximate data structures that provide either multiplicative or additive error guarantees.

Methodology: Universe Reduction

The primary innovation in this work is the modification of the van Emde Boas (vEB) data structure through a technique called universe reduction. The goal is to map the original large universe of possible values $[1, U]$ to a significantly smaller "effective" universe $U'$ using a fixed mapping function $f$.

We define two primary types of approximation:

  1. Multiplicative ($1 + \epsilon$): The returned value is within a factor of $1 + \epsilon$ of the true value. Here, the effective universe size becomes $U' = O(\log_{1+\epsilon} U)$.
  2. Additive ($\Delta$): The returned value is within a fixed distance $\Delta$ of the true value. In this case, the effective universe size is reduced to $U' = U/\Delta$.

By implementing an exact vEB structure on this compressed universe, the time complexity of operations (insert, delete, predecessor, successor) is reduced. On a standard RAM with $b$-bit words, the time per operation scales with the log-log of the effective universe size.

General time complexity for multiplicative and additive approximate vEB structures.

Theoretical Results and Complexity Analysis

The most striking result of this approach is the emergence of constant-time operations for certain error bounds. When the error parameters $\epsilon$ or $\Delta/U$ are relatively large—specifically on the order of $1/\text{polylog}(nU)$—the complexity of vEB operations collapses to $O(1)$.

Time complexity for specific error regimes, highlighting the transition to constant time.

This "collapse" occurs because the effective universe becomes small enough to be handled in a single word operation on a standard RAM model. Even with tighter error bounds, such as $1/\exp(\text{polylog}(n))$, the complexity remains a highly efficient $O(\log \log n)$.

Algorithmic Applications

A key advantage of these approximate structures is their "plug-and-play" nature. They can often be integrated into existing algorithms without altering the underlying logic. The algorithm treats the approximate structure as an exact one, and the resulting error remains bounded and predictable.

Minimum Spanning Trees (MST)

Using approximate vEB structures, Prim’s algorithm can find a $(1+\epsilon)$-approximate MST in linear time $O(m + n)$. This provides a simpler and more practical alternative to existing exact linear-time MST algorithms, which are often complex to implement.

Single-Source Shortest Paths

In Dijkstra’s algorithm, error can accumulate as it propagates through the graph. However, by setting the per-operation error to a sufficiently small value (e.g., $\epsilon/2n$), the total error can be kept within the desired $(1+\epsilon)$ bound. This allows Dijkstra’s algorithm to run in $O(m \log \log n)$ time for sparse graphs, outperforming the best-known exact algorithms in this category.

On-line Convex Hull

The authors achieve the first constant-amortized-time per-query approximation algorithm for the on-line convex hull problem, demonstrating the versatility of these structures beyond simple graph algorithms.

Conclusion and Future Work

While approximate data structures offer significant performance benefits, their utility depends on the "robustness" of the algorithm they support. Algorithms highly sensitive to small errors may require more careful error management. Furthermore, the most dramatic speedups rely on standard RAM model assumptions regarding word sizes.

Future research directions include applying these structures to computational geometry problems like line arrangement and sweeping algorithms, as well as designing new "robust algorithms" specifically tailored to leverage approximate data structures from the outset.

Summary updated

BibTeX
@inproceedings{matias1994approximate,
  author = {Yossi Matias and Jeffrey Scott Vitter and Neal E. Young},
  title = {{Approximate Data Structures with Applications}},
  booktitle = {SODA},
  year = {1994},
}
Figure