This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\hideLIPIcs

University of California, Santa Cruz, United States [email protected]://orcid.org/0009-0008-1073-6173University of California, Santa Cruz, United [email protected]://orcid.org/0000-0003-2163-3555 \CopyrightDaniel Paul-Pena and C. Seshadhri \ccsdesc[500]Mathematics of computing Graph algorithms \ccsdesc[500]Theory of computation Graph algorithms analysis \fundingBoth authors are supported by NSF CCF-1740850, CCF-1839317, CCF-2402572, and DMS-2023495

A Dichotomy Theorem for Linear Time Homomorphism Orbit Counting in Bounded Degeneracy Graphs

Daniel Paul-Pena    C. Seshadhri
Abstract

Counting the number of homomorphisms of a pattern graph HH in a large input graph GG is a fundamental problem in computer science. In many applications in databases, bioinformatics, and network science, we need more than just the total count. We wish to compute, for each vertex vv of GG, the number of HH-homomorphisms that vv participates in. This problem is referred to as homomorphism orbit counting, as it relates to the orbits of vertices of HH under its automorphisms.

Given the need for fast algorithms for this problem, we study when near-linear time algorithms are possible. A natural restriction is to assume that the input graph GG has bounded degeneracy, a commonly observed property in modern massive networks. Can we characterize the patterns HH for which homomorphism orbit counting can be done in near-linear time?

We discover a dichotomy theorem that resolves this problem. For pattern HH, let \ell be the length of the longest induced path between any two vertices of the same orbit (under the automorphisms of HH). If 5\ell\leq 5, then HH-homomorphism orbit counting can be done in near-linear time for bounded degeneracy graphs. If >5\ell>5, then (assuming fine-grained complexity conjectures) there is no near-linear time algorithm for this problem. We build on existing work on dichotomy theorems for counting the total HH-homomorphism count. Surprisingly, there exist (and we characterize) patterns HH for which the total homomorphism count can be computed in near-linear time, but the corresponding orbit counting problem cannot be done in near-linear time.

keywords:
Homomorphism counting, Bounded degeneracy graphs, Fine-grained complexity, Orbit counting, Subgraph counting
category:
\relatedversion

1 Introduction

Analyzing the occurrences of a small pattern graph HH in a large input graph GG is a central problem in computer science. The theoretical study has led to a rich and immensely deep theory [39, 20, 30, 24, 40, 2, 23, 45, 51, 17, 16]. The applications of graph pattern counts occur across numerous scientific areas, including logic, biology, statistical physics, database theory, social sciences, machine learning, and network science [34, 19, 22, 18, 27, 13, 29, 42, 59, 45, 25, 44]. (Refer to the tutorial [53] for more details on applications.)

A common formalism used for graph pattern counting is homomorphism counting. The pattern graph is denoted H=(V(H),E(H))H=(V(H),E(H)) and is assumed to have constant size. The input graph is denoted G=(V(G),E(G))G=(V(G),E(G)). Both graphs are simple and do not contain self-loops. An HH-homomorphism is a map f:V(H)V(G)f:V(H)\to V(G) that preserves edges. Formally, (u,v)E(H)\forall(u,v)\in E(H), (f(u),f(v))E(G)(f(u),f(v))\in E(G). Let HomH(G)\mathrm{Hom}_{H}(G) denote the number of distinct HH-homomorphisms in GG.

Given the importance of graph homomorphism counts, the study of efficient algorithms for this problem is a subfield in itself [35, 3, 18, 27, 26, 24, 13, 23, 14, 51]. The simplest version of this problem is when HH is a triangle, itself a problem that attracts much attention. Let n=|V(G)|n=|V(G)| and k=|V(H)|k=|V(H)|. Computing HomH(G)\mathrm{Hom}_{H}(G) is #W[1]\#W[1]-hard when parameterized by kk (even when HH is a kk-clique), so we do not expect no(k)n^{o(k)} algorithms for general HH [24]. Much of the algorithmic study of homomorphism counting is in understanding conditions on HH and GG when the trivial nkn^{k} running time bound can be beaten.

Our work is inspired by the challenges of modern applications of homomorphism counting, especially in network science. Typically, nn is extremely large, and only near-linear time (npoly(logn)n\cdot\mathrm{poly}(\log{n})) algorithms are feasible. Inspired by a long history and recent theory on this topic, we focus on bounded degeneracy input graphs (we say bounded degeneracy graphs to refer to graphs belonging to classes of graphs with bounded degeneracy). This includes all non-trivial minor-closed graph families, such as planar graphs, bounded genus graphs, and bounded tree-width graphs. Many practical algorithms for large-scale graph pattern counting use algorithms for bounded degeneracy graphs [2, 38, 45, 43, 37, 44]. Real-world graphs typically have a small degeneracy, comparable to their average degree ([32, 37, 55, 5, 9], also Table 2 in [5]).

Secondly, many modern applications for homomorphism counting require more fine-grained statistics than just the global count HomH(G)\mathrm{Hom}_{H}(G). The aim is to find, for every vertex vv of GG, the number of homomorphisms that vv participates in. Seminal work in network analysis for bioinformatics plots the distributions of these per-vertex counts to compare graphs [36, 46]. Orbit counts can be used to generate features for vertices, sometimes called the graphlet kernel [54]. In the past few years, there have been many applications of these per-vertex counts [10, 59, 52, 57, 4, 58, 50, 60, 61].

Algorithms for this problem require considering the “roles” that vv could play in a homomorphism. For example, in a 77-path (a path of length 66) there are 44 different roles: a vertex vv could be in the middle, could be at the end, or at two other positions. These roles are colored in Fig. 1. The roles are called orbits (defined in the Section 3), and the problem of HH-homomorphism orbit counting is as follows: for every orbit ψ\psi in HH and every vertex vv in GG, output the number of homomorphisms of HH where vv participates in the orbit ψ\psi. This is the main question addressed by our work:

What are the pattern graphs HH for which the HH-homomorphism orbit counting problem is computable in near-linear time (when GG has bounded degeneracy)?

Recent work of Bressan followed by Bera-Pashanasangi-Seshadhri introduced the question of homomorphism counting for bounded degeneracy graphs, from a fine-grained complexity perspective [14, 8]. A dichotomy theorem for near-linear time counting of HomH(G)\mathrm{Hom}_{H}(G) was provided in subsequent work [6]. Assuming fine-grained complexity conjectures, HomH(G)\mathrm{Hom}_{H}(G) can be computed in near-linear time iff the longest induced cycle of HH has length at most 55. It is natural to ask whether these results extend to orbit counting.

Refer to caption
Figure 1: Examples of orbits and LIPCO values. Vertices in the same orbit have the same color. The top graph is the 7-path (a path of length 6). There is an induced path of length 6 between the red vertices, hence the LIPCO of this graph is 6. Theorem 1.5 implies that we can not compute OrbitHom\mathrm{OrbitHom} in near-linear time.
The bottom graph adds a triangle at the end, breaking the symmetry, and the only vertices in the same orbit in that graph are the red ones. The LIPCO in this graph is now less than 6 so we can compute OrbitHom\mathrm{OrbitHom} in near-linear time.

1.1 Main Result

We begin with some preliminaries. The input graph G=(V(G),E(G))G=(V(G),E(G)) has nn vertices and mm edges. A central notion in our work is that of graph degeneracy, also called the coloring number.

Definition 1.1.

A graph GG is κ\kappa-degenerate if the minimum degree in every subgraph of GG is at most κ\kappa.

The degeneracy of GG is the minimum value of κ\kappa such that GG is κ\kappa-degenerate.

A family of graphs has bounded degeneracy if the degeneracy is constant with respect to the graph size. Bounded degeneracy graph classes are extremely rich. For example, all non-trivial minor-closed families have bounded degeneracy. This includes bounded treewidth graphs. Preferential attachment graphs also have bounded degeneracy; real-world graphs have a small value of degeneracy (often in the 10s) with respect to their size (often in the hundreds of millions) [5].

We assume the pattern graph H=(V(H),E(H))H=(V(H),E(H)) to have a constant number of vertices. (So we suppress any dependencies on purely the size of HH.) Consider the group of automorphisms of HH. The vertices of HH can be partitioned into orbits, which consist of vertices that can be mapped to each other by some automorphism (defined formally in Definition 3.1). For example, in Fig. 1, the 77-path has four different orbits, where each orbit has the same color. The 77-path with a hanging triangle (in Fig. 1) has more orbits, since the pattern is no longer symmetric with respect to the “center” of the 77-path and hence the opposite “ends” of the 77-path cannot be mapped by a non-trivial automorphism.

The set of orbits of the pattern HH is denoted Ψ(H)\Psi(H). Let Φ(H,G)\Phi(H,G) be the set of homomorphisms from HH to GG (HomH(G)=|Φ(H,G)|\mathrm{Hom}_{H}(G)=|\Phi(H,G)|). We now define our main problem.

Definition 1.2.

Homomorphism Orbit Counts: For each orbit ψΨ(H)\psi\in\Psi(H) and vertex vV(G)v\in V(G), define OrbitHomH,ψ(v)\mathrm{OrbitHom}_{H,\psi}(v) to be the number of HH-homomorphisms mapping a vertex of ψ\psi to vv. Formally, OrbitHomH,ψ(v)=|{ϕΦ(H,G):hψ,ϕ(h)=v}|\mathrm{OrbitHom}_{H,\psi}(v)=|\{\phi\in\Phi(H,G)\colon\exists h\in\psi,\,\phi(h)=v\}|.

The problem of HH-homomorphism orbit counting is to output the values OrbitHomH,ψ(v)\mathrm{OrbitHom}_{H,\psi}(v) for all vV(G),ψΨ(H)v\in V(G),\psi\in\Psi(H). (Abusing notation, OrbitHomH(G){\mathrm{OrbitHom}}_{{H}}({G}) refers to the list/vector of all of these values.)

Note that for a given HH, the size of the output is n|Ψ(H)|n|\Psi(H)| (recall n=|V(G)|n=|V(G)|). For example, when HH is the 77-path, we will get 4n4n counts, for each vertex and each of the four orbits.

Our main result is a dichotomy theorem that precisely characterizes patterns HH for which OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) can be computed in near-linear time. We introduce a key definition.

Definition 1.3.

For a pattern HH, the Longest Induced Path Connecting Orbits of HH, denoted LIPCO(H)LIPCO(H) is defined as follows. It is the length of the longest induced simple path, measured in edges, between any two vertices h,hh,h^{\prime} in HH (where hh may be equal to hh^{\prime}, forming a cycle) in the same orbit.

