Skip to main content
QUICK REVIEW

[Paper Review] Faster algorithms for counting subgraphs in sparse graphs

Marco Bressan|arXiv (Cornell University)|May 5, 2018
Graph Theory and AlgorithmsComputer Science5 citations
TL;DR

This paper presents faster algorithms for counting subgraphs in sparse graphs by introducing a novel tree-like decomposition for directed acyclic graphs that exploits graph degeneracy. The method enables subgraph counting in time 2^O(k²) · O(n^{0.25k+2} log n) for bounded-degeneracy graphs and 2^O(k²) · O(n^{0.625k+2} log n) for bounded-average-degree graphs—improving upon the classic Nešetřil-Poljak bound of O(n^{0.791k+2}) when sparsity is present. The approach is shown to be optimal under the Exponential Time Hypothesis.

ABSTRACT

Given a $k$-node pattern graph $H$ and an $n$-node host graph $G$, the subgraph counting problem asks to compute the number of copies of $H$ in $G$. In this work we address the following question: can we count the copies of $H$ faster if $G$ is sparse? We answer in the affirmative by introducing a novel tree-like decomposition for directed acyclic graphs, inspired by the classic tree decomposition for undirected graphs. This decomposition gives a dynamic program for counting the homomorphisms of $H$ in $G$ by exploiting the degeneracy of $G$, which allows us to beat the state-of-the-art subgraph counting algorithms when $G$ is sparse enough. For example, we can count the induced copies of any $k$-node pattern $H$ in time $2^{O(k^2)} O(n^{0.25k + 2} \log n)$ if $G$ has bounded degeneracy, and in time $2^{O(k^2)} O(n^{0.625k + 1} \log n)$ if $G$ has bounded average degree. These bounds are instantiations of a more general result, parameterized by the degeneracy of $G$ and the structure of $H$, which generalizes classic bounds on counting cliques and complete bipartite graphs. We also give lower bounds based on the Exponential Time Hypothesis, showing that our results are actually a characterization of the complexity of subgraph counting in bounded-degeneracy graphs.

Motivation & Objective

  • To overcome the n^{Θ(k)} runtime barrier in subgraph counting by leveraging graph sparsity.
  • To develop a new tree-like decomposition tailored for directed acyclic graphs to exploit degeneracy in the host graph.
  • To achieve faster running times than the Nešetřil-Poljak algorithm for sparse graphs with bounded degeneracy or average degree.
  • To characterize the exact complexity of subgraph counting in bounded-degeneracy graphs using the Exponential Time Hypothesis (ETH).

Proposed method

  • Introduces a novel tree-like decomposition for directed acyclic graphs, inspired by undirected tree decomposition but adapted to exploit degeneracy.
  • Uses dynamic programming over the decomposition to count homomorphisms, occurrences, and induced copies of a k-node pattern H in the host graph G.
  • Parameterizes the runtime by the degeneracy d of G and a width measure τ(H) of the pattern H, yielding f(k) · O(d^{k−τ(H)} n^{τ(H)} log n) time.
  • Applies the decomposition to derive bounds for both induced and non-induced subgraph counting, with separate handling for homomorphisms and induced copies.
  • Employs the Exponential Time Hypothesis to prove lower bounds, showing the algorithm's optimality for bounded-degeneracy graphs.
  • Generalizes classic results on clique and complete bipartite subgraph counting by unifying them under a single framework.

Experimental results

Research questions

  • RQ1Can subgraph counting be accelerated when the host graph G is sparse, particularly when G has bounded degeneracy?
  • RQ2Is there a structural decomposition of the pattern graph H that enables faster counting by exploiting degeneracy in G?
  • RQ3What is the exact complexity of counting induced subgraphs in bounded-degeneracy graphs, and can it be characterized?
  • RQ4Can the algorithm achieve better runtime than the Nešetřil-Poljak bound for sparse graphs, and under what conditions?

Key findings

  • The paper achieves a runtime of 2^O(k²) · O(n^{0.25k+2} log n) for counting induced copies of any k-node pattern H in bounded-degeneracy graphs, improving on the O(n^{0.791k+2}) bound of Nešetřil and Poljak.
  • For graphs with bounded average degree r, the runtime is 2^O(k²) · O(r^{1/2(k−⌊k/4⌋)−1} n^{1/2(k+⌊k/4⌋)+1} log n), which reduces the exponent of n when r is sublinear in n.
  • The algorithm's performance is optimal under the Exponential Time Hypothesis, as it matches a lower bound of n^{Ω(τ(H)/log τ(H))} for degeneracy 2 graphs.
  • The proposed tree-like decomposition generalizes and unifies prior results on counting cliques and complete bipartite graphs in sparse settings.
  • The method achieves a significant reduction in the polynomial exponent of n—down to 0.25k+2—when degeneracy is bounded, outperforming the state of the art for sufficiently sparse graphs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.