Approximate Maximum Matching in Random Streams

Alireza Farhadi, MohammadTaghi Hajiaghayi, Tung Mai, Anup Rao, Ryan A. RossiSODA 2019

Abstract

In this paper, we study the problem of finding a maximum matching in the semi-streaming model when edges arrive in a random order. In the semi-streaming model, an algorithm receives a stream of edges and it is allowed to have a memory of $\tilde{O}(n)$ where $n$ is the number of vertices in the graph. A recent inspiring work by Assadi et al. shows that there exists a streaming algorithm with the approximation ratio of $2/3$ that uses $\tilde{O}(n^{1.5})$ memory. However, the memory of their algorithm is much larger than the memory constraint of the semi-streaming algorithms. In this work, we further investigate this problem in the semi-streaming model, and we present simple and clean algorithms for approximating maximum matching in the semi-streaming model. Our main results are as follows. We show that there exists a single-pass deterministic semi-streaming algorithm that finds a $0.6$ approximation of the maximum matching in bipartite graphs using $\tilde{O}(n)$ memory. This result significantly outperforms the state-of-the-art result of Konrad that finds a $0.539$ approximation. By giving a black-box reduction from finding a matching in general graphs to finding a matching in bipartite graphs, we show there exists a single-pass deterministic semi-streaming algorithm that finds a $\approx 0.545$ approximation of the maximum matching in general graphs, improving upon the state-of-art result $0.506$ approximation by Gamlath et al.

The Challenge of Large-Scale Matching

In the era of "Big Data," we often encounter graphs so massive—such as social networks or web crawls—that we cannot store all their edges in a computer's RAM. The semi-streaming model addresses this by allowing an algorithm to see edges one by one in a stream, while restricting its memory to roughly $\tilde{O}(n)$—enough to store the vertices, but not the potentially $O(n^2)$ edges.

A simple "greedy" algorithm—adding an edge to your matching if its endpoints aren't already matched—guarantees a 0.5-approximation of the maximum matching. For years, researchers have struggled to significantly beat this 0.5 threshold in a single pass.

Algorithm 1: The baseline GREEDY algorithm for finding matchings in a stream.

This paper focuses on the random order model, where edges arrive in a uniformly random permutation rather than an adversarial one. This setting often reflects real-world data arrival more accurately and provides structural properties that can be exploited to surpass the greedy limit.

Breaking the 0.5-Approximation Barrier

The authors introduce a deterministic, single-pass algorithm that leverages the "friendliness" of random arrival through several key techniques:

  1. Greedy Prefixing: The algorithm uses a very small initial fraction of the stream (about $1/\log n$) to find an initial matching $M_0$.
  2. Residual Edge Storage: A crucial insight is that in a random stream, the number of edges that do not share a vertex with $M_0$ is small enough to fit entirely into the $\tilde{O}(n)$ semi-streaming memory. This allows the algorithm to find a maximum matching for this "residual" part of the graph offline.
  3. Finding Augmenting Paths: To improve the matching beyond the greedy limit, the algorithm searches for augmenting paths—sequences of edges that allow you to "swap" edges to increase the total matching size. While previous works focused on 3-length paths, this paper successfully finds 5-augmenting paths in a single pass.
  4. Recursive Refinement: The algorithm is structured recursively, using small portions of the stream to iteratively find and apply these augmenting paths.
  5. Bipartite-to-General Reduction: The authors provide a "black-box" reduction. They show that if you have a good algorithm for bipartite graphs, you can transform it into an improved algorithm for general graphs using the formula: an approximation ratio of $p$ in bipartite graphs yields a $\frac{2p}{2p+1}$ ratio in general graphs.

Key Insights: Randomness as a Resource

The authors treat the random arrival order not just as a lack of an adversary, but as a tool. It ensures that a greedy matching on a tiny prefix "clears out" enough of the graph that the remaining "untouched" edges can be stored in memory. Furthermore, moving from 3-augmenting paths to 5-augmenting paths is technically challenging in a single pass, but the authors demonstrate that it provides the necessary "boost" to reach the 0.6 (3/5) approximation ratio.

Interestingly, the algorithm itself is deterministic. Its performance guarantee is "with high probability" (w.h.p.), meaning it will succeed on almost all possible permutations of the edge stream.

Results and Comparisons

The paper establishes new state-of-the-art approximation factors for single-pass semi-streaming matching in random streams. As shown in the comparison table below, the proposed method achieves a 0.6 approximation for bipartite graphs and a 0.545 approximation for general graphs.

Comparison of approximation factors and space complexity between this work and previous state-of-the-art algorithms.

These results significantly outperform the previous benchmarks of 0.539 (Konrad) and 0.506 (Gamlath et al.), respectively.

Conclusion and Future Work

While this paper moves the needle to 0.6, there is still a small gap to the known theoretical upper bound of $1 - 1/e \approx 0.632$ for semi-streaming matching. Future research may explore how multiple passes could further improve these ratios or attempt to beat the 0.5 threshold in truly adversarial (worst-case) streams, which remains a major open challenge in streaming algorithm research.

Summary updated

BibTeX
@inproceedings{farhadi2019approximate,
  author = {Alireza Farhadi and MohammadTaghi Hajiaghayi and Tung Mai and Anup Rao and Ryan A. Rossi},
  title = {{Approximate Maximum Matching in Random Streams}},
  booktitle = {SODA},
  year = {2019},
  url = {https://openreview.net/forum?id=HL5c6Hxmukq},
}
Figure