Again refer to Fig. 1. The 77-path has a LIPCO of six, since the ends are in the same orbit. On the other hand, the second pattern (77-path with a triangle) has a LIPCO of 33 due to the triangle.

The Triangle Detection Conjecture was introduced by Abboud and Williams on the complexity of determining whether a graph has a triangle [1]. It is believed that this problem cannot be solved in near-linear time, and indeed, may even require Ω(m4/3)\Omega(m^{4/3}) time. We use this conjecture for the lower bound of our main theorem.

Conjecture 1.4 (Triangle Detection Conjecture [1]).

There exists a constant γ>0\gamma>0 such that in the word RAM model of O(logn)O(\log n) bits, any algorithm to detect whether an input graph on mm edges has a triangle requires Ω(m1+γ)\Omega(m^{1+\gamma}) time in expectation.

Our main theorem proves that the LIPCO determines the dichotomy. Note that because GG is a bounded degeneracy graph we have m=O(n)m=O(n), we will be expressing the bounds in terms of mm.

Theorem 1.5.

(Main Theorem) Let GG be a graph with nn vertices, mm edges, and bounded degeneracy. Let γ>0\gamma>0 denote the constant from the Triangle Detection Conjecture (Conjecture 1.4).

  • If LIPCO(H)5LIPCO(H)\leq 5: there exists a deterministic algorithm that computes OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) in time O(mlogn)O(m\log n).111The exact dependency on the degeneracy κ\kappa of the input graph GG is O(κ|H|1)O\left(\kappa^{|H|-1}\right).

  • If LIPCO(H)>5LIPCO(H)>5: assume the Triangle Detection Conjecture. There is no algorithm with (expected) running time O(m1+γ)O(m^{1+\gamma}) that computes OrbitHomH(G)\mathrm{OrbitHom}_{H}(G).

Orbit Counting vs Total Homomorphism Counting

In the following discussion, we use “linear” to actually mean near-linear, we assume that the Triangle Detection Conjecture is true, and we assume that GG has bounded degeneracy.

One of the most intriguing aspects of the dichotomy of Theorem 1.5 is that it differs from the condition for getting the total homomorphism count. As mentioned earlier, the inspiration for Theorem 1.5 is the analogous result for determining HomH(G)\mathrm{Hom}_{H}(G). There is a near-linear time algorithm iff the length of the longest induced cycle (LICL) of HH is at most five. Since the definition of LIPCO considers induced cycles (induced path between a vertex to itself), if LIPCO(H)5LIPCO(H)\leq 5, then LICL(H)5LICL(H)\leq 5. This implies, not surprisingly, that the total homomorphism counting problem is easier than the orbit counting problem.

But there exist patterns HH for which the orbit counting problem is provably harder than total homomorphism counting, a simple example is the 77-path (path with 77 vertices). There is a simple linear time dynamic program for counting the homomorphism of paths. But the endpoints are in same orbit, so the LIPCO is six, and Theorem 1.5 proves the non-existence of linear time algorithms for orbit counting. On the other hand, the LIPCO of the 66-path is five, so orbit counting can be done in linear time.

Consider the pattern at the bottom of Fig. 1. The LICL is three, so the total homomorphism count can be determined in linear time. Because the ends of the underlying 77-path lie in different orbits, the LIPCO is also three (by the triangle). Theorem 1.5 provides a linear time algorithm for orbit counting.

1.2 Main Ideas

The starting point for homomorphism counting on bounded degeneracy graphs is the seminal work of Chiba-Nishizeki on using acyclic graph orientations [20]. It is known that, in linear time, the edges of a bounded degeneracy graph can be acyclically oriented while keeping the outdegree bounded [41]. For clique counting, we can now use a brute force algorithm in all out neighborhoods, and get a linear time algorithm. Over the past decade, various researchers observed that this technique can generalize to certain other pattern graphs [21, 45, 43, 44]. Given a pattern HH, one can add the homomorphism counts of all acyclic orientations of HH for an acyclic orientation of GG. In certain circumstances, each acyclic orientation can be efficiently counted by a carefully tailored dynamic program that breaks the oriented HH into subgraphs spanned by rooted, directed trees.

Bressan gave a unified treatment of this approach through the notion of DAG-tree decompositions. [14] These decompositions give a systematic way of breaking up an oriented pattern into smaller pieces, such that homomorphism counts can be computed by a dynamic program. Bera et al. showed that if the LICL of HH is at most 55, then the DAG-treewidth of HH is at most one [8, 6]. This immediately implies Bressan’s algorithm runs in linear time.

Our result on orbit counting digs deeper into the mechanics of Bressan’s algorithm. To run in linear time, Bressan’s algorithm requires “compressed” data structures that store information about homomorphism counts. For example, the DAG-tree decomposition based algorithm can count 44-cycles in linear time for bounded degeneracy graphs (this was known from Chiba-Nishizeki as well [20]). But there could exist quadratically many 44-cycles in such a graph. Consider two vertices connected by Θ(n)\Theta(n) disjoint paths of length 22; each pair of paths yields a distinct 44-cycle. Any linear time algorithm for 44-cycle counting has to carefully index directed paths and combine these counts, without actually touching every 44-cycle.

By carefully looking at Bressan’s algorithm, we discover that “local” per-vertex information about HH-homomorphisms can be computed. Using the DAG-tree decomposition, one can combine these counts into a quantity that looks like orbit counts. Unfortunately, we cannot get exact orbit counts, but rather a weighted sum of homomorphisms.

To extract exact orbit counts, we dig deeper into the relationship between orbit counts and per-vertex homomorphism counts. This requires looking into the behavior of independent sets in the orbits of HH. We then design an inclusion-exclusion formula that “inverts” the per-vertex homomorpishm counts into orbit counts. The formula requires orbit counts for other patterns HH^{\prime} that are constructed by merging independent sets in the same orbit of HH.

Based on previous results, we can prove that if the LICL of all these HH^{\prime} patterns is at most 55, then OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) can be computed in (near)linear time. This LICL condition over all HH^{\prime} is equivalent to the LIPCO of HH being at most 55. Achieving the upper bound of Theorem 1.5.

The above seemingly ad hoc algorithm optimally characterizes when orbit counting is linear time computable. To prove the matching lower bound, we use tools from the breakthrough work of Curticapean-Dell-Marx [23]. They prove that the complexity of counting linear combinations of homomorphism counts is determined by the hardest individual count (up to polynomial factors). Gishboliner-Levanzov-Shapira give a version of this tool for proving linear time hardness [31]. Consider a pattern HH with LIPCO at least six. We can construct a pattern HH^{\prime} with LICL at least six by merging vertices of an orbit in HH. We use the tools above to construct a constant number of linear sized graphs G1,G2,,GkG_{1},G_{2},\ldots,G_{k} such that a linear combination of HH-orbit counts on these graphs yields the total HH^{\prime}-homomorphism count on GG. The latter problem is hard by existing bounds, and hence the hardness bounds translate to HH-orbit homomorphism counting.

2 Related Work

Homomorphism and subgraph counting on graphs is an immense topic with an extensive literature in theory and practice. For a detailed discussion of practical applications, we refer the reader to a tutorial [53].

Homomorphism counting is intimately connected with the treewidth of the pattern HH. The notion of tree decomposition and treewidth were introduced in a seminal work by Robertson and Seymour [47, 48, 49]; although it has been discovered before under different names [11, 33]. A classic result of Dalmau and Jonsson [24] proved that HomH(G)\mathrm{Hom}_{H}(G) is polynomial time solvable if and only if HH has bounded treewidth, otherwise it is #W[1]\#W[1]-complete. Díaz et al [26] gave an algorithm for homomorphism counting with runtime O(2knt(H)+1)O(2^{k}n^{t(H)+1}) where t(H)t(H) is the treewidth of the pattern graph HH and kk the number of vertices of HH.

To improve on these bounds, recent work has focused on restrictions on the input GG [51]. A natural restriction is bounded degeneracy, which is a nuanced measure of sparsity introduced by early work of Szekeres-Wilf [56]. Many algorithmic results exploit low degeneracy for faster subgraph counting problems [20, 28, 2, 38, 45, 43, 37, 44].

Pioneering work of Bressan introduced the concept of DAG-treewidth for faster algorithms for homomorphism counting in bounded degeneracy graphs [14]. Bressan gave an algorithm for counting HomH(G)\mathrm{Hom}_{H}(G) running in time essentially mτ(H)m^{\tau(H)}, where τ\tau denotes the DAG-treewidth. The result also proves that (assuming ETH) there is no algorithm running in time mo(τ(H)/logτ(H))m^{o(\tau(H)/\log\tau(H))}.

Bera-Pashanasangi-Seshadhri build on Bressan’s methods to discover a dichotomy theorem for linear time homomorphism counting in bounded degeneracy graphs [7, 8]. Gishboliner, Levanzov, and Shapira independently proved the same characterization using slightly different methods [31, 6].

We give a short discussion of the Triangle Detection Conjecture. Itai and Rodeh [35] gave the first non-trivial algorithm for the triangle detection and finding problem with O(m3/2)O(m^{3/2}) runtime. The current best known algorithm runs in time O(min{nω,m2ω/(ω+1)})O(\min\{n^{\omega},m^{{2\omega}/{(\omega+1)}}\}) [3], where ω\omega is the matrix multiplication exponent. Even for ω=2\omega=2, the bound is m4/3m^{4/3} and widely believed to be a lower bound. Many classic graph problems have fine-grained complexity hardness based on Triangle Detection Conjecture [1].

Homomorphism or subgraph orbit counts have found significant use in network analysis and machine learning. Przulj introduced the use of graphlet (or orbit count) degree distributions in bioinformatics [46]. The graphlet kernel of Shervashidze-Vishwanathan-Petri-Mehlhorn-Borgwardt uses vertex orbits counts to get embeddings of vertices in a network [54]. Four vertex subgraph and large cycle and clique orbit counts have been used for discovering special kinds of vertices and edges [59, 50, 60, 61]. Orbits counts have been used to design faster algorithms for finding dense subgraphs in practice [10, 52, 57, 4, 58].

3 Preliminaries

We use GG to denote the input graph and HH to denote the pattern graph, both G=(V(G),E(G))G=(V(G),E(G)) and H=(V(H),E(H))H=(V(H),E(H)) are simple, undirected and connected graphs. We denote |V(G)||V(G)| and |E(G)||E(G)| by nn and mm respectively and |V(H)||V(H)| by kk.

A pattern graph HH is divided into orbits, we use the definition from Bondy and Murty (Chapter 11, Section 22 [12]):

Definition 3.1.

