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{UFO}2$ (mathbf{UFO}2$) 至 $mathbf{FO}2$ (x,y) 和 $\clexf{f{FO}2$ 。具体地说,我们证明在$\mathbf{FO}2$(美元) 的抽样下,域域内存在一个特定一阶句首阶句句的模型模型的样本算法。我们随后进一步表明,即使存在计算限制,例如$\forall x\cremels%k} y:\varphi(x,y)$(x,y)$(fox)$(FO}2$(美元) $(FO}2$(美元) $(美元) 美元) 也存在一个在域内运行域内运行域内运行多的时段模型的取样结构结构结构结构结构中,我们提议的计算方法具有建设性的统计结构。我们提出的方法是, 和制成的统计结构结构结构结构的建设性区域。