Faster Algorithms for Finding and Counting Subgraphs
Abstract
In this paper we study a natural generalization of both k-Path and k-Tree problems, namely, the Subgraph Isomorphism problem. In the Subgraph Isomorphism problem we are given two graphs F and G on k and n vertices respectively as an input, and the question is whether there exists a subgraph of G isomorphic to F. We show that if the treewidth of F is at most t, then there is a randomized algorithm for the Subgraph Isomorphism problem running in time *(2k n2t). To do so, we associate a new multivariate Homomorphism polynomial of degree at most k with the Subgraph Isomorphism problem and construct an arithmetic circuit of size at most n(t) for this polynomial. Using this polynomial, we also give a deterministic algorithm to count the number of homomorphisms from F to G that takes n(t) time and uses polynomial space. For the counting version of the Subgraph Isomorphism problem, where the objective is to count the number of distinct subgraphs of G that are isomorphic to F, we give a deterministic algorithm running in time and space *(n k/2n2p) or n k/2n(t k). We also give an algorithm running in time *(2kn k/2n5p) and taking space polynomial in n. Here p and t denote the pathwidth and the treewidth of F, respectively. Thus our work not only improves on known results on Subgraph Isomorphism but it also extends and generalize most of the known results on k-Path and k-Tree.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.