Fix a graph H=(V(H),E(H))H=(V(H),E(H)). An automorphism is a bijection σ:V(H)V(H)\sigma:V(H)\to V(H) such that (u,v)E(H)(u,v)\in E(H) iff (σ(u),σ(v))E(H)(\sigma(u),\sigma(v))\in E(H). The group of automorphisms of HH is denoted Aut(H)\mathrm{Aut}(H).

Define an equivalence relation on V(H)V(H) as follows. We say that uv(u,vV(H))u\sim v\ (u,v\in V(H)) iff there exists an automorphism that maps uu to vv. The equivalence classes of the relation are called orbits.

We refer to the set of orbits in HH as Ψ(H)\Psi(H) and to individual orbits in Ψ(H)\Psi(H) as ψ\psi. Note that every vertex hV(H)h\in V(H) belongs to exactly one orbit. We can represent an orbit by a canonical (say lexicographically least) vertex in the orbit. Somewhat abusing notation, we can think of the set of orbits as a subset of vertices of HH, where each vertex plays a “distinct role” in HH. Fig. 1 has examples of different graphs with their separate orbits.

We now define homomorphisms.

Definition 3.2.

An HH-homomorphism from HH to GG is a mapping ϕ:V(H)V(G)\phi:V(H)\to V(G) such that for all (u,v)E(H)(u,v)\in E(H), (ϕ(u),ϕ(v))E(G)(\phi(u),\phi(v))\in E(G). We refer to the set of homomorphisms from HH to GG as Φ(H,G)\Phi(H,G).

We now define a series of counts.

  • HomH(G)\mathrm{Hom}_{H}(G): This is the count of HH-homomorphisms in GG. So HomH(G)=|Φ(H,G)|\mathrm{Hom}_{H}(G)=|\Phi(H,G)|.

  • OrbitHomH,ψ(v)\mathrm{OrbitHom}_{H,\psi}(v): For a vertex vV(G)v\in V(G), OrbitHomH,ψ(v)\mathrm{OrbitHom}_{H,\psi}(v) is the number of HH-homomorphisms that map any vertex in the orbit ψ\psi to vv. Formally, OrbitHomH,ψ(v)=|{ϕΦ(H,G):uψ,ϕ(u)=v}|\mathrm{OrbitHom}_{H,\psi}(v)=|\{\phi\in\Phi(H,G)\colon\exists u\in\psi,\,\phi(u)=v\}|.

  • OrbitHomH,ψ(G),OrbitHomH(G)\mathrm{OrbitHom}_{H,\psi}(G),\mathrm{OrbitHom}_{H}(G): We use OrbitHomH,ψ(G)\mathrm{OrbitHom}_{H,\psi}(G) to denote the list/vector of counts {OrbitHomH,ψ(v)}\{\mathrm{OrbitHom}_{H,\psi}(v)\} over all vV(G)v\in V(G). Similarly, OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) denotes the sequence of lists of counts OrbitHomH,ψ(G)\mathrm{OrbitHom}_{H,\psi}(G) over all orbits ψ\psi.

Our aim is to compute OrbitHomH(G)\mathrm{OrbitHom}_{H}(G), which are a set of homomorphism counts. We use existing algorithmic machinery to compute homomorphism counts per vertex of HH, so part of our analysis will consist of figuring out how to go between these counts. As we will see, this is where the LIPCO parameter makes an appearance.

Acyclic orientations

These are a key algorithmic tool in efficient algorithms for bounded degeneracy graphs. An acyclic orientation of an undirected graph GG is a digraph obtained by directing the edges of GG such that the digraph is a DAG. We will encapsulate the application of the degeneracy in the following lemma, which holds from a classic result of Matula and Beck [41].

Lemma 3.3.

Suppose GG has degeneracy κ\kappa. Then, in O(m+n)O(m+n) time, one can compute an acyclic orientation GG^{\to} of GG with the following property. The maximum outdegree of GG^{\to} is precisely κ\kappa. (GG^{\to} is also called a degeneracy orientation.)

The set of all acyclic orientations of HH is denoted Σ(H)\Sigma(H). Our algorithm will enumerate over all such orientations.

Note that all definitions of homomorphisms carry over to DAGs.

3.1 DAG-tree decompositions

A central part of our result is applying intermediate lemmas from an important algorithm of Bressan for homomorphism counting [14]. This subsection gives a technical overview of Bressan’s techique of DAG-tree decompositions and related lemmas. Our aim is to state the key lemmas from previous work that can be used as a blackbox.

The setting is as follows. We have an acyclic orientation GG^{\to} and a DAG pattern PP (think of PP as a member of Σ(H)\Sigma(H); PP is an acyclic orientation of HH). Bressan’s algorithm gives a dynamic programming approach to counting Φ(P,G)\Phi(P,G^{\to}).

We introduce some notation. We use the standard notion of reachability in digraphs: vertex vv is reachable from uu if there is a directed path from uu to vv.

  • SS: The set of sources in the DAG PP.

  • ReachP(s)Reach_{P}(s): For source sSs\in S, ReachP(s)Reach_{P}(s) is the set of vertices in PP reachable from ss.

  • ReachP(B)Reach_{P}(B): Let BSB\subseteq S. ReachP(B)=sBReachP(s)Reach_{P}(B)=\bigcup_{s\in B}Reach_{P}(s).

  • P[B]P[B]: This is the subgraph of PP induced by ReachP(B)Reach_{P}(B).

Definition 3.4.

(DAG-tree decomposition [14]). Let PP be a DAG with source vertices SS. A DAG-tree decomposition of P is a tree T=(,)T=(\mathcal{B},\mathcal{E}) with the following three properties:

  1. 1.

    Each node BB\in\mathcal{B} (referred to as a “bag” of sources) is a subset of the source vertices SS: BSB\subseteq S.

  2. 2.

    The union of the nodes in TT is the entire set SS: BB=S\bigcup_{B\in\mathcal{B}}B=S.

  3. 3.

    For all B,B1,B2B,B_{1},B_{2}\in\mathcal{B}, if BB lies on the unique path between the nodes B1B_{1} and B2B_{2} in TT, then Reach(B1)Reach(B2)Reach(B)Reach(B_{1})\cap Reach(B_{2})\subseteq Reach(B).

Definition 3.5.

Let PP be a DAG. For any DAG-tree decomposition TT to PP, the DAG-treewidth τ(T)\tau(T) is defined as maxB|B|\max_{B\in\mathcal{B}}|B|. The DAG-treewidth of PP, denoted τ(P)\tau(P), is the minimum value of τ(T)\tau(T) over all DAG-tree decompositions TT of PP.

Two important lemmas

We state two critical results from previous work. Both of these are highly non-trivial and technical to prove. We will use them in a black-box manner. The first lemma, by Bera-Pashanasangi-Seshadhri, connects the Largest Induced Cycle Length (LICL) to DAG-treewidth [8].

Lemma 3.6.

(Theorem 4.1 in [8]) For a simple graph HH: LICL(H)5LICL(H)\leq 5 iff PΣ(H),τ(P)=1\forall P\in\Sigma(H),\tau(P)=1.

The second lemma is an intermediate property of Bressan’s subgraph counting algorithm [15]. We begin by defining homomorphism extensions. Think of some directed pattern PP that we are trying to count. Fix a (rooted) DAG-tree decomposition TT. Let PP^{\prime} be a subgraph of PP, P′′P^{\prime\prime} be a subgraph of PP^{\prime}. A PP^{\prime}-homomorphism ϕ\phi^{\prime} extends a P′′P^{\prime\prime}-homomorphism ϕ′′\phi^{\prime\prime} if vV(P′′)\forall v\in V(P^{\prime\prime}), ϕ(v)=ϕ′′(v)\phi^{\prime}(v)=\phi^{\prime\prime}(v). Basically, ϕ\phi^{\prime} agrees with ϕ′′\phi^{\prime\prime} wherever the latter is defined.

  • ext(P,G;ϕ)\mathrm{ext}(P^{\prime},G;\phi): Let ϕ\phi be a homomorphism from a subgraph of PP^{\prime} to GG. Then ext(P,G;ϕ)\mathrm{ext}(P^{\prime},G;\phi) is the number of PP^{\prime}-homomorphisms extending ϕ\phi.

  • P[down(B)]P[\mathrm{down}(B)]: Let BB be a node in the DAG-tree decomposition TT of PP. The set down(B)\mathrm{down}(B) is the union of bags that are descendants of BB in TT. Furthermore P[down(B)]P[\mathrm{down}(B)] is the pattern induced by Reach(down(B))Reach(\mathrm{down}(B)).

A technical lemma in Bressan’s result shows that extension counts can be obtained efficiently. We will refer to the procedure in this lemma as “Bressan’s algorithm”.

Lemma 3.7.

(Lemma 5 in [15]): Let GG^{\to} be a digraph with outdegree at most dd and PP be a DAG with kk vertices. Let T=(,)T=(\mathcal{B},\mathcal{E}) be a DAG-tree decomposition for PP, and BB any element of \mathcal{B}. There is a procedure, that in time O(||poly(k)dkτ(T)nτ(T)logn)O(|\mathcal{B}|poly(k)d^{k-\tau(T)}n^{\tau(T)}\log n), returns a dictionary storing the following values: for every ϕ:P[B]G\phi:P[B]\to G^{\to}, it has ext(P[down(B)],G;ϕ)\mathrm{ext}(P[\mathrm{down}(B)],G;\phi).

Let us explain this lemma in words. For any bag BB, which is a set of sources in PP, consider P[B]P[B], which is the subgraph induced by ReachP(B)Reach_{P}(B). For every P[B]P[B]-homomorphism ϕ\phi, we wish to count the number of extensions to P[down(B)]P[\mathrm{down}(B)] (the subgraph induced by vertices of PP reachable by any source in any descendant bag of BB).

4 Obtaining Vertex-Centric Counts

We define vertex-centric homomorphism counts, which allows us to ignore orbits and symmetries in HH. Quite simply, for vertices hV(H)h\in V(H) and vV(G)v\in V(G), we count the number of homomorphisms from HH to GG that map hh to vv.

Definition 4.1.

Vertex-centric Counts: For each vertex hV(H)h\in V(H) and vertex vV(G)v\in V(G), let VertexHomH,h(v)\mathrm{VertexHom}_{H,h}(v) be the number of HH-homomorphisms that map hh to vv.

Let VertexHomH(G)\mathrm{VertexHom}_{H}(G) denote the list of VertexHomH,h(v)\mathrm{VertexHom}_{H,h}(v) over all hV(H)h\in V(H) and vV(G)v\in V(G).

We can show that the vertex-centric counts can be obtained in near-linear time when LICL(H)5LICL(H)\leq 5:

Theorem 4.2.

