A query algorithm based on homomorphism counts is a procedure for determining whether a given instance satisfies a property by counting homomorphisms between the given instance and finitely many predetermined instances. In a left query algorithm, we count homomorphisms from the predetermined instances to the given instance, while in a right query algorithm we count homomorphisms from the given instance to the predetermined instances. Homomorphisms are usually counted over the semiring N of non-negative integers; it is also meaningful, however, to count homomorphisms over the Boolean semiring B, in which case the homomorphism count indicates whether or not a homomorphism exists. We first characterize the properties that admit a left query algorithm over B by showing that these are precisely the properties that are both first-order definable and closed under homomorphic equivalence. After this, we turn attention to a comparison between left query algorithms over B and left query algorithms over N. In general, there are properties that admit a left query algorithm over N but not over B. The main result of this paper asserts that if a property is closed under homomorphic equivalence, then that property admits a left query algorithm over B if and only if it admits a left query algorithm over N. In other words and rather surprisingly, homomorphism counts over N do not help as regards properties that are closed under homomorphic equivalence. Finally, we characterize the properties that admit both a left query algorithm over B and a right query algorithm over B.
翻译:基于同态计数的查询算法是一种通过计算给定实例与有限个预定义实例之间的同态数量,来确定该实例是否满足某个性质的过程。在左查询算法中,我们计算从预定义实例到给定实例的同态数量;而在右查询算法中,我们计算从给定实例到预定义实例的同态数量。同态通常是在非负整数半环N上计数的;然而,在布尔半环B上计数同态也是有意义的,此时同态计数值仅指示同态是否存在。我们首先刻画了允许在B上使用左查询算法的性质,表明这些性质恰好是那些既可用一阶逻辑定义又对同态等价封闭的性质。随后,我们将注意力转向B上左查询算法与N上左查询算法的比较。一般而言,存在一些性质允许在N上使用左查询算法,但不允许在B上使用。本文的主要结果断言:如果一个性质对同态等价封闭,那么该性质允许在B上使用左查询算法当且仅当它允许在N上使用左查询算法。换言之,颇为令人惊讶的是,对于对同态等价封闭的性质,在N上的同态计数并无助益。最后,我们刻画了那些同时允许在B上使用左查询算法和在B上使用右查询算法的性质。