We consider the problem of sampling an arbitrary given motif $H$ in a graph $G$, where access to $G$ is given via queries: degree, neighbor, and pair, as well as uniform edge sample queries. Previous algorithms for the uniform sampling task were based on a decomposition of $H$ into a collection of odd cycles and stars, denoted $\mathcal{D}^*(H)=\{O_{k_1}, \ldots, O_{k_q}, S_{p_1}, \ldots, S_{p_\ell}\}$. These algorithms were shown to be optimal for the case where $H$ is a clique or an odd-length cycle, but no other lower bounds were known. We present a new algorithm for sampling arbitrary motifs which, up to $\poly(\log n)$ factors, for any motif $H$ whose decomposition contains at least two components or at least one star, is always preferable. The main ingredient leading to this improvement is an improved uniform algorithm for sampling stars, which might be of independent interest, as it allows to sample vertices according to the $p$-th moment of the degree distribution. We further show how to use our sampling algorithm to get an approximate counting algorithm, with essentially the same complexity. Finally, we prove that this algorithm is \emph{decomposition-optimal} for decompositions that contain at least one odd cycle. That is, we prove that for any decomposition $D$ that contains at least one odd cycle, there exists a motif $H_{D}$ with decomposition $D$, and a family of graphs $\mathcal{G}$, so that in order to output a uniform copy of $H$ in a uniformly chosen graph in $\mathcal{G}$, the number of required queries matches our upper bound. These are the first lower bounds for motifs $H$ with a nontrivial decomposition, i.e., motifs that have more than a single component in their decomposition.
翻译:我们考虑在一张G$的G$中, 任意取样给定的美元, 使用G$的G$, 询问的方式是: 度、 邻里、 配对、 以及统一的边缘抽样查询。 统一取样任务以前的算法是基于将H$分解成奇数周期和恒星的集合的。 表示美元==D{( H)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\( H)\\\\\\\\\( h)\\( h)\( h)\( h), 美元=美元=( 美元), S\\\\\\\\\\\\\\\( 美元) 美元, 美元=( g) 美元) 。 这些算法是最佳的。 导致这一改进的主要成分是 一种统一的 美元=( 美元) 的计算方法, 在取样恒星的周期中, 可能是独立的, DNA的排序 。 使得我们开始使用 一种直数的 。