There is an algorithm that takes as input a bounded degeneracy graph GG and a pattern HH with LICL(H)5LICL(H)\leq 5, and has the following properties. It outputs VertexHomH(G)\mathrm{VertexHom}_{H}(G) and runs in O(nlogn)O(n\log{n}) time.

Before proving this theorem we need to introduce two more lemmas. First, we invoke the following lemma from [15]:

Lemma 4.3.

(Lemma 4 in [15]): Given any BSB\subseteq S, the set of homomorphisms Φ(P[b],G)\Phi(P[b],G^{\to}) has size O(dk|B|n|B|)O(d^{k-|B|}n^{|B|}) and can be enumerated in time O(k2dk|B|n|B|)O(k^{2}d^{k-|B|}n^{|B|}).

Second, we show how to use the output of Bressan’s algorithm to obtain the Vertex-centric counts:

Lemma 4.4.

Let PP be a directed pattern on kk vertices, T=(,)T=(\mathcal{B},\mathcal{E}) be a DAG-tree decomposition of PP with τ(P)=1\tau(P)=1 (All nodes/bags in TT are singletons), and GG^{\to} be a directed graph with nn vertices and max degree dd. Let bb be the root of TT and hh be any vertex in P[b]P[b]. We can compute VertexHomP,h(v)\mathrm{VertexHom}_{P,h}(v) in time O(poly(k)dk1nlogn)O(poly(k)d^{k-1}n\log{n}).

Proof 4.5.

The algorithm of Lemma 3.7 will return a data structure/dictionary that gives the following values. For each ϕ:P[b]G\phi:P[b]\to G^{\to}, it provides ext(P[down(b)],G;ϕ)\mathrm{ext}(P[\mathrm{down}(b)],G;\phi). Note that bb is the root of TT. By the properties of a DAG-tree decomposition, down(b)\mathrm{down}(b) contains all vertices of PP and P[down(b)]=PP[\mathrm{down}(b)]=P. Hence, the dictionary gives the values ext(P,G;ϕ)\mathrm{ext}(P,G^{\to};\phi), that is, the number of homomorphisms ϕ:PG\phi^{\prime}:P\to G^{\to} that extend ϕ\phi.

Let hh be a vertex in P[b]P[b]. We can partition the set of homomorphisms from P[b]P[b] to GG^{\to}, Φ(P[b],G)\Phi(P[b],G^{\to}), into sets Φb,h,v\Phi_{b,h,v} defined as follows. For each vV(G)v\in V(G),Φb,h,v:={ϕΦ(P[b],G):ϕ(h)=v}\Phi_{b,h,v}:=\{\phi\in\Phi(P[b],G^{\to}):\phi(h)=v\}.

By Lemma 4.3 we can list all the homomorphisms Φ(P[b],G)\Phi(P[b],G^{\to}) in O(k2dk1n)O(k^{2}d^{k-1}n) time, by the same lemma we know that Φ(P[b],G)\Phi(P[b],G^{\to}) will have size at most O(dk1n)O(d^{k-1}n), hence we can iterate over the list of homomorphisms and check the value of ϕ(h)\phi(h). We can then express VertexHomP(G)\mathrm{VertexHom}_{P}(G^{\to}) as follows:

VertexHomP,h(v)\displaystyle\mathrm{VertexHom}_{P,h}(v) =|{ϕΦ(P,G):ϕ(h)=v}|\displaystyle=|\{\phi^{\prime}\in\Phi(P,G^{\to}):\phi^{\prime}(h)=v\}|
=ϕΦ(P[b],G):ϕ(h)=vext(P,G;ϕ)\displaystyle=\sum_{\phi\in\Phi(P[b],G^{\to}):\phi(h)=v}ext(P,G^{\to};\phi)
=ϕΦb,h,v:ϕ(h)=vext(P,G;ϕ)\displaystyle=\sum_{\phi\in\Phi_{b,h,v}:\phi(h)=v}ext(P,G^{\to};\phi)

We can compute all of these values by enumerating all the elements in ϕΦb,h,v\phi\in\Phi_{b,h,v} (over all vv), and making a dictionary access to get ext(P,G;ϕ)ext(P,G^{\to};\phi). The total running time is O(k2dk1nlogn)O(k^{2}d^{k-1}n\log{n}), where logn\log{n} is extra overhead of accessing the dictionary.

By Lemma 3.7, the dictionary construction takes O(||poly(k)O(|\mathcal{B}|poly(k) dkτ(T)nτ(T)logn)d^{k-\tau(T)}n^{\tau(T)}\log n) time. Since τ(T)=1\tau(T)=1 and ||=O(k)|\mathcal{B}|=O(k), we can express the total complexity as O(poly(k)dk1nlogn)O(poly(k)d^{k-1}n\log{n}).

We can now complete the proof of Theorem 4.2:

Algorithm 1 Vertex-centric Counts:
ComputeVertexCounts(H,G)ComputeVertexCounts(H,G)
1:Initialize all VertexHomH,h(v)\mathrm{VertexHom}_{H,h}(v) counts to 0 (hV(H),vV(G)\forall h\in V(H),v\in V(G)).
2:Compute the degeneracy orientation GG^{\to} of GG.
3:for PΣ(H)P\in\Sigma(H) do
4:     Initialize all VertexHomP,h(v)\mathrm{VertexHom}_{P,h}(v) counts to 0.
5:     Compute width 11 DAG-tree decomposition T=(,)T=(\mathcal{B},\mathcal{E}).
6:     for bb\in\mathcal{B} do
7:         Root TT at bb.
8:         Use Lemma 3.7 to compute the dictionary.
9:         for hP[b]h\in P[b] do
10:              for vV(G)v\in V(G) do
11:                  if VertexHomP,h(v)\mathrm{VertexHom}_{P,h}(v) not updated then
12:                       for ϕΦb,h,v\phi\in\Phi_{b,h,v} do
13:                           Compute ext(P,G;ϕ)ext(P,G^{\to};\phi) (dict. lookup).
14:                           Add ext(P,G;ϕ)ext(P,G^{\to};\phi) to VertexHomP,h(v)\mathrm{VertexHom}_{P,h}(v).
15:                       end for
16:                       Mark VertexHomP,h(v)\mathrm{VertexHom}_{P,h}(v) as updated
17:                  end if
18:              end for
19:         end for
20:     end for
21:     For each hV(H)h\in V(H) and vV(G)v\in V(G), add VertexHomP,h(v)\mathrm{VertexHom}_{P,h}(v) to VertexHomH,h(v)\mathrm{VertexHom}_{H,h}(v).
22:end for
Proof 4.6 (Proof of Theorem 4.2).

The algorithm is explicitly described in Algorithm 1.

The first step of our algorithm is to construct the degeneracy orientation GG^{\to} of GG. By Lemma 3.3, it can be computed in O(m+n)O(m+n) time. Since GG has bounded degeneracy, GG^{\to} has bounded outdegree. When orienting GG as GG^{\to}, each homomorphism from HH to GG becomes a homomorphism of exactly one of the directed patterns PΣ(H)P\in\Sigma(H) to GG^{\to}. We can hence compute VertexHomH(G)\mathrm{VertexHom}_{H}(G) as the sum of VertexHomP(G)\mathrm{VertexHom}_{P}(G^{\to}) for every acyclic orientation of HH. This is given by the following equation:

VertexHomH(G)=PΣ(H)VertexHomP(G)\displaystyle\mathrm{VertexHom}_{H}(G)=\sum_{P\in\Sigma(H)}\mathrm{VertexHom}_{P}(G^{\to}) (1)

Because LICL(H)5LICL(H)\leq 5, Lemma 3.6 implies that for all PΣ(H)P\in\Sigma(H), τ(H)=1\tau(H)=1. There exists a DAG-tree decomposition T=(,)T=(\mathcal{B},\mathcal{E}) of PP with τ(T)=1\tau(T)=1. We use the output of Bressan’s algorithm to obtain the Vertex-centric counts.

The DAG-tree decomposition TT can be arbitrarily rooted at any node bb. Moreover, for each hV(P)h\in V(P), there must exist some source bb such that hP[b]h\in P[b] (meaning, hh is reachable from bb). So, by rooting TT at all possible nodes (singleton bags), we can ensure that hh is in P[b]P[b]. We can apply Lemma 4.4 to get all counts VertexHomP,h(v)\mathrm{VertexHom}_{P,h}(v).

We complete the proof by bounding the running time and asserting correctness.

From Lemma 3.3, we can compute GG^{\to} in O(m+n)O(m+n). Since GG has bounded degeneracy, m=O(n)m=O(n) and the outdegree dd is bounded. The number of acyclic orientations of HH, |Σ(H)||\Sigma(H)| is bounded by O(k!)O(k!). In each iteration, by Lemma 4.4, we will take O(poly(k)dk1nlogn)O(poly(k)d^{k-1}n\log{n}). For constant kk and constant dd, the running time is O(nlogn)O(n\log n).

Now we prove the correctness of the algorithm. Consider each PΣ(H)P\in\Sigma(H). Let T=(,)T=(\mathcal{B},\mathcal{E}) be the DAG-tree decomposition of PP. For each bb\in\mathcal{B}, we compute VertexHomP,h(G)\mathrm{VertexHom}_{P,h}(G^{\to}) for all the vertices in hP[b]h\in P[b]. By looping over each singleton bag bb, we update counts for all vertices in PP. Hence, we are computing VertexHomP(G)\mathrm{VertexHom}_{P}(G^{\to}). Finally, we sum over all PΣ(H)P\in\Sigma(H), which by Equation 1, gives us VertexHomH(G)\mathrm{VertexHom}_{H}(G).

5 From Vertex-Centric to Orbit Counts

We now show how to go from vertex-centric to orbit counts, using inclusion-exclusion. Much of our insights are given by the following definitions.

Definition 5.1.

𝒮(ψ)\mathcal{I}\mathcal{S}(\psi): Given a pattern graph HH, for every orbit ψΨ(H)\psi\in\Psi(H) we define 𝒮(ψ)\mathcal{I}\mathcal{S}(\psi) as the collection of all non empty subsets SψS\subseteq\psi, such that SS forms an independent set (i.e. there is no edge in E(H)E(H) connecting any two vertices in SS).

Formally, 𝒮(ψ)={Sψ,S:h,hS,(h,h)E(H)}\mathcal{I}\mathcal{S}(\psi)=\{S\subseteq\psi,S\neq\emptyset:\forall\ h,h^{\prime}\in S,(h,h^{\prime})\notin E(H)\}.

Definition 5.2.

HSH_{S}: For each set S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi) we define HSH_{S} as the graph resulting from merging all the vertices in SS into a single new vertex hSh_{S}, removing any duplicate edge.

