We present an algorithm to count the number of occurrences of a pattern graph as an induced subgraph in a host graph . If belongs to a bounded expansion class, the algorithm runs in linear time. Our design choices are motivated by the need for an approach that can be engineered into a practical implementation for sparse host graphs. Specifically, we introduce a decomposition of the pattern called a counting dag which encodes an order-aware, inclusion-exclusion counting method for . Given such a counting dag and a suitable linear ordering of as input, our algorithm can count the number of times appears as an induced subgraph in in time $O(|\vec C| \cdot h _{h}(\mathbb G)^{h-1} |G|)h(\mathbb G)h\mathbb G$. This implies, combined with previous results, an algorithm with running time which only takes and as input. We note that with a small modification, our algorithm can instead use strongly -reachable sets with running time $O(|\vec C| \cdot h {h}(\mathbb G)^{h-1} |G|)O(4^{h^2}h _h(G)^{h^2} |G|)HG$. Because orderings with small weakly/strongly reachable sets can be computed relatively efficiently in practice [11], our algorithm provides a promising alternative to algorithms using the traditional -treedepth colouring framework [13]. We describe preliminary experimental results from an initial open source implementation which highlight its potential.

生成讲解博客的中文版本

生成AI智能校验的中文版本