Sampling and Counting Edges via Vertex Accesses

07/08/2021
by   Jakub Tětek, et al.
0

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 ϵ-uniformly in O(√(1/ϵ)n/√(m)) vertex accesses. Here, we get down to expected O(log(1/ϵ)n/√(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 Õ(√(s)n/√(m) + s) vertex accesses. We present a matching lower bound of Ω(√(s)n/√(m) + s) which holds for ϵ-uniform edge multi-sampling with some constant ϵ>0 even though our positive result has ϵ=0. We then give an algorithm for edge counting. W.h.p., we count the number of edges to within error ϵ in time Õ(n/ϵ√(m) + 1/ϵ^2). When ϵ is not too small (for ϵ≥√(m)/n), we present a near-matching lower-bound of Ω(n/ϵ√(m)). In the same range, the previous best upper and lower bounds were polynomially worse in ϵ. 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+ϵ approximation of the number of edges and runs in expected time Õ(n/ϵ√(m) + 1/ϵ^4). This matches our lower bound when ϵ is not too small, specifically for ϵ≥m^1/6/n^1/3.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/07/2020

Almost Optimal Bounds for Sublinear-Time Sampling of k-Cliques: Sampling Cliques is Harder Than Counting

In this work, we consider the problem of sampling a k-clique in a graph ...
research
03/08/2021

A Fully Polynomial Parameterized Algorithm for Counting the Number of Reachable Vertices in a Digraph

We consider the problem of counting the number of vertices reachable fro...
research
06/08/2020

Near-Perfect Recovery in the One-Dimensional Latent Space Model

Suppose a graph G is stochastically created by uniformly sampling vertic...
research
11/07/2020

Combinatorial Bernoulli Factories: Matchings, Flows and Other Polytopes

A Bernoulli factory is an algorithmic procedure for exact sampling of ce...
research
05/04/2020

Sampling Arbitrary Subgraphs Exactly Uniformly in Sublinear Time

We present a simple sublinear-time algorithm for sampling an arbitrary s...
research
07/14/2021

Towards a Decomposition-Optimal Algorithm for Counting and Sampling Arbitrary Motifs in Sublinear Time

We consider the problem of sampling and approximately counting an arbitr...
research
05/04/2021

An Optimal Algorithm for Triangle Counting

We present a new algorithm for approximating the number of triangles in ...

Please sign up or login with your details

Forgot password? Click here to reset