English

On Algorithms Based on Finitely Many Homomorphism Counts

Computational Complexity 2023-04-21 v2 Discrete Mathematics Logic in Computer Science

Abstract

It is well known [Lov\'asz, 67] that up to isomorphism a graph~GG is determined by the homomorphism counts hom(F,G)\hom(F, G), i.e., the number of homomorphisms from FF to GG, where FF ranges over all graphs. Thus, in principle, we can answer any query concerning GG with only accessing the hom(,G)\hom(\cdot,G)'s instead of GG itself. In this paper, we deal with queries for which there is a hom algorithm, i.e., there are finitely many graphs F1,,FkF_1, \ldots, F_k such that for any graph GG whether it is a Yes-instance of the query is already determined by the vectorhomF1,,Fk(G):=(hom(F1,G),,hom(Fk,G)),\overrightarrow{\hom}_{F_1,\ldots,F_k}(G):= \big(\hom(F_1,G),\ldots,\hom(F_k,G)\big),where the graphs F1,,FkF_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 xyExy\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 homF1,,Fk(G)\overrightarrow{\hom}_{F_1,\ldots,F_k}(G) but here Fi+1F_{i+1} might depend on hom(F1,G),,hom(Fi,G)\hom(F_1,G),\ldots,\hom(F_i,G), we show that three homomorphism counts hom(,G)\hom(\cdot,G) are both sufficient and in general necessary to determine the isomorphism type of GG.

Keywords

Cite

@article{arxiv.2111.13269,
  title  = {On Algorithms Based on Finitely Many Homomorphism Counts},
  author = {Yijia Chen and Jörg Flum and Mingjun Liu and Zhiyang Xun},
  journal= {arXiv preprint arXiv:2111.13269},
  year   = {2023}
}
R2 v1 2026-06-24T07:52:32.782Z