{"title":"On algorithms based on finitely many homomorphism counts","authors":"Yijia Chen , Jörg Flum , Mingjun Liu , Zhiyang Xun","doi":"10.1016/j.ic.2025.105326","DOIUrl":null,"url":null,"abstract":"<div><div>It is a well-known result of Lovász that up to isomorphism a graph <em>G</em> is determined by the homomorphism counts <span><math><mtext>hom</mtext><mo>(</mo><mi>F</mi><mo>,</mo><mi>G</mi><mo>)</mo></math></span>, i.e., the number of homomorphisms from <em>F</em> to <em>G</em>, where <em>F</em> ranges over all graphs. Thus, in principle, we can answer any query concerning <em>G</em> with only accessing the <span><math><mtext>hom</mtext><mo>(</mo><mo>⋅</mo><mo>,</mo><mi>G</mi><mo>)</mo></math></span>'s instead of <em>G</em> itself. In this paper, we deal with queries <em>φ</em> for which there is a <em>hom algorithm</em>, i.e., there are <em>finitely many</em> graphs <span><math><msub><mrow><mi>F</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><mo>…</mo><mo>,</mo><msub><mrow><mi>F</mi></mrow><mrow><mi>k</mi></mrow></msub></math></span> such that for any graph <em>G</em> whether it is a <span>Yes</span>-instance of the query is already determined by the vector<span><span><span><math><msub><mrow><mover><mrow><mtext>hom</mtext></mrow><mrow><mo>→</mo></mrow></mover></mrow><mrow><msub><mrow><mi>F</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><mo>…</mo><mo>,</mo><msub><mrow><mi>F</mi></mrow><mrow><mi>k</mi></mrow></msub></mrow></msub><mo>(</mo><mi>G</mi><mo>)</mo><mo>:</mo><mo>=</mo><mo>(</mo><mtext>hom</mtext><mo>(</mo><msub><mrow><mi>F</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><mi>G</mi><mo>)</mo><mo>,</mo><mo>…</mo><mo>,</mo><mtext>hom</mtext><mo>(</mo><msub><mrow><mi>F</mi></mrow><mrow><mi>k</mi></mrow></msub><mo>,</mo><mi>G</mi><mo>)</mo><mo>)</mo><mo>,</mo></math></span></span></span> where the graphs <span><math><msub><mrow><mi>F</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><mo>…</mo><mo>,</mo><msub><mrow><mi>F</mi></mrow><mrow><mi>k</mi></mrow></msub></math></span> only depend on <em>φ</em>.</div><div>We observe that planarity of graphs and 3-colorability of graphs, properties expressible in monadic second-order logic, have no hom algorithm. We 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.</div><div>For <em>adaptive</em> query algorithms, i.e., algorithms that again access <span><math><msub><mrow><mover><mrow><mtext>hom</mtext></mrow><mrow><mo>→</mo></mrow></mover></mrow><mrow><msub><mrow><mi>F</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><mo>…</mo><mo>,</mo><msub><mrow><mi>F</mi></mrow><mrow><mi>k</mi></mrow></msub></mrow></msub><mo>(</mo><mi>G</mi><mo>)</mo></math></span> but here <span><math><msub><mrow><mi>F</mi></mrow><mrow><mi>i</mi><mo>+</mo><mn>1</mn></mrow></msub></math></span> might depend on <span><math><mtext>hom</mtext><mo>(</mo><msub><mrow><mi>F</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><mi>G</mi><mo>)</mo><mo>,</mo><mo>…</mo><mo>,</mo><mtext>hom</mtext><mo>(</mo><msub><mrow><mi>F</mi></mrow><mrow><mi>i</mi></mrow></msub><mo>,</mo><mi>G</mi><mo>)</mo></math></span>, we show that <em>three</em> homomorphism counts <span><math><mtext>hom</mtext><mo>(</mo><mo>⋅</mo><mo>,</mo><mi>G</mi><mo>)</mo></math></span> are both sufficient and in general necessary to determine the isomorphism type of <em>G</em>.</div></div>","PeriodicalId":54985,"journal":{"name":"Information and Computation","volume":"306 ","pages":"Article 105326"},"PeriodicalIF":1.0000,"publicationDate":"2025-06-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information and Computation","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0890540125000628","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
It is a well-known result of Lovász that up to isomorphism a graph G is determined by the homomorphism counts , 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 '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 such that for any graph G whether it is a Yes-instance of the query is already determined by the vector where the graphs only depend on φ.
We observe that planarity of graphs and 3-colorability of graphs, properties expressible in monadic second-order logic, have no hom algorithm. We 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 but here might depend on , we show that three homomorphism counts are both sufficient and in general necessary to determine the isomorphism type of G.
期刊介绍:
Information and Computation welcomes original papers in all areas of theoretical computer science and computational applications of information theory. Survey articles of exceptional quality will also be considered. Particularly welcome are papers contributing new results in active theoretical areas such as
-Biological computation and computational biology-
Computational complexity-
Computer theorem-proving-
Concurrency and distributed process theory-
Cryptographic theory-
Data base theory-
Decision problems in logic-
Design and analysis of algorithms-
Discrete optimization and mathematical programming-
Inductive inference and learning theory-
Logic & constraint programming-
Program verification & model checking-
Probabilistic & Quantum computation-
Semantics of programming languages-
Symbolic computation, lambda calculus, and rewriting systems-
Types and typechecking