Color Refinement, also known as Naive Vertex Classification, is a classical method to distinguish graphs by iteratively computing a coloring of their vertices. While it is mainly used as an imperfect way to test for isomorphism, the algorithm permeated many other, seemingly unrelated, areas of computer science. The method is algorithmically simple, and it has a well-understood distinguishing power: It is logically characterized by Cai, Fürer and Immerman (1992), who showed that it distinguishes precisely those graphs that can be distinguished by a sentence of first-order logic with counting quantifiers and only two variables. A combinatorial characterization is given by Dvořák (2010), who shows that it distinguishes precisely those graphs that can be distinguished by the number of homomorphisms from some tree. In this paper, we introduce Relational Color Refinement (RCR, for short), a generalization of the Color Refinement method from graphs to arbitrary relational structures, whose distinguishing power admits the equivalent combinatorial and logical characterizations as Color Refinement has on graphs: We show that RCR distinguishes precisely those structures that can be distinguished by the number of homomorphisms from an acyclic relational structure. Further, we show that RCR distinguishes precisely those structures that can be distinguished by a sentence of the guarded fragment of first-order logic with counting quantifiers. Additionally, we show that for every fixed finite relational signature, RCR can be implemented to run on structures of that signature in time $O(N\cdot \log N)$, where $N$ denotes the number of tuples present in the structure.
翻译:颜色细化,亦称朴素顶点分类,是一种通过迭代计算顶点着色来区分图的经典方法。尽管它主要被用作测试同构的一种不完美方式,但该算法已渗透到计算机科学中许多看似不相关的其他领域。该方法在算法上简单,且其区分能力已得到充分理解:Cai、Fürer和Immerman(1992)从逻辑上对其进行了刻画,他们证明该方法能精确区分那些可以通过带计数量词且仅含两个变量的一阶逻辑句子来区分的图。Dvořák(2010)给出了组合刻画,表明它能精确区分那些可以通过来自某个树的同态数量来区分的图。本文中,我们引入关系颜色细化(简称RCR),这是将颜色细化方法从图推广到任意关系结构的一种泛化,其区分能力允许等价于图上的颜色细化所具有的组合与逻辑刻画:我们证明RCR能精确区分那些可以通过来自无环关系结构的同态数量来区分的结构。此外,我们证明RCR能精确区分那些可以通过带计数量词的受保护一阶逻辑片段中的句子来区分的结构。另外,我们证明对于每个固定的有限关系签名,RCR可以在该签名结构上以$O(N\cdot \log N)$的时间复杂度实现,其中$N$表示结构中存在的元组数量。