We state two more tools in our analysis. The first lemma relates the counts obtained in the previous section (VertexHomHS(G)\mathrm{VertexHom}_{H_{S}}(G)) to the desired output (OrbitHomH(G)\mathrm{OrbitHom}_{H}(G)).

Lemma 5.3.

(Inclusion-exclusion formula:)

OrbitHomH,ψ(v)=S𝒮(ψ)(1)|S|+1VertexHomHS,hS(v)\mathrm{OrbitHom}_{H,\psi}(v)=\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}(-1)^{|S|+1}\mathrm{VertexHom}_{H_{S},h_{S}}(v)

In order to prove this lemma, we need to define the Signature of a homomorphisms. Let ϕ\phi be a homomorphism from HH to GG, we define Sig(ϕ,ψ,v)\text{Sig}(\phi,\psi,v) to be the subset of vertices from the orbit ψ\psi that are mapped to vv in ϕ\phi. Formally Sig(ϕ,ψ,h)={hψ:ϕ(h)=v}\text{Sig}(\phi,\psi,h)=\{h\in\psi:\phi(h)=v\}.

We prove a series of claims regarding the signature.

Claim 1.

The Signature of ϕ\phi from ψ\psi to vv, Sig(ϕ,ψ,v)\text{Sig}(\phi,\psi,v), must form an independent set of vertices in V(H)V(H), that is, there are no edges in E(H)E(H) connecting two vertices in Sig(ϕ,ψ,v)\text{Sig}(\phi,\psi,v).

Proof 5.4.

We prove by contradiction. Assume that S=Sig(ϕ,ψ,v)S=\text{Sig}(\phi,\psi,v) is not an Independent Set of vertices of V(H)V(H), that means that we have a pair of vertices h,hSh,h^{\prime}\in S such that there is an edge connecting them. But from the definition of signature we have that ϕ(h)=ϕ(h)=v\phi(h)=\phi(h^{\prime})=v, however this is not a valid homomorphism from HH to GG as it is not preserving the (h,h)(h,h^{\prime}) edge.

The next claim allows us to relate the Signature with the Homomorphism Orbit Counts.

Claim 2.
OrbitHomH,ψ(v)=S𝒮(ψ)|{ϕΦ(H,G):S=Sig(ϕ,ψ,v)}|\mathrm{OrbitHom}_{H,\psi}(v)=\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}|\{\phi\in\Phi(H,G):S=\text{Sig}(\phi,\psi,v)\}|
Proof 5.5.

From the definition of Homomorphism Orbit Counts we have that OrbitHomH,ψ(v)=|{ϕΦ(H,G):hψ,ϕ(h)=v}|\mathrm{OrbitHom}_{H,\psi}(v)=|\{\phi\in\Phi(H,G)\ :\exists h\in\psi,\ \ \phi(h)=v\}|. Hence, suffices to show that |{ϕΦ(H,G):hψ,ϕ(h)=v}|=S𝒮(ψ)|{ϕΦ(H,G):S=Sig(ϕ,ψ,v)}||\{\phi\in\Phi(H,G)\ :\exists h\in\psi,\ \ \phi(h)=v\}|=\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}|\{\phi\in\Phi(H,G):S=\text{Sig}(\phi,\psi,v)\}|.

Let ϕΦ(H,G)\phi\in\Phi(H,G) be a homomorphism from HH to GG such that hψ,ϕ(h)=v\exists h\in\psi,\phi(h)=v. Let S=Sig(ϕ,ψ,v)S=\text{Sig}(\phi,\psi,v), we know that SS\neq\emptyset as hh is mapped to vv and from Claim 1 we know that it forms an independent set on the vertices of HH. Hence S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi).

To prove the other direction of the equality, suffices to note that if a homomorphism ϕ\phi contributes to the right side of the equation, then its signature SS belongs to 𝒮(ψ)\mathcal{I}\mathcal{S}(\psi), hence there is at least one vertex hV(H)h\in V(H) that is mapped to vv, and thus ϕ\phi contributes to the left side of the equation.

Now, we will relate the Signature with the Vertex-centric Counts:

Claim 3.

For each orbit ψ\psi in HH and each vertex vv in V(G)V(G) we have that S𝒮(ψ)\forall\ S\in\mathcal{I}\mathcal{S}(\psi):

|ϕΦ(H,G):hS,ϕ(h)=v|=SSS𝒮(ψ)|ϕ:Sig(ϕ,ψ,v)=S||\phi\in\Phi(H,G):\forall h\in S,\phi(h)=v|=\sum_{\begin{subarray}{c}S^{\prime}\supseteq S\\ S^{\prime}\in\mathcal{I}\mathcal{S}(\psi)\end{subarray}}|\phi:\text{Sig}(\phi,\psi,v)=S^{\prime}|
Proof 5.6.

If ϕ\phi is mapping all the vertices in SS to vv, then the Signature of ϕ\phi from ψ\psi to vv must be a superset of SS, Sig(ϕ,ψ,v)S\text{Sig}(\phi,\psi,v)\supseteq S. Hence summing over such sets will reach the equality. Note that we can add the restriction of SS^{\prime} belonging to 𝒮(ψ)\mathcal{I}\mathcal{S}(\psi) as it is implied from Claim 1.

Let Φ=Φ(HS,G)\Phi^{\prime}=\Phi(H_{S},G) be the set of homomorphism from HSH_{S} to GG. When SS forms an independent set there is an equivalence between the homomorphisms in Φ\Phi^{\prime} that map hSh_{S} to vv and the set of homomorphisms in Φ(H,G)\Phi(H,G) that map all the vertices of SS to vv. In fact we can prove the following claim:

Claim 4.

If SS is not empty and form an independent set:

|ϕΦ(H,G):hSϕ(h)=v|=VertexHomHS,hS(v)|\phi\in\Phi(H,G):\ \forall\ h\in S\ \phi(h)=v|=\mathrm{VertexHom}_{H_{S},h_{S}}(v)
Proof 5.7.

From the definition of Vertex-centric Counts we have that VertexHomHS,hS(v)=|ϕΦ(HS,G):ϕ(hS)=v|\mathrm{VertexHom}_{H_{S},h_{S}}(v)=|\phi^{\prime}\in\Phi(H_{S},G):\phi(h_{S})=v|. Hence it suffices to show that:

|ϕΦ(H,G):hSϕ(h)=v|=|ϕΦ(HS,G):ϕ(hS)=v|\left|\phi\in\Phi(H,G):\forall h\in S\ \phi(h)=v\right|=\left|\phi^{\prime}\in\Phi(H_{S},G):\phi(h_{S})=v\right|

We do so by proving that there is a bijection between both sets, that is, a one to one correspondence between them. Let ΦS={ϕΦ(HS,G):ϕ(hS)=v}\Phi_{S}=\{\phi^{\prime}\in\Phi(H_{S},G):\phi(h_{S})=v\} and ΦS={ϕΦ(H,G):hS,ϕ(h)=v}\Phi^{\prime}_{S}=\{\phi\in\Phi(H,G):\forall h\in S,\phi(h)=v\}. We show an invertible function f:ΦSΦSf:\Phi_{S}\to\Phi^{\prime}_{S}:

  • Given a homomorphism ϕΦS\phi\in\Phi_{S} we obtain ϕ=f(ϕ)ΦS\phi^{\prime}=f(\phi)\in\Phi^{\prime}_{S} by setting ϕ(h)=ϕ(h)hHS\phi^{\prime}(h)=\phi(h)\ \forall\ h\in H\setminus S and ϕ(hS)=v\phi^{\prime}(h_{S})=v. This is a valid homomorphism as we are mapping all the vertices in HSH_{S} to GG and we are preserving the edges.

  • Given a homomorphism ϕΦS\phi^{\prime}\in\Phi^{\prime}_{S} we obtain ϕ=f(ϕ)ΦS\phi=f^{\prime}(\phi^{\prime})\in\Phi_{S} by setting ϕ(h)=ϕ(h)hHS\phi(h)=\phi^{\prime}(h)\ \forall\ h\in H\setminus S and ϕ(h)=vhS\phi(h)=v\ \forall\ h\in S. Again this is a valid homomorphism as we are mapping all the vertices in HH to GG and we are still preserving the edges.

Additionally, we have that for all ϕΦS\phi\in\Phi_{S}, ϕ=f(f(ϕ))\phi=f^{\prime}(f(\phi)), which completes the proof.

We will show one last claim that will be important when deriving the inclusion-exclusion formula:

Claim 5.

Given a graph HH, for every orbit ψΨ(H)\psi\in\Psi(H), any subset S𝒮(ψ)S^{\prime}\in\mathcal{I}\mathcal{S}(\psi) satisfies:

SSS(1)|S|+1=1\displaystyle\sum_{\begin{subarray}{c}S\subseteq S^{\prime}\\ S\neq\emptyset\end{subarray}}(-1)^{|S|+1}=1
Proof 5.8.
SSS(1)|S|+1=i=1|S|(|S|i)(1)i+1\displaystyle\sum_{\begin{subarray}{c}S\subseteq S^{\prime}\\ S\neq\emptyset\end{subarray}}(-1)^{|S|+1}=\sum_{i=1}^{|S^{\prime}|}\binom{|S^{\prime}|}{i}(-1)^{i+1}
=i=1|S|((|S|1i1)+(|S|1i))(1)i+1=(|S1|0)(1)2=1\displaystyle=\sum_{i=1}^{|S^{\prime}|}\left(\binom{|S^{\prime}|-1}{i-1}+\binom{|S^{\prime}|-1}{i}\right)(-1)^{i+1}=\binom{|S^{\prime}-1|}{0}(-1)^{2}=1

We now have all the tools required to prove Lemma 5.3:

Proof 5.9 (Proof of Lemma 5.3).
S𝒮(ψ)(1)|S|+1VertexHomHS,hS(v)\displaystyle\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}(-1)^{|S|+1}\mathrm{VertexHom}_{H_{S},h_{S}}(v)
=S𝒮(ψ)(1)|S|+1|ϕΦ(H,G):hSϕ(u)=v|\displaystyle=\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}(-1)^{|S|+1}|\phi\in\Phi(H,G):\ \forall\ h\in S\ \phi(u)=v| (Claim 4)
=S𝒮(ψ)(1)|S|+1SSS𝒮(ψ)|ϕ:Sig(ϕ,ψ,v)=S|\displaystyle=\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}(-1)^{|S|+1}\sum_{\begin{subarray}{c}S^{\prime}\supseteq S\\ S^{\prime}\in\mathcal{I}\mathcal{S}(\psi)\end{subarray}}|\phi:\text{Sig}(\phi,\psi,v)=S^{\prime}| (Claim 3)
=S𝒮(ψ)SSS𝒮(ψ)(1)|S|+1|ϕ:Sig(ϕ,ψ,v)=S|\displaystyle=\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}\sum_{\begin{subarray}{c}S^{\prime}\supseteq S\\ S^{\prime}\in\mathcal{I}\mathcal{S}(\psi)\end{subarray}}(-1)^{|S|+1}|\phi:\text{Sig}(\phi,\psi,v)=S^{\prime}| (Factor in)
=S𝒮(ψ)SSS(1)|S|+1|ϕ:Sig(ϕ,ψ,v)=S|\displaystyle=\sum_{S^{\prime}\in\mathcal{I}\mathcal{S}(\psi)}\sum_{\begin{subarray}{c}S\subseteq S^{\prime}\\ S\neq\emptyset\end{subarray}}(-1)^{|S|+1}|\phi:\text{Sig}(\phi,\psi,v)=S^{\prime}| (Reorder)
=S𝒮(ψ)|ϕ:Sig(ϕ,ψ,v)=S|SSS(1)|S|+1\displaystyle=\sum_{S^{\prime}\in\mathcal{I}\mathcal{S}(\psi)}|\phi:\text{Sig}(\phi,\psi,v)=S^{\prime}|\sum_{\begin{subarray}{c}S\subseteq S^{\prime}\\ S\neq\emptyset\end{subarray}}(-1)^{|S|+1} (Factor out)
=S𝒮(ψ)|ϕ:Sig(ϕ,ψ,v)=S|\displaystyle=\sum_{S^{\prime}\in\mathcal{I}\mathcal{S}(\psi)}|\phi:\text{Sig}(\phi,\psi,v)=S^{\prime}| (Claim 5)
=OrbitHomH,ψ(v)\displaystyle=\mathrm{OrbitHom}_{H,\psi}(v) (Claim 2)

The next lemma relates the Longest Induced Path Connecting Orbits (LIPCO) defined in Definition 1.3 with the LICLLICL of all the graphs HSH_{S}, for all S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi) and all orbits ψ\psi of HH.

Lemma 5.10.

For every graph HH, LIPCO(H)5LIPCO(H)\leq 5 iff ψΨ(H),S𝒮(ψ)\ \forall\psi\in\Psi(H),\forall S\in\mathcal{I}\mathcal{S}(\psi), LICL(HS)5LICL(H_{S})\leq 5.

Proof 5.11.

First, we show that if LIPCO(H)>5LIPCO(H)>5 then ψΨ(H),S𝒮(ψ),LICL(HS)>5\exists\psi\in\Psi(H),\exists S\in\mathcal{I}\mathcal{S}(\psi),LICL(H_{S})>5. Consider the longest induced path in HH with endpoints in the same orbit ψΨ(H)\psi\in\Psi(H), let h,hh,h^{\prime} be the two endpoints of the path. We have two cases:

  • h=hh=h^{\prime}: In this case the induced path is actually just an induced cycle of length 66 or more in HH including the vertex hh. For any ψ\psi and for any SψS\subseteq\psi with |S|=1|S|=1 we have that HS=HH_{S}=H, and hence LICL(HS)>5LICL(H_{S})>5.

  • hhh\neq h^{\prime}: In the other case we have that h,hh,h^{\prime} are distinct vertices. Consider the set S={h,h}S=\{h,h^{\prime}\}, we have that S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi) as both h,hψh,h^{\prime}\in\psi and there is no edge connecting them (otherwise we would have a longer induced cycle). We form HSH_{S} by combining hh and hh^{\prime} into a single vertex, the induced path that we had in HH becomes then an induced cycle of length at least 66, which implies LICL(HS)>5LICL(H_{S})>5.

Now, we prove that if ψΨ(H),S𝒮(ψ),LICL(HS)>5\exists\psi\in\Psi(H),\exists S\in\mathcal{I}\mathcal{S}(\psi),LICL(H_{S})>5 then LIPCO(H)>5LIPCO(H)>5. Let SS be the set such that LICL(HS)>5LICL(H_{S})>5. Again, we have two cases:

  • |S|=1|S|=1: We have that HS=HH_{S}=H and hence LICL(H)>5LICL(H)>5, any vertex in that induced cycle induces a path of the same length with such vertex in both ends, which implies LIPCO(H)>5LIPCO(H)>5.

  • |S|>1|S|>1: Let hSh_{S} be the vertex in HSH_{S} obtained by merging the vertices of SS in HH. Consider the longest induced cycle in HSH_{S}, if that cycle does not contain hSh_{S} then that same cycle exists in HH and LICL(H)>5LICL(H)>5, which implies LIPCO(H)>5LIPCO(H)>5. Otherwise, we can obtain HH by splitting hSh_{S} back into separate vertices, there will be two distinct vertices h,hSh,h^{\prime}\in S that are in the two ends of an induced path of the same length in HH, thus LIPCO(H)>5LIPCO(H)>5.

6 Wrapping it up

In this section we complete the proof of the main theorem for the upper bound. We also give Algorithm 2, which summarizes the entire process.

Theorem 6.1.

There is an algorithm that, given a bounded degeneracy graph GG and pattern HH with LIPCO(H)5LIPCO(H)\leq 5, computes OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) in time O(nlogn)O(n\log{n}).

Proof 6.2.

Because we have that LIPCO(H)5LIPCO(H)\leq 5, using Lemma 5.10 we get that ψΨ(H),S𝒮(ψ),LICL(HS)5\forall\psi\in\Psi(H),\forall S\in\mathcal{I}\mathcal{S}(\psi),LICL(H_{S})\leq 5. This means, using Theorem 4.2, that ψΨ(H),S𝒮(ψ)\forall\psi\in\Psi(H),\forall S\in\mathcal{I}\mathcal{S}(\psi) we can compute VertexHomHS(G)\mathrm{VertexHom}_{H_{S}}(G) in time f(k)O(nlogn)f(k)O(n\log{n}).

Using Lemma 5.3 we can compute OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) from the individual counts of VertexHomHS(G)\mathrm{VertexHom}_{H_{S}}(G) (as shown in Algorithm 2), we have at most 2k2^{k} sets SS, hence the total time complexity necessary to compute OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) is O(nlogn)O(n\log{n}).

Algorithm 2 Homomorphism Orbit Counts OrbitHomH(G)\mathrm{OrbitHom}_{H}(G)
1:for each ψΨ(H)\psi\in\Psi(H) do
2:     for S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi) do
3:         Compute VertexHomHS,hS(G)\mathrm{VertexHom}_{H_{S},h_{S}}(G)
4:     end for
5:     OrbitHomH,ψ(G)=SIS(ψ)(1)|S|+1VertexHomHS,hS(v)\mathrm{OrbitHom}_{H,\psi}(G)=\sum_{S\in IS(\psi)}(-1)^{|S|+1}\mathrm{VertexHom}_{H_{S},h_{S}}(v)
6:end for
7:Return OrbitHomH(G)\mathrm{OrbitHom}_{H}(G)

7 Lower Bound for computing Homomorphism Orbit Counts

In this section we prove the lower bound of Theorem 1.5. It will be given by the following theorem:

Theorem 7.1.

Let HH be a pattern graph on kk vertices with LIPCO(H)>5LIPCO(H)>5. Assuming the Triangle Detection Conjecture, there exists an absolute constant γ>0\gamma>0 such that for any function f:×f:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N}, there is no (expected) f(κ,k)O(m1+γ)f(\kappa,k)O(m^{1+\gamma}) algorithm for the OrbitHom\mathrm{OrbitHom} problem, where mm and κ\kappa are the number of edges and the degeneracy of the input graph, respectively.

To prove this Theorem we will show how to express the Homomorphism Orbit Counts for some orbit ψ\psi as a linear combination of Homomorphism counts of non-isomorphic graphs HSH_{S} for all SS in 𝒮(ψ)\mathcal{I}\mathcal{S}(\psi). Because LIPCO(H)>5LIPCO(H)>5 we will have that the LICLLICL of at least one of these graphs is also greater than 55. We will then show that the hardness of computing Orbit counts in the original graph is the same than the hardness of computing the Homomorphisms counts. Finally we use a previous hardness result from [8] to complete the proof.

First, we introduce the following definition:

Definition 7.2.

Given a pattern graph HH and an input graph GG, for the orbit ψ\psi of HH, we define Agg(H,G,ψ)Agg(H,G,\psi) as the sum over every vertex vV(G)v\in V(G) of homomorphisms that are mapping some vertex in ψ\psi to vv, that is:

Agg(H,G,ψ)=vV(G)OrbitHomH,ψ(v)Agg(H,G,\psi)=\sum_{v\in V(G)}\mathrm{OrbitHom}_{H,\psi}(v)

Note that if we can compute OrbitHomH,ψ(v)\mathrm{OrbitHom}_{H,\psi}(v) for every vertex vv in GG then we can also compute Agg(H,G,ψ)Agg(H,G,\psi) in additional linear time. Now, we state the following lemma:

Lemma 7.3.

For every pattern graph HH and every orbit ψΨ(H)\psi\in\Psi(H), there is some number l=l(H)l=l(H) such that the following holds. For every graph GG there are some graphs G1,,GlG_{1},...,G_{l}, computable in time O(|V(G)|+|E(G)|)O(|V(G)|+|E(G)|), such that |V(Gi)|=O(|V|)|V(G_{i})|=O(|V|) and |E(Gi)|=O(|E|)|E(G_{i})|=O(|E|) for all i=1,,li=1,...,l, and such that knowing Agg(H,G1,ψ),,Agg(H,Gl,ψ)Agg(H,G_{1},\psi),...,Agg(H,G_{l},\psi) allows one to compute HomHS(G)\mathrm{Hom}_{H_{S}}(G) for all S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi), in time O(1)O(1). Furthermore, if GG is O(1)O(1)-degenerate, then so are G1,,GlG_{1},...,G_{l}.

First, we can relate the Homomorphism Vertex Counts of a vertex hV(H)h\in V(H) to Homomorphism Counts from HH to GG, as given in the following claim:

Claim 6.

For all hV(H)h\in V(H):

vV(G)VertexHomH,h(v)=HomH(G)\sum_{v\in V(G)}\mathrm{VertexHom}_{H,h}(v)=\mathrm{Hom}_{H}(G)
Proof 7.4.
vV(G)VertexHomH,h(v)\displaystyle\sum_{v\in V(G)}\mathrm{VertexHom}_{H,h}(v)
=vV(G)|{ϕΦ(H,G):ϕ(h)=v}|\displaystyle=\sum_{v\in V(G)}|\{\phi\in\Phi(H,G):\phi(h)=v\}| (Def. of VertexHom\mathrm{VertexHom})
=|{ϕΦ(H,G):ϕ(h)V(G)}|\displaystyle=\left|\{\phi\in\Phi(H,G):\phi(h)\in V(G)\}\right| (Sum over whole set)
=|Φ(H,G)|\displaystyle=\left|\Phi(H,G)\right| (ϕ:ϕ(u)V(G)\forall\phi:\phi(u)\in V(G))
=HomH(G)\displaystyle=\mathrm{Hom}_{H}(G) (Def. of Hom)

We now state the following Lemma from [6]:

Lemma 7.5.

(Lemma 4.2 from [6]): Let H1,,HlH_{1},...,H_{l} be pairwise non-isomorphic graphs and let c1,,clc_{1},...,c_{l} be non-zero constants. For every graph GG there are graphs G1,,GlG_{1},...,G_{l}, computable in time O(|V(G)|+|E(G)|)O(|V(G)|+|E(G)|), such that |V(Gi)|=O(|V(G)|)|V(G_{i})|=O(|V(G)|) and |E(Gi)|=O(|E(G)|)|E(G_{i})|=O(|E(G)|) for every i=1,,li=1,...,l, and such that knowing bj:=c1HomH1(Gj)++clHomHl(Gj)b_{j}:=c_{1}\cdot\mathrm{Hom}_{H_{1}}(G_{j})+...+c_{l}\cdot\mathrm{Hom}_{H_{l}}(G_{j}) for every j=1,,lj=1,...,l allows one to compute HomH1(G),,HomHl(G)\mathrm{Hom}_{H_{1}}(G),...,\mathrm{Hom}_{H_{l}}(G) in time O(1)O(1). Furthermore, if GG is O(1)O(1)-degenerate, then so are G1,,GlG_{1},...,G_{l}.

We will apply the previous lemma in a similar way as it is used the proof of Lemma 4.14.1 in [6].

Proof 7.6 (Proof of Lemma 7.3).

Let H1,,HlH_{1},...,H_{l} be an enumeration of all the graphs HSH_{S} for all S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi), up to isomorphism. This means that H1,,HlH_{1},...,H_{l} are pairwise non-isomorphic and {H1,,Hl}={HS:S𝒮(ψ)}\{H_{1},...,H_{l}\}=\{H_{S}:S\in\mathcal{I}\mathcal{S}(\psi)\}.

Let f(i)=(1)|S|+1|{S𝒮(ψ):HS is isomorphic to Hi}|f(i)=(-1)^{|S|+1}|\{S\in\mathcal{I}\mathcal{S}(\psi):H_{S}\text{ is isomorphic to }H_{i}\}| be the number of sets S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi) such that HSH_{S} is isomorphic to HiH_{i}, with the sign being (1)|S|+1(-1)^{|S|+1}. Note that all such sets have equal |S||S| and that the value of f(i)f(i) is always non-zero. We will use hih_{i} to denote the vertex of HiH_{i} that correspond to the vertices hSh_{S} of the graphs HSH_{S} that are isomorphic to HiH_{i}. We can express Agg(H,G,ψ)Agg(H,G,\psi) as follows:.

Agg(H,G,ψ)=vV(G)OrbitHomH,ψ(v)\displaystyle Agg(H,G,\psi)=\sum_{v\in V(G)}\mathrm{OrbitHom}_{H,\psi}(v) (Def. 7.2)
=vV(G)S𝒮(ψ)(1)|S|+1VertexHomHS,hS(v)\displaystyle=\sum_{v\in V(G)}\sum_{S\in\mathcal{I}\mathcal{S}(\psi)}(-1)^{|S|+1}\mathrm{VertexHom}_{H_{S},h_{S}}(v) (Lemma 5.3)
=vV(G)i=1lf(i)VertexHomHi,hi(v)\displaystyle=\sum_{v\in V(G)}\sum_{i=1}^{l}f(i)\mathrm{VertexHom}_{H_{i},h_{i}}(v) (Def. of f(i)f(i))
=i=1lf(i)vV(G)VertexHomHi,hi(v)\displaystyle=\sum_{i=1}^{l}f(i)\sum_{v\in V(G)}\mathrm{VertexHom}_{H_{i},h_{i}}(v) (Reorder)
=i=1lf(i)HomHi(G)\displaystyle=\sum_{i=1}^{l}f(i)\mathrm{Hom}_{H_{i}}(G) (Claim 6)

Hence, we have that Agg(H,G,ψ)Agg(H,G,\psi) is a linear combination of homomorphism counts of H1,,HlH_{1},...,H_{l}. We can then use Lemma 7.5 to complete the proof.

Before we prove Theorem 7.1, we need to state the following theorem from [8], which gives a hardness result on Homomorphism Counting:

Theorem 7.7 (Theorem 5.1 from [8]).

Let HH be a pattern graph on kk vertices with LICL6LICL\geq 6. Assuming the Triangle Detection Conjecture, there exists an absolute constant γ\gamma such that for any function f:×f:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N}, there is no (expected) f(κ,k)O(m1+γ)f(\kappa,k)O(m^{1+\gamma}) algorithm for the HomH\mathrm{Hom}_{H} problem, where mm and κ\kappa are the number of edges and the degeneracy of the input graph, respectively.

We now have all the tools required to proof Theorem 7.1:

Proof 7.8 (Proof of Theorem 7.1).

We prove by contradiction. Given a graph GG and a pattern HH with LIPCO(H)>5LIPCO(H)>5, suppose there exists an algorithm that allows us to compute OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) in time f(κ,k)O(m)f(\kappa,k)O(m), by Lemma 7.3 we have the existence of some graphs G1,,GlG_{1},...,G_{l}. We can compute OrbitHomH(Gi)\mathrm{OrbitHom}_{H}(G_{i}) for all of these graphs in time f(κ,k)O(m)f(\kappa,k)O(m) and then aggregate the results into Agg(H,Gi,ψ)Agg(H,G_{i},\psi) for all GiG_{i} and all ψΨ(H)\psi\in\Psi(H). Using Lemma 7.3, that implies that we can compute HomHS(G)\mathrm{Hom}_{H_{S}}(G) for all S𝒮(ψ)S\in\mathcal{I}\mathcal{S}(\psi) for all ψΨ(H)\psi\in\Psi(H) in time f(κ,k)O(m)f(\kappa,k)O(m).

However, if LIPCO(H)>5LIPCO{}(H)>5 then, by Lemma 5.10, we have that there exists a SψS\subseteq\psi for some ψΨ(H)\psi\in\Psi(H) such that LICL(HS)>5LICL(H_{S})>5. From Theorem 7.7 we know that in that case there is no algorithm that computes HomHS(G)\mathrm{Hom}_{H_{S}}(G) in time f(κ,k)O(m1+γ)f(\kappa,k)O(m^{1+\gamma}) for some constant γ>0\gamma>0. This is a contradiction, and hence no algorithm can compute OrbitHomH(G)\mathrm{OrbitHom}_{H}(G) in f(κ,k)O(m)f(\kappa,k)O(m) time.

References

  • [1] Amir Abboud and Virginia Vassilevska Williams. Popular conjectures imply strong lower bounds for dynamic problems. In Proc. 55th Annual IEEE Symposium on Foundations of Computer Science, 2014. doi:10.1109/FOCS.2014.53.
  • [2] Nesreen K. Ahmed, Jennifer Neville, Ryan A. Rossi, and Nick Duffield. Efficient graphlet counting for large networks. In Proceedings, SIAM International Conference on Data Mining (ICDM), 2015. doi:10.1109/ICDM.2015.141.
  • [3] Noga Alon, Raphael Yuster, and Uri Zwick. Finding and counting given length cycles. Algorithmica, 17(3):209–223, 1997. doi:10.1007/BF02523189.
  • [4] A. Benson, D. F. Gleich, and J. Leskovec. Higher-order organization of complex networks. Science, 353(6295):163–166, 2016. doi:10.1126/science.aad9029.
  • [5] Suman K Bera, Amit Chakrabarti, and Prantar Ghosh. Graph coloring via degeneracy in streaming and other space-conscious models. In International Colloquium on Automata, Languages and Programming, 2020. doi:10.4230/LIPIcs.ICALP.2020.11.
  • [6] Suman K. Bera, Lior Gishboliner, Yevgeny Levanzov, C. Seshadhri, and Asaf Shapira. Counting subgraphs in degenerate graphs. Journal of the ACM (JACM), 69(3), 2022. doi:10.1145/3520240.
  • [7] Suman K Bera, Noujan Pashanasangi, and C Seshadhri. Linear time subgraph counting, graph degeneracy, and the chasm at size six. In Proc. 11th Conference on Innovations in Theoretical Computer Science. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ITCS.2020.38.
  • [8] Suman K. Bera, Noujan Pashanasangi, and C. Seshadhri. Near-linear time homomorphism counting in bounded degeneracy graphs: The barrier of long induced cycles. In Proceedings of the Thirty-Second Annual ACM-SIAM Symposium on Discrete Algorithms, page 2315–2332, 2021. doi:10.1137/1.9781611976465.138.
  • [9] Suman K Bera and C Seshadhri. How the degeneracy helps for triangle counting in graph streams. In Principles of Database Systems, pages 457–467, 2020. doi:10.1145/3375395.3387665.
  • [10] Jonathan W. Berry, Bruce Hendrickson, Randall A. LaViolette, and Cynthia A. Phillips. Tolerating the community detection resolution limit with edge weighting. Phys. Rev. E, 83:056119, 2011. doi:10.1103/PhysRevE.83.056119.
  • [11] Umberto Bertele and Francesco Brioschi. On non-serial dynamic programming. J. Comb. Theory, Ser. A, 14(2):137–148, 1973. doi:10.1016/0097-3165(73)90016-2.
  • [12] J.A. Bondy and U.S.R Murty. Graph Theory, volume 244. Springer, 2008. doi:10.1007/978-1-84628-970-5.
  • [13] Christian Borgs, Jennifer Chayes, László Lovász, Vera T. Sós, and Katalin Vesztergombi. Counting graph homomorphisms. In Topics in discrete mathematics, pages 315–371. Springer, 2006. doi:10.1007/3-540-33700-8_18.
  • [14] Marco Bressan. Faster subgraph counting in sparse graphs. In 14th International Symposium on Parameterized and Exact Computation (IPEC 2019). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2019. doi:10.4230/LIPIcs.IPEC.2019.6.
  • [15] Marco Bressan. Faster algorithms for counting subgraphs in sparse graphs. Algorithmica, 83:2578–2605, 2021. doi:10.1007/s00453-021-00811-0.
  • [16] Marco Bressan, Leslie Ann Goldberg, Kitty Meeks, and Marc Roth. Counting subgraphs in somewhere dense graphs. In 14th Innovations in Theoretical Computer Science Conference (ITCS 2023), pages 27:1–27:14, 2023. doi:10.4230/LIPIcs.ITCS.2023.27.
  • [17] Marco Bressan and Marc Roth. Exact and approximate pattern counting in degenerate graphs: New algorithms, hardness results, and complexity dichotomies. In 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS), pages 276–285, 2022. doi:10.1109/FOCS52979.2021.00036.
  • [18] Graham R Brightwell and Peter Winkler. Graph homomorphisms and phase transitions. Journal of combinatorial theory, series B, 77(2):221–262, 1999. doi:10.1006/jctb.1999.1899.
  • [19] Ashok K Chandra and Philip M Merlin. Optimal implementation of conjunctive queries in relational data bases. In Proc. 9th Annual ACM Symposium on the Theory of Computing, pages 77–90, 1977. doi:10.1145/800105.803397.
  • [20] Norishige Chiba and Takao Nishizeki. Arboricity and subgraph listing algorithms. SIAM Journal on Computing (SICOMP), 14(1):210–223, 1985. doi:10.1137/0214017.
  • [21] Jonathan Cohen. Graph twiddling in a mapreduce world. Computing in Science & Engineering, 11(4):29, 2009. doi:10.1109/MCSE.2009.120.
  • [22] J. Coleman. Social capital in the creation of human capital. American Journal of Sociology, 94:S95–S120, 1988. URL: http://www.jstor.org/stable/2780243, doi:10.1086/228943.
  • [23] Radu Curticapean, Holger Dell, and Dániel Marx. Homomorphisms are a good basis for counting small subgraphs. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, pages 210–223, 2017. doi:10.1145/3055399.3055502.
  • [24] Víctor Dalmau and Peter Jonsson. The complexity of counting homomorphisms seen from the other side. Theoretical Computer Science, 329(1-3):315–323, 2004. doi:10.1016/j.tcs.2004.08.008.
  • [25] Holger Dell, Marc Roth, and Philip Wellnitz. Counting answers to existential questions. In Proc. 46th International Colloquium on Automata, Languages and Programming. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2019. doi:10.4230/LIPIcs.ICALP.2019.113.
  • [26] Josep Díaz, Maria Serna, and Dimitrios M Thilikos. Counting h-colorings of partial k-trees. Theoretical Computer Science, 281(1-2):291–309, 2002. doi:10.1016/S0304-3975(02)00017-8.
  • [27] Martin Dyer and Catherine Greenhill. The complexity of counting graph homomorphisms. Random Structures & Algorithms, 17(3-4):260–289, 2000. doi:10.1002/1098-2418(200010/12)17:3/4\%3C260::AID-RSA5\%3E3.0.CO;2-W.
  • [28] David Eppstein. Arboricity and bipartite subgraph listing algorithms. Information processing letters, 51(4):207–211, 1994. doi:10.1016/0020-0190(94)90121-X.
  • [29] G. Fagiolo. Clustering in complex directed networks. Phys. Rev. E, 2007. doi:10.1103/PhysRevE.76.026107.
  • [30] Jörg Flum and Martin Grohe. The parameterized complexity of counting problems. SIAM Journal on Computing (SICOMP), 33(4):892–922, 2004. doi:10.1137/S0097539703427203.
  • [31] Lior Gishboliner, Yevgeny Levanzov, and Asaf Shapira. Counting subgraphs in degenerate graphs, 2020. arXiv:2010.05998, doi:10.48550/arXiv.2010.05998.
  • [32] Gaurav Goel and Jens Gustedt. Bounded arboricity to determine the local structure of sparse graphs. In International Workshop on Graph-Theoretic Concepts in Computer Science, pages 159–167. Springer, 2006. doi:10.1007/11917496_15.
  • [33] Rudolf Halin. S-functions for graphs. Journal of geometry, 8(1-2):171–186, 1976. doi:10.1007/BF01917434.
  • [34] P. Holland and S. Leinhardt. A method for detecting structure in sociometric data. American Journal of Sociology, 76:492–513, 1970. doi:10.1016/B978-0-12-442450-0.50028-6.
  • [35] Alon Itai and Michael Rodeh. Finding a minimum circuit in a graph. SIAM Journal on Computing, 7(4):413–423, 1978. doi:10.1137/0207033.
  • [36] Shalev Itzkovitz, Reuven Levitt, Nadav Kashtan, Ron Milo, Michael Itzkovitz, and Uri Alon. Coarse-graining and self-dissimilarity of complex networks. Phys. Rev. E, 71(016127), January 2005. doi:10.1103/PhysRevE.71.016127.
  • [37] Shweta Jain and C Seshadhri. A fast and provable method for estimating clique counts using Turán’s theorem. In Proceedings, International World Wide Web Conference (WWW), pages 441–449, 2017. doi:10.1145/3038912.3052636.
  • [38] Madhav Jha, C Seshadhri, and Ali Pinar. Path sampling: A fast and provable method for estimating 4-vertex subgraph counts. In Proc. 24th Proceedings, International World Wide Web Conference (WWW), pages 495–505. International World Wide Web Conferences Steering Committee, 2015. doi:10.1145/2736277.2741101.
  • [39] László Lovász. Operations with structures. Acta Mathematica Academiae Scientiarum Hungarica, 18(3-4):321–328, 1967. doi:10.1007/BF02280291.
  • [40] László Lovász. Large networks and graph limits, volume 60. American Mathematical Soc., 2012.
  • [41] David W Matula and Leland L Beck. Smallest-last ordering and clustering and graph coloring algorithms. Journal of the ACM (JACM), 30(3):417–427, 1983. doi:10.1145/2402.322385.
  • [42] Derek O’Callaghan, Martin Harrigan, Joe Carthy, and Pádraig Cunningham. Identifying discriminating network motifs in youtube spam, 2012. URL: https://arxiv.org/abs/1202.5216, arXiv:1202.5216, doi:10.48550/arXiv.1202.5216.
  • [43] Mark Ortmann and Ulrik Brandes. Efficient orbit-aware triad and quad census in directed and undirected graphs. Applied network science, 2(1), 2017. doi:10.1007/s41109-017-0027-2.
  • [44] Noujan Pashanasangi and C Seshadhri. Efficiently counting vertex orbits of all 5-vertex subgraphs, by evoke. In Proc. 13th International Conference on Web Search and Data Mining (WSDM), pages 447–455, 2020. doi:10.1145/3336191.3371773.
  • [45] Ali Pinar, C Seshadhri, and Vaidyanathan Vishal. Escape: Efficiently counting all 5-vertex subgraphs. In Proceedings, International World Wide Web Conference (WWW), pages 1431–1440, 2017. doi:10.1145/3038912.3052597.
  • [46] Natasa Przulj. Biological network comparison using graphlet degree distribution. Bioinformatics, 23(2):177–183, 2007. doi:10.1093/bioinformatics/btl301.
  • [47] Neil Robertson and Paul D. Seymour. Graph minors. i. excluding a forest. Journal of Combinatorial Theory, Series B, 35(1):39–61, 1983. doi:10.1016/0095-8956(83)90079-5.
  • [48] Neil Robertson and Paul D. Seymour. Graph minors. iii. planar tree-width. Journal of Combinatorial Theory, Series B, 36(1):49–64, 1984. doi:10.1016/0095-8956(84)90013-3.
  • [49] Neil Robertson and Paul D. Seymour. Graph minors. ii. algorithmic aspects of tree-width. Journal of algorithms, 7(3):309–322, 1986. doi:10.1016/0196-6774(86)90023-4.
  • [50] Rahmtin Rotabi, Krishna Kamath, Jon M. Kleinberg, and Aneesh Sharma. Detecting strong ties using network motifs. In Proceedings, International World Wide Web Conference (WWW), 2017. doi:10.1145/3041021.3055139.
  • [51] Marc Roth and Philip Wellnitz. Counting and finding homomorphisms is universal for parameterized complexity theory. In Proc. 31st Annual ACM-SIAM Symposium on Discrete Algorithms, pages 2161–2180, 2020. doi:10.1137/1.9781611975994.133.
  • [52] Ahmet Erdem Sariyuce, C. Seshadhri, Ali Pinar, and Umit V. Catalyurek. Finding the hierarchy of dense subgraphs using nucleus decompositions. In Proceedings, International World Wide Web Conference (WWW), pages 927–937, 2015. doi:10.1145/2736277.2741640.
  • [53] C. Seshadhri and Srikanta Tirthapura. Scalable subgraph counting: The methods behind the madness: WWW 2019 tutorial. In Proceedings, International World Wide Web Conference (WWW), 2019. doi:10.1145/3308560.3320092.
  • [54] Nino Shervashidze, S. V. N. Vishwanathan, Tobias Petri, Kurt Mehlhorn, and Karsten M. Borgwardt. Efficient graphlet kernels for large graph comparison. In AISTATS, pages 488–495, 2009. URL: http://proceedings.mlr.press/v5/shervashidze09a.html.
  • [55] K. Shin, T. Eliassi-Rad, and C. Faloutsos. Patterns and anomalies in kk-cores of real-world graphs with applications. Knowledge and Information Systems, 54(3):677–710, 2018. doi:10.1007/s10115-017-1077-6.
  • [56] George Szekeres and Herbert S Wilf. An inequality for the chromatic number of a graph. Journal of Combinatorial Theory, 4(1):1–3, 1968. doi:10.1016/S0021-9800(68)80081-X.
  • [57] Charalampos E. Tsourakakis. The k-clique densest subgraph problem. In Proceedings, International World Wide Web Conference (WWW), pages 1122–1132, 2015. doi:10.1145/2736277.2741098.
  • [58] Charalampos E. Tsourakakis, Jakub Pachocki, and Michael Mitzenmacher. Scalable motif-aware graph clustering. In Proceedings, International World Wide Web Conference (WWW), pages 1451–1460, 2017. doi:10.1145/3038912.3052653.
  • [59] Johan Ugander, Lars Backstrom, and Jon M. Kleinberg. Subgraph frequencies: mapping the empirical and extremal geography of large graph collections. In Proceedings, International World Wide Web Conference (WWW), pages 1307–1318, 2013. doi:10.1145/2488388.2488502.
  • [60] Hao Yin, Austin R. Benson, and Jure Leskovec. Higher-order clustering in networks. Phys. Rev. E, 97:052306, 2018. doi:10.1103/PhysRevE.97.052306.
  • [61] Hao Yin, Austin R. Benson, and Jure Leskovec. The local closure coefficient: A new perspective on network clustering. In ACM International Conference on Web Search and Data Mining (WSDM), pages 303–311, 2019. doi:10.1145/3289600.3290991.