Near-Linear Time Homomorphism Counting in Bounded Degeneracy Graphs: The Barrier of Long Induced Cycles

Counting homomorphisms of a constant sized pattern graph $H$ in an input graph $G$ is a fundamental computational problem. There is a rich history of studying the complexity of this problem, under various constraints on the input $G$ and the pattern $H$. Given the significance of this problem and the large sizes of modern inputs, we investigate when near-linear time algorithms are possible. We focus on the case when the input graph has bounded degeneracy, a commonly studied and practically relevant class for homomorphism counting. It is known from previous work that for certain classes of $H$, $H$-homomorphisms can be counted exactly in near-linear time in bounded degeneracy graphs. Can we precisely characterize the patterns $H$ for which near-linear time algorithms are possible? We completely resolve this problem, discovering a clean dichotomy using fine-grained complexity. Let $m$ denote the number of edges in $G$. We prove the following: if the largest induced cycle in $H$ has length at most $5$, then there is an $O(m\log m)$ algorithm for counting $H$-homomorphisms in bounded degeneracy graphs. If the largest induced cycle in $H$ has length at least $6$, then (assuming standard fine-grained complexity conjectures) there is a constant $\gamma > 0$, such that there is no $o(m^{1+\gamma})$ time algorithm for counting $H$-homomorphisms.

[1]  Christos Faloutsos,et al.  Patterns and anomalies in k-cores of real-world graphs with applications , 2018, Knowledge and Information Systems.

[2]  Jaroslav Nesetril,et al.  On the complexity of H-coloring , 1990, J. Comb. Theory, Ser. B.

[3]  Leland L. Beck,et al.  Smallest-last ordering and clustering and graph coloring algorithms , 1983, JACM.

[4]  Paul D. Seymour,et al.  Graph minors. III. Planar tree-width , 1984, J. Comb. Theory B.

[5]  Suman Kalyan Bera,et al.  Counting Subgraphs in Degenerate Graphs , 2020, Electron. Colloquium Comput. Complex..

[6]  Dana Ron,et al.  Approximately Counting Triangles in Sublinear Time , 2015, 2015 IEEE 56th Annual Symposium on Foundations of Computer Science.

[7]  Ulrik Brandes,et al.  Efficient orbit-aware triad and quad census in directed and undirected graphs , 2017, Appl. Netw. Sci..

[8]  Martin E. Dyer,et al.  The complexity of counting graph homomorphisms , 2000, Random Struct. Algorithms.

[9]  Martin Grohe The complexity of homomorphism and constraint satisfaction problems seen from the other side , 2007, JACM.

[10]  Sofya Vorotnikova,et al.  Better Algorithms for Counting Triangles in Data Streams , 2016, PODS.

[11]  Amit Chakrabarti,et al.  Graph Coloring via Degeneracy in Streaming and Other Space-Conscious Models , 2019, ICALP.

[12]  Jörg Flum,et al.  The Parameterized Complexity of Counting Problems , 2004, SIAM J. Comput..

[13]  Ali Pinar,et al.  A space efficient streaming algorithm for triangle counting using the birthday paradox , 2012, KDD.

[14]  Maria J. Serna,et al.  Counting H-Colorings of Partial k-Trees , 2001, COCOON.

[15]  Paul D. Seymour,et al.  Graph minors. I. Excluding a forest , 1983, J. Comb. Theory, Ser. B.

[16]  Ziv Bar-Yossef,et al.  Reductions in streaming algorithms, with an application to counting triangles in graphs , 2002, SODA '02.

[17]  Umberto Bertelè,et al.  On Non-serial Dynamic Programming , 1973, J. Comb. Theory, Ser. A.

[18]  David Eppstein,et al.  Arboricity and Bipartite Subgraph Listing Algorithms , 1994, Inf. Process. Lett..

[19]  Ryan A. Rossi,et al.  Efficient Graphlet Counting for Large Networks , 2015, 2015 IEEE International Conference on Data Mining.

[20]  Amir Abboud,et al.  Popular Conjectures Imply Strong Lower Bounds for Dynamic Problems , 2014, 2014 IEEE 55th Annual Symposium on Foundations of Computer Science.

[21]  Seshadhri Comandur,et al.  Linear Time Subgraph Counting, Graph Degeneracy, and the Chasm at Size Six , 2019, ITCS.

[22]  L. Lovász Operations with structures , 1967 .

[23]  Amit Chakrabarti,et al.  Towards Tighter Space Bounds for Counting Triangles and Other Substructures in Graph Streams , 2017, STACS.

[24]  Peter Jonsson,et al.  The complexity of counting homomorphisms seen from the other side , 2004, Theor. Comput. Sci..

[25]  Ali Pinar,et al.  ESCAPE: Efficiently Counting All 5-Vertex Subgraphs , 2016, WWW.

[26]  Jens Gustedt,et al.  Bounded Arboricity to Determine the Local Structure of Sparse Graphs , 2006, WG.

[27]  Marco Bressan,et al.  Faster Subgraph Counting in Sparse Graphs , 2018, IPEC.

[28]  Paul D. Seymour,et al.  Graph Minors. II. Algorithmic Aspects of Tree-Width , 1986, J. Algorithms.

[29]  M. Bálek,et al.  Large Networks and Graph Limits , 2022 .

[30]  Sepehr Assadi,et al.  A Simple Sublinear-Time Algorithm for Counting Arbitrary Subgraphs via Edge Sampling , 2018, ITCS.

[31]  R. Halin S-functions for graphs , 1976 .

[32]  Jonathan Cohen,et al.  Graph Twiddling in a MapReduce World , 2009, Computing in Science & Engineering.

[33]  Thomas Sauerwald,et al.  Counting Arbitrary Subgraphs in Data Streams , 2012, ICALP.

[34]  Dana Ron,et al.  On approximating the number of k-cliques in sublinear time , 2017, STOC.

[35]  Marc Roth,et al.  Counting and Finding Homomorphisms is Universal for Parameterized Complexity Theory , 2019, SODA.

[36]  V. Sós,et al.  Counting Graph Homomorphisms , 2006 .

[37]  Seshadhri Comandur,et al.  Efficiently Counting Vertex Orbits of All 5-vertex Subgraphs, by EVOKE , 2019, WSDM.

[38]  Noga Alon,et al.  Finding and counting given length cycles , 1997, Algorithmica.

[39]  Ali Pinar,et al.  Path Sampling: A Fast and Provable Method for Estimating 4-Vertex Subgraph Counts , 2014, WWW.

[40]  Dániel Marx,et al.  Homomorphisms are a good basis for counting small subgraphs , 2017, STOC.

[41]  Sudipto Guha,et al.  Graph sketches: sparsification, spanners, and subgraphs , 2012, PODS.

[42]  Sergei Vassilvitskii,et al.  Counting triangles and the curse of the last reducer , 2011, WWW.

[43]  G. Szekeres,et al.  An inequality for the chromatic number of a graph , 1968 .

[44]  Tamara G. Kolda,et al.  Counting Triangles in Massive Graphs with MapReduce , 2013, SIAM J. Sci. Comput..

[45]  Seshadhri Comandur,et al.  A Fast and Provable Method for Estimating Clique Counts Using Turán's Theorem , 2016, WWW.

[46]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[47]  Marc Roth,et al.  Counting Answers to Existential Questions , 2019, ICALP.

[48]  Alon Itai,et al.  Finding a minimum circuit in a graph , 1977, STOC '77.

[49]  Russell Impagliazzo,et al.  Which problems have strongly exponential complexity? , 1998, Proceedings 39th Annual Symposium on Foundations of Computer Science (Cat. No.98CB36280).

[50]  Graham R. Brightwell,et al.  Graph Homomorphisms and Phase Transitions , 1999, J. Comb. Theory, Ser. B.

[51]  Norishige Chiba,et al.  Arboricity and Subgraph Listing Algorithms , 1985, SIAM J. Comput..

[52]  Kurt Mehlhorn,et al.  Approximate Counting of Cycles in Streams , 2011, ESA.

[53]  Seshadhri Comandur,et al.  How the Degeneracy Helps for Triangle Counting in Graph Streams , 2020, PODS.

[54]  Kun-Lung Wu,et al.  Counting and Sampling Triangles from a Graph Stream , 2013, Proc. VLDB Endow..

[55]  Dana Ron,et al.  Faster sublinear approximations of k-cliques for low arboricity graphs , 2018, SODA 2020.