Lune

STOC2021顶会

When is approximate counting for conjunctive queries tractable?

Marcelo Arenas, Luis Alberto Croquevielle, Rajesh Jayaram, Cristian Riveros

摘要

Conjunctive queries are one of the most common class of queries used in database systems, and the best studied in the literature. A seminal result of Grohe, Schwentick, and Segoufin (STOC 2001) demonstrates that for every class G of graphs, the evaluation of all conjunctive queries whose underlying graph is in G is tractable if, and only if, G has bounded treewidth. In this work, we extend this characterization to the counting problem for conjunctive queries. Specifically, for every class C of conjunctive queries with bounded treewidth, we introduce the first fully polynomial-time randomized approximation scheme (FPRAS) for counting answers to a query in C, and the first polynomial-time algorithm for sampling answers uniformly from a query in C. As a corollary, it follows that for every class G of graphs, the counting problem for conjunctive queries whose underlying graph is in G admits an FPRAS if, and only if, G has bounded treewidth (unless BPP = P). In fact, our FPRAS is more general, and also applies to conjunctive queries with bounded hypertree width, as well as unions of such queries. The key ingredient in our proof is the resolution of a fundamental counting problem from automata theory. Specifically, we demonstrate the first FPRAS and polynomial time sampler for the set of trees of size n accepted by a tree automaton, which improves the prior quasipolynomial time randomized approximation scheme (QPRAS) and sampling algorithm of Gore, Jerrum, Kannan, Sweedyk, and Mahaney '97. We demonstrate how this algorithm can be used to obtain an FPRAS for many hitherto open problems, such as counting solutions to constraint satisfaction problems (CSP) with bounded hypertree-width, counting the number of error threads in programs with nested call subroutines, and counting valid assignments to structured DNNF circuits. G(x) E(x, y) E(x, z) C(y) M(z) (a) A join tree. G(b) E(b, c1) E(b, c3) C(c1) M(c3) G(b) E(b, c2) E(b, c3) C(c2) M(c3)

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • The Complexity of Pattern Counting in Directed Graphs, Parameterised by the Outdegree 引用了 Exact and Approximate Pattern Counting in Degenerate Graphs: New Algorithms, Hardness Results, and Complexity Dichotomies
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. Threshold Queries in Theory and in the WildAngela Bonifati, Stefania Dumbrava, George Fletcher, Jan Hidders 等VLDB 2022 · 19 次引用
  2. Testing Probabilistic CircuitsYash Pote, Kuldeep S. MeelNeurIPS 2021 · 10 次引用
  3. The Complexity of Pattern Counting in Directed Graphs, Parameterised by the OutdegreeMarco Bressan, Matthias Lanzinger, Marc RothSTOC 2023 · 9 次引用
  4. Exact and Approximate Pattern Counting in Degenerate Graphs: New Algorithms, Hardness Results, and Complexity DichotomiesMarco Bressan, Marc RothFOCS 2021 · 8 次引用
  5. In-Database Regression in Input Sparsity TimeRajesh Jayaram, Alireza Samadian, David P. Woodruff, Peng YeICML 2021 · 8 次引用

相关 Paper

  1. Fast Hypertree Decompositions via Linear Programming: Fractional and GeneralizedVaishali Surianarayanan, Anikait Mundhra, Ajaykrishnan E. S., Daniel LokshtanovSIGMOD 2025
  2. Towards the sampling Lovász Local LemmaVishesh Jain, Huy Tuan Pham, Thuy-Duong VuongFOCS 2021 · 17 次引用
  3. Counting and Sampling Traces in Regular LanguagesAlexis de Colnet, Kuldeep S. Meel, Umang MathurPOPL 2026 · 1 次引用
  4. #CFG and #DNNF admit FPRASKuldeep S. Meel, Alexis de ColnetSODA 2026
  5. A Branch-&-Bound Algorithm for Fractional Hypertree DecompositionZongyan He, Jeffrey Xu YuVLDB 2024 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