We study the complexity of approximating the number of answers to a small query $\varphi$ in a large database $\mathcal{D}$. We establish an exhaustive classification into tractable and intractable cases if $\varphi$ is a conjunctive query with disequalities and negations: $\bullet$ If there is a constant bound on the arity of $\varphi$, and if the randomised Exponential Time Hypothesis (rETH) holds, then the problem has a fixed-parameter tractable approximation scheme (FPTRAS) if and only if the treewidth of $\varphi$ is bounded. $\bullet$ If the arity is unbounded and we allow disequalities only, then the problem has an FPTRAS if and only if the adaptive width of $\varphi$ (a width measure strictly more general than treewidth) is bounded; the lower bound relies on the rETH as well. Additionally we show that our results cannot be strengthened to achieve a fully polynomial randomised approximation scheme (FPRAS): We observe that, unless $\mathrm{NP} =\mathrm{RP}$, there is no FPRAS even if the treewidth (and the adaptive width) is $1$. However, if there are neither disequalities nor negations, we prove the existence of an FPRAS for queries of bounded fractional hypertreewidth, strictly generalising the recently established FPRAS for conjunctive queries with bounded hypertreewidth due to Arenas, Croquevielle, Jayaram and Riveros (STOC 2021).
翻译:在大型数据库中,我们研究对一个小问题(美元)的答案数目的近似复杂性。我们在一个大数据库中,对一个小问题(美元)的答案数进行接近的复杂性。如果美元(美元)是不平等和否定的混合质质问,我们就对可移动和棘手的个案进行彻底的分类:如果美元(美元)是一个对等性和否定性的共质质质质询,那么美元(美元)就是一个复杂问题。如果随机化的指数时间假设(reth)存在,那么问题就有一个固定的参数可移动的近似方案(FPTRAS),如果美元(美元)的直径(美元)的直径(美元)和直径(美元)的直径离质(美元),那么问题就有一个FTRAS(美元)的顺差值(美元),那么我们无法更准确地实现一个完全混合的近似值近似值的近似值(美元,除非FRPS) 直径(美元和直径(美元) 直径(美元) 直径) 直径(我们观察的是,我们无法证实我们的结果会更强到完全实现一个完全的近似的近似的近似的近似(RPRPRP(美元)计划(美元),直到最近才)。