It is well known [Lov\'asz, 67] that up to isomorphism a graph~$G$ is determined by the homomorphism counts $\hom(F, G)$, i.e., the number of homomorphisms from $F$ to $G$, where $F$ ranges over all graphs. Thus, in principle, we can answer any query concerning $G$ with only accessing the $\hom(\cdot,G)$'s instead of $G$ itself. In this paper, we deal with queries for which there is a hom algorithm, i.e., there are finitely many graphs $F_1, \ldots, F_k$ such that for any graph $G$ whether it is a Yes-instance of the query is already determined by the vector\[\overrightarrow{\hom}_{F_1,\ldots,F_k}(G):= \big(\hom(F_1,G),\ldots,\hom(F_k,G)\big),\]where the graphs $F_1, \ldots, F_k$ only depend on $\varphi$. We observe that planarity of graphs and 3-colorability of graphs, properties expressible in monadic second-order logic, have no hom algorithm. On the other hand, queries expressible as a Boolean combination of universal sentences in first-order logic FO have a hom algorithm. Even though it is not easy to find FO definable queries without a hom algorithm, we succeed to show this for the non-existence of an isolated vertex, a property expressible by the FO sentence $\forall x\exists y Exy$, somehow the ``simplest'' graph property not definable by a Boolean combination of universal sentences.These results provide a characterization of the prefix classes of first-order logic with the property that each query definable by a sentence of the prefix class has a hom algorithm. For adaptive query algorithms, i.e., algorithms that again access $\overrightarrow{\hom}_{F_1,\ldots,F_k}(G)$ but here $F_{i+1}$ might depend on $\hom(F_1,G),\ldots,\hom(F_i,G)$, we show that three homomorphism counts $\hom(\cdot,G)$ are both sufficient and in general necessary to determine the isomorphism type of $G$.
翻译:众所周知[Lovász, 67],在图同构意义下,图$G$可由同态计数$\hom(F, G)$唯一确定,其中$F$遍历所有图,$\hom(F, G)$表示从$F$到$G$的同态数量。因此,原则上我们只需访问$\hom(\cdot,G)$的值而非$G$本身即可回答关于$G$的任何查询。本文研究存在同态算法的查询:即存在有限个图$F_1, \ldots, F_k$(仅依赖于查询$\varphi$),使得对于任意图$G$,其是否为查询的肯定实例完全由向量\[\overrightarrow{\hom}_{F_1,\ldots,F_k}(G):= \big(\hom(F_1,G),\ldots,\hom(F_k,G)\big)\]决定。我们观察到,图的平面性、三染色性等可用一元二阶逻辑表达的性质不存在同态算法。另一方面,可表达为一阶逻辑全称句布尔组合的查询具有同态算法。尽管不易找到无同态算法的一阶逻辑可定义查询,但我们成功证明了孤立顶点的不存在性——这一可由一阶语句$\forall x\exists y Exy$表达的性质(某种程度上是最简单的不可由全称句布尔组合定义的图性质)——即属此类。这些结果刻画了一阶逻辑前缀类的特征:每个由该前缀类语句可定义的查询均具有同态算法。对于自适应查询算法(即同样访问$\overrightarrow{\hom}_{F_1,\ldots,F_k}(G)$,但$F_{i+1}$可能依赖于$\hom(F_1,G),\ldots,\hom(F_i,G)$的算法),我们证明三个同态计数$\hom(\cdot,G)$既充分又一般地必要,足以确定$G$的同构类型。