In this paper, we study the sampling problem for first-order logic proposed recently by Wang et al. -- how to efficiently sample a model of a given first-order sentence on a finite domain? We extend their result for the universally-quantified subfragment of two-variable logic $\mathbf{FO}^2$ ($\mathbf{UFO}^2$) to the entire fragment of $\mathbf{FO}^2$. Specifically, we prove the domain-liftability under sampling of $\mathbf{FO}^2$, meaning that there exists a sampling algorithm for $\mathbf{FO}^2$ that runs in time polynomial in the domain size. We then further show that this result continues to hold even in the presence of counting constraints, such as $\forall x\exists_{=k} y: \varphi(x,y)$ and $\exists_{=k} x\forall y: \varphi(x,y)$, for some quantifier-free formula $\varphi(x,y)$. Our proposed method is constructive, and the resulting sampling algorithms have potential applications in various areas, including the uniform generation of combinatorial structures and sampling in statistical-relational models such as Markov logic networks and probabilistic logic programs.
翻译:本文研究了Wang等人近期提出的一阶逻辑采样问题——如何在有限域上高效地对给定一阶语句的模型进行采样?我们将他们对双变量逻辑$\mathbf{FO}^2$的全称量化子片段($\mathbf{UFO}^2$)的结果推广至$\mathbf{FO}^2$的完整片段。具体而言,我们证明了$\mathbf{FO}^2$在采样下的域可提升性,即存在一种运行时间与域大小呈多项式关系的$\mathbf{FO}^2$采样算法。进一步,我们表明即使在存在计数约束(如$\forall x\exists_{=k} y: \varphi(x,y)$和$\exists_{=k} x\forall y: \varphi(x,y)$,其中$\varphi(x,y)$为无量词公式)的情况下,该结论依然成立。我们提出的方法是构造性的,所得采样算法在多个领域具有潜在应用价值,包括组合结构的均匀生成,以及马尔可夫逻辑网络和概率逻辑程序等统计关系模型中的采样。