Counting Patterns in Degenerate Graphs in Constant Space
Abstract
For a fixed pattern graph, we study the algorithmic complexity of counting homomorphisms, subgraph isomorphisms, and induced subgraph isomorphisms into an -vertex, -degenerate host graph. Bressan (Algorithmica, 2021) introduced the notion of DAG treewidth and showed that counting homomorphisms and induced subgraphs can be performed efficiently using dynamic programming that requires polynomial space. In this work, we introduce a new graph parameter, called DAG treedepth, which enables efficient divide-and-conquer algorithms for counting homomorphisms in -degenerate host graphs using only constant space. Bera, Gishboliner, Levanzov, Seshadhri, and Shapira (SODA, 2021) showed that a pattern graph has DAG treewidth one if and only if it contains no induced cycle of length at least six. This induced minor characterization leads to linear-time and linear-space algorithms. Building on this line of work, we derive an induced-minor characterization of graphs with DAG treedepth at most two that uses only constant space. Recently, Paul-Pena and Seshadhri (ICALP, 2025) proved that all pattern graphs on at most nine vertices can be counted in subquadratic time using polynomial space. We show that every pattern graph on at most nine vertices can be counted as an induced subgraph in time using only constant space. Moreover, we show that patterns on at most eleven vertices can be counted in time using polynomial space. Finally, we present a constant-space algorithm for counting induced subgraphs that matches the running time of Bressan algorithm. We further show that, when polynomial space is allowed, homomorphisms, subgraph isomorphisms, and induced subgraph isomorphisms can be counted faster than Bressan algorithm. In addition, we establish several other results related to DAG treewidth and DAG treedepth that may be of independent interest.
Create a lesson
Related papers
Space-Efficient Text Indexing for Advanced Counting Queries
Shared title terminologycs.DSSolon P. Pissis, Sharma V. Thankachan
ObliGraph: Graph Pattern Query Processing with Full and Differential Obliviousness
Shared title terminologycs.DSLyu Xu, Xinyi Zhang, Qichen Wang
Counting 6-Cliques in O(n^{5.97}) time and O(\log n) space
Shared title terminologycs.DSAfrouz Jabal Ameli, Niklas Mohrin, Jesper Nederlof
A Polynomial-Time Algorithm for Coloring Perfect Graphs Based on Walk Counting
Shared title terminologycs.DSAmir Ali Ahmadi, Pravesh K. Kothari, Yukai Tang
Faster Cache-Efficient Pattern Matching for Deterministic Wheeler Pangenome Graphs
Shared title terminologycs.DSRiccardo Maso, Nicola Prezza, Carlo Tosoni
Constant-factor approximation of maximum distance-2 independent set in graphs of bounded merge-width
Shared title terminologycs.DSMaël Dumas