How to construct a graph H (with the least number of nodes) that has a subgraph that is isomorphic to each graph in a given set?

59 Views Asked by At

Given a finite set of target graphs $\{G_1, G_2, ...\}$ (~20 unique graphs), how to find a graph $H$ (with the lowest number of nodes), that has a subgraph that is isomorphic to each target graph in the set $\{G_1, G_2, ...\}$ ?

Another way of framing it would be to find the minimum common supergraph that contains all target graphs in the set $\{G_1, G_2, ...\}$.

I suppose this is related to the subgraph isomorphism problem, and perhaps the VF2(++) algorithm could be useful here. A poor-mans way of doing it would be to take a brute-force approach, where an overly large fully connected initial graph $H$ (that satisfies the requirement above) is randomly pruned to a smaller size while constraining the pruned graph to be subgraph isomorphic to all graphs in the target set. My guess is that this will be painfully painfully slow as it would require solving an NP-complete problem for each target graph for every randomly pruned permutation of $H$.

I was wondering whether anyone knows a more sophisticated approach. I have full control to smartly construct the graph $H$ so perhaps there are shortcuts? Any pointers to relevant literature and/or terminology would be welcome!