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中无法定义的属性。本文的主要结果表明,如果属性在同态等价下闭合,则该属性如果能够在N中定义左查询算法,则也必然能够在B中定义左查询算法。换言之,对于在同态等价下闭合的属性,N中的同态数量对其定义左查询算法没有帮助。最后,我们刻画了那些既可通过B中左查询算法,又可通过B中右查询算法定义的属性。