English

Near-Optimal Two-Pass Streaming Algorithm for Sampling Random Walks over Directed Graphs

Data Structures and Algorithms 2021-02-23 v1 Computational Complexity

Abstract

For a directed graph GG with nn vertices and a start vertex ustartu_{\sf start}, we wish to (approximately) sample an LL-step random walk over GG starting from ustartu_{\sf start} with minimum space using an algorithm that only makes few passes over the edges of the graph. This problem found many applications, for instance, in approximating the PageRank of a webpage. If only a single pass is allowed, the space complexity of this problem was shown to be Θ~(nL)\tilde{\Theta}(n \cdot L). Prior to our work, a better space complexity was only known with O~(L)\tilde{O}(\sqrt{L}) passes. We settle the space complexity of this random walk simulation problem for two-pass streaming algorithms, showing that it is Θ~(nL)\tilde{\Theta}(n \cdot \sqrt{L}), by giving almost matching upper and lower bounds. Our lower bound argument extends to every constant number of passes pp, and shows that any pp-pass algorithm for this problem uses Ω~(nL1/p)\tilde{\Omega}(n \cdot L^{1/p}) space. In addition, we show a similar Θ~(nL)\tilde{\Theta}(n \cdot \sqrt{L}) bound on the space complexity of any algorithm (with any number of passes) for the related problem of sampling an LL-step random walk from every vertex in the graph.

Keywords

Cite

@article{arxiv.2102.11251,
  title  = {Near-Optimal Two-Pass Streaming Algorithm for Sampling Random Walks over Directed Graphs},
  author = {Lijie Chen and Gillat Kol and Dmitry Paramonov and Raghuvansh Saxena and Zhao Song and Huacheng Yu},
  journal= {arXiv preprint arXiv:2102.11251},
  year   = {2021}
}
R2 v1 2026-06-23T23:24:50.698Z