Exact and Approximate Pattern Counting in Degenerate Graphs: New Algorithms, Hardness Results, and Complexity Dichotomies
Abstract
We consider the problem of counting the copies of a k-node graph H in an n-node graph G. Due to the sparsity of real-world graphs, there is considerable interest in understanding the complexity of this problem when the degeneracy d of G is small. In this work we present several results on this topic. Our main contributions are:
• We fully classify the complexity of counting the copies and the induced copies of H in ddegenerate graphs G, under the Exponential Time Hypothesis. We prove that the copies of H in G can be counted in time f (k, d)•n max(imn(H),1) •log n, where imn(H) is the size of the largest induced matching of H, and that this is essentially optimal: if the class of allowed patterns has unbounded induced matching number, the problem cannot be solved in time f (k, d)•n o(imn(H)/ log imn(H)) for any f . We show a similar result for counting induced copies, in which case the relevant parameter of H turns out to be its independence number α(H).
In the language of parameterized complexity, this gives dichotomies in tractable and hard cases when the parameter is k + d, and implies that, unless ETH fails, several patterns cannot be counted in time f (k, d) • n o(k/ log k) , including k-matchings, k-independent sets, (induced) k-paths, (induced) k-cycles, and induced (k, k)-bicliques.
• We introduce a novel family of obstructions, that we call F-gadgets, which are at the heart of our hardness results. We show that counting the homomorphisms from H to a graph of bounded degeneracy is hard when H has an F -gadget of unbounded treewidth. From this result, the hardness results for subgraphs and induced subgraphs above are derived using the complexity monotonicity principle of Curticapean, Dell and Marx (STOC 17) and Chen and Mengel (PODS 16), via a recent approach of Gishboliner, Levanzov and Shapira (ECCC 20). We conjecture that F-gadgets actually characterise the hardness of counting homomorphisms in graphs of bounded degeneracy. Our work proves one part of this conjecture, leaving the other part as an open problem.
• We give novel algorithms for approximate counting of subgraphs and induced subgraphs, based on recent reductions to the colourful decision version of the problem by Dell, Lapinskas and Meeks (SODA 20). We show an algorithm that computes an expected εmultiplicative approximation of the number of copies of 1) , where τ 1 (H) is the dag-treewidth of H. For induced copies, we give an algorithm with running time (kd 1) . This implies, for instance, that we can efficiently approximate the number of induced (k, k)-bicliques in a degenerate graph, which for non-degenerate graphs is impossible under standard parameterized complexity assumptions.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
7 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- The Complexity of Pattern Counting in Directed Graphs, Parameterised by the Outdegree cites Near-Linear Time Homomorphism Counting in Bounded Degeneracy Graphs: The Barrier of Long Induced Cycles
- Near-Linear Time Homomorphism Counting in Bounded Degeneracy Graphs: The Barrier of Long Induced Cycles cites Counting and Finding Homomorphisms is Universal for Parameterized Complexity Theory
- The Parameterised Complexity of Counting Small Sub-Hypergraphs cites Counting Small Induced Subgraphs Satisfying Monotone Properties
- The Parameterised Complexity of Counting Small Sub-Hypergraphs cites The Complexity of Pattern Counting in Directed Graphs, Parameterised by the Outdegree
- Count on CFI graphs for #P-hardness cites Counting Small Induced Subgraphs Satisfying Monotone Properties
Cited by top-tier papers7
- The Complexity of Pattern Counting in Directed Graphs, Parameterised by the OutdegreeMarco Bressan, Matthias Lanzinger, Marc RothSTOC 2023 · 9 citations
- Faster approximate subgraph counts with privacyDung Nguyen, Mahantesh Halappanavar, Venkatesh Srinivasan, Anil VullikantiNeurIPS 2023 · 8 citations
- The Parameterised Complexity of Counting Small Sub-HypergraphsMarco Bressan, Julian Christoph Brinkmann, Holger Dell, Marc Roth et al.SODA 2026 · 3 citations
- Efficiently Finding and Counting Patterns with Distance Constraints in Sparse GraphsDaniel Lokshtanov, Fahad Panolan, Saket Saurabh, Jie Xue et al.STOC 2025 · 2 citations
- Count on CFI graphs for #P-hardnessRadu CurticapeanSODA 2024 · 2 citations
Builds on6
- Faster sublinear approximation of the number of k-cliques in low-arboricity graphsTalya Eden, Dana Ron, C. SeshadhriSODA 2020 · 17 citations
- Approximately counting and sampling small witnesses using a colourful decision oracleHolger Dell, John Lapinskas, Kitty MeeksSODA 2020 · 13 citations
- Counting and Finding Homomorphisms is Universal for Parameterized Complexity TheoryMarc Roth, Philip WellnitzSODA 2020 · 8 citations
- Near-Linear Time Homomorphism Counting in Bounded Degeneracy Graphs: The Barrier of Long Induced CyclesSuman K. Bera, Noujan Pashanasangi, C. SeshadhriSODA 2021 · 7 citations
- Counting Small Induced Subgraphs Satisfying Monotone PropertiesMarc Roth, Johannes Schmitt, Philip WellnitzFOCS 2020 · 4 citations
Related papers
- Counting Small Induced Subgraphs with Edge-Monotone PropertiesSimon Döring, Dániel Marx, Philip WellnitzSTOC 2024
- Detecting and counting small patterns in planar graphs in subexponential parameterized timeJesper NederlofSTOC 2020 · 1 citation
- Near-linear time subhypergraph counting in bounded degeneracy hypergraphsDaniel Paul-Pena, C. SeshadhriSODA 2026
- Counting small induced subgraphs with hereditary propertiesJacob Focke, Marc RothSTOC 2022 · 8 citations
- Counting Small Induced Subgraphs: Hardness via Fourier AnalysisRadu Curticapean, Daniel NeuenSODA 2025 · 1 citation
