Join Sampling under Acyclic Degree Constraints and (Cyclic) Subgraph Sampling
Abstract
Given a join with an acyclic set of degree constraints, we show how to draw a uniformly random sample from the join result in expected time after a preprocessing of expected time, where , , and are the join's input size, output size, and polymatroid bound, respectively. This compares favorably with the state of the art (Deng et al.\ and Kim et al., both in PODS'23), which states that a uniformly random sample can be drawn in expected time after a preprocessing phase of expected time, where is the join's AGM bound. We then utilize our techniques to tackle {\em directed subgraph sampling}. Let be a directed data graph where each vertex has an out-degree at most , and let be a directed pattern graph with vertices. The objective is to uniformly sample an occurrence of in . The problem can be modeled as join sampling with input size but, whenever contains cycles, the converted join has {\em cyclic} degree constraints. We show that it is always possible to throw away certain degree constraints such that (i) the remaining constraints are acyclic and (ii) the new join has asymptotically the same polymatroid bound as the old one. Combining this finding with our new join sampling solution yields an algorithm to sample from the original (cyclic) join (thereby yielding a uniformly random occurrence of ) in expected time after expected-time preprocessing. We also prove similar results for {\em undirected subgraph sampling} and demonstrate how our techniques can be significantly simplified in that scenario.
Cite
@article{arxiv.2312.12797,
title = {Join Sampling under Acyclic Degree Constraints and (Cyclic) Subgraph Sampling},
author = {Ru Wang and Yufei Tao},
journal= {arXiv preprint arXiv:2312.12797},
year = {2023}
}