finding, minimizing, and counting weighted subgraphs
For a pattern graph H on k nodes, we consider the problems of finding and counting the number of (not necessarily induced) copies of H in a given large graph G on n nodes, as well as finding minimum weight copies in both node-weighted and edge-weighted graphs. Our results include: The number of copies of an H with an independent set of size s can be computed exactly in O*(2 s n k-s+3 ) time. A minimum weight copy of such an H (with arbitrary real weights on nodes and edges) can be found in O(4 s+o(s) n k-s+3 ) time. (The O* notation omits (k) factors.) These algorithms rely on fast algorithms for computing the permanent of a k x n matrix, over rings and semirings. The number of copies of any H having minimum (or maximum) node-weight (with arbitrary real weights on nodes) can be found in O(n ? k/3 + n 2k/3+o(1) ) time, where ? edge-weighted triangle of weight exactly 0 in general graphs requires ?(n 2.5-? ) time for all ? > 0, unless the 3SUM problem on N numbers can be solved in O(N 2 - ? ) time. This suggests that the edge-weighted problem is much harder than its node-weighted version.
3sum paths weighted graph subgraph isomorphism cliques