Skip to main content
QUICK REVIEW

[Paper Review] Sampling and Counting Edges via Vertex Accesses.

Jakub Tětek, Mikkel Thorup|arXiv (Cornell University)|Jul 8, 2021
Complexity and Algorithms in GraphsComputer Science20 references7 citations
TL;DR

This paper presents efficient algorithms for sampling and counting edges in graphs using only vertex access, where each query reveals a vertex's degree and neighbors. It achieves optimal expected time for $ε$-uniform edge sampling and exact uniform sampling of $s$ edges, with matching lower bounds, and provides near-optimal edge counting with improved query complexity over prior work.

ABSTRACT

We consider the problems of sampling and counting edges from a graph on $n$ vertices where our basic access is via uniformly sampled vertices. When we have a vertex, we can see its degree, and access its neighbors. Eden and Rosenbaum [SOSA 2018] have shown it is possible to sample an edge $\epsilon$-uniformly in $O(\sqrt{1/\epsilon}\frac{n}{\sqrt{m}})$ vertex accesses. Here, we get down to expected $O(\log(1/\epsilon)\frac{n}{\sqrt{m}})$ vertex accesses. Next, we consider the problem of sampling $s>1$ edges. For this we introduce a model that we call hash-based neighbor access. We show that, w.h.p, we can sample $s$ edges exactly uniformly at random, with or without replacement, in $ ilde{O}(\sqrt{s} \frac{n}{\sqrt{m}} + s)$ vertex accesses. We present a matching lower bound of $\Omega(\sqrt{s} \frac{n}{\sqrt{m}} + s)$ which holds for $\epsilon$-uniform edge multi-sampling with some constant $\epsilon>0$ even though our positive result has $\epsilon=0$. We then give an algorithm for edge counting. W.h.p., we count the number of edges to within error $\epsilon$ in time $ ilde{O}(\frac{n}{\epsilon\sqrt{m}} + \frac{1}{\epsilon^2})$. When $\epsilon$ is not too small (for $\epsilon \geq \frac{\sqrt m}{n}$), we present a near-matching lower-bound of $\Omega(\frac{n}{\epsilon \sqrt{m}})$. In the same range, the previous best upper and lower bounds were polynomially worse in $\epsilon$. Finally, we give an algorithm that instead of hash-based neighbor access uses the more standard pair queries (``are vertices $u$ and $v$ adjacent''). W.h.p. it returns $1+\epsilon$ approximation of the number of edges and runs in expected time $ ilde{O}(\frac{n}{\epsilon \sqrt{m}} + \frac{1}{\epsilon^4})$. This matches our lower bound when $\epsilon$ is not too small, specifically for $\epsilon \geq \frac{m^{1/6}}{n^{1/3}}$.

Motivation & Objective

  • To design efficient algorithms for sampling and counting edges in graphs when only vertex access is available.
  • To reduce the query complexity for $ε$-uniform edge sampling from $O(\sqrt{1/\epsilon} \cdot n / \sqrt{m})$ to $O(\log(1/\epsilon) \cdot n / \sqrt{m})$ expected vertex accesses.
  • To introduce and utilize a hash-based neighbor access model to achieve exact uniform sampling of $s$ edges with optimal query complexity.
  • To establish tight lower bounds for edge sampling and counting under vertex access models, matching the upper bounds in key regimes.
  • To extend results to the standard pair query model, providing a nearly optimal approximation algorithm for edge counting.

Proposed method

  • Introduces a hash-based neighbor access model to enable efficient and exact uniform sampling of $s$ edges.
  • Employs a novel sampling strategy that leverages vertex degrees and neighbor access to achieve $\epsilon$-uniform edge sampling with $O(\log(1/\epsilon) \cdot n / \sqrt{m})$ expected vertex accesses.
  • Uses a combination of vertex sampling and neighbor probing to estimate edge counts within $\epsilon$-relative error in $\tilde{O}(n/(\epsilon \sqrt{m}) + 1/\epsilon^2)$ time.
  • Applies concentration inequalities and probabilistic analysis to prove high-probability correctness of sampling and counting results.
  • Derives a lower bound of $\Omega(\sqrt{s} \cdot n / \sqrt{m} + s)$ for $\epsilon$-uniform multi-sampling, showing optimality of the proposed algorithm.
  • Adapts the approach to the standard pair query model, achieving a $1+\epsilon$ approximation for edge counting in $\tilde{O}(n/(\epsilon \sqrt{m}) + 1/\epsilon^4)$ expected time.

Experimental results

Research questions

  • RQ1Can edge sampling be performed with significantly fewer vertex accesses than previous methods under the same accuracy guarantees?
  • RQ2Is it possible to achieve exact uniform sampling of $s$ edges using a hash-based neighbor access model with optimal query complexity?
  • RQ3What are the information-theoretic limits of edge sampling and counting under vertex access models?
  • RQ4How does the performance of edge counting algorithms compare between the hash-based neighbor access and standard pair query models?
  • RQ5Can tight lower bounds be established for edge sampling and counting that match the upper bounds of proposed algorithms?

Key findings

  • The paper achieves $O(\log(1/\epsilon) \cdot n / \sqrt{m})$ expected vertex accesses for $\epsilon$-uniform edge sampling, improving over the prior $O(\sqrt{1/\epsilon} \cdot n / \sqrt{m})$ bound.
  • It presents an algorithm that samples $s$ edges exactly uniformly at random, with or without replacement, in $\tilde{O}(\sqrt{s} \cdot n / \sqrt{m} + s)$ vertex accesses under the hash-based neighbor access model.
  • A matching lower bound of $\Omega(\sqrt{s} \cdot n / \sqrt{m} + s)$ is established for $\epsilon$-uniform multi-sampling, proving optimality of the algorithm.
  • For edge counting within $\epsilon$-relative error, the algorithm runs in $\tilde{O}(n/(\epsilon \sqrt{m}) + 1/\epsilon^2)$ time with high probability.
  • When $\epsilon \geq \sqrt{m}/n$, a lower bound of $\Omega(n/(\epsilon \sqrt{m}))$ is proven, matching the upper bound up to logarithmic factors.
  • In the standard pair query model, the algorithm achieves a $1+\epsilon$ approximation for edge counting in $\tilde{O}(n/(\epsilon \sqrt{m}) + 1/\epsilon^4)$ expected time, matching the lower bound for $\epsilon \geq m^{1/6}/n^{1/3}$.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.