Maximum common induced subgraph explained

In graph theory and theoretical computer science, a maximum common induced subgraph of two graphs G and H is a graph that is an induced subgraph of both G and H,and that has as many vertices as possible.

Finding this graph is NP-hard.In the associated decision problem, the input is two graphs G and H and a number k. The problem is to decide whether G and H have a common induced subgraph with at least k vertices. This problem is NP-complete.[1] It is a generalization of the induced subgraph isomorphism problem, which arises when k equals the number of vertices in the smaller of G and H, so that this entire graph must appear as an induced subgraph of the other graph.

Based on hardness of approximation results for the maximum independent set problem, the maximum common induced subgraph problem is also hard to approximate.[2] This implies that, unless P = NP, there is no approximation algorithm that, in polynomial time on

n

-vertex graphs, always finds a solution within a factor of

n1-\epsilon

of optimal, for any

\epsilon>0

.[3]

One possible solution for this problem is to build a modular product graph of G and H.In this graph, the largest clique corresponds to a maximum common induced subgraph of G and H. Therefore, algorithms for finding maximum cliques can be used to find the maximum common induced subgraph.[4] Moreover, a modified maximum-clique algorithm can be used to find a maximum common connected subgraph.

The McSplit algorithm (along with its McSplit↓ variant) is a forward checking algorithm that does not use the clique encoding, but uses a compact data structure to keep track of the vertices in graph H to which each vertex in graph G may be mapped. Both versions of the McSplit algorithm outperform the clique encoding for many graph classes. A more efficient implementation of McSplit is McSplitDAL+PR, which combines a Reinforcement Learning agent with some heuristic scores computed with the PageRank algorithm.[5]

Applications

Maximum common induced subgraph algorithms form the basis for both graph differencing and graph alignment. Graph differencing identifies and highlights differences between two graphs by pinpointing changes, additions, or deletions. Graph alignment involves finding correspondences between the vertices and edges of two graphs to identify similar structures.

Maximum common induced subgraph algorithms have a long tradition in bioinformatics, cheminformatics,[6] [7] pharmacophore mapping,[8] pattern recognition,[9] computer vision, code analysis, compilers, and model checking.

The problem is also particularly useful in software engineering and model-based systems engineering, where software code and engineering models (e.g., Simulink, UML diagrams) are represented as graph data structures. Graph differencing can be used to detect changes between different versions of software code and models for change auditing, debugging, version control and collaborative team development.

See also

Notes and References

  1. A1.4: GT48, pg.202.
  2. .
  3. .
  4. .
  5. Book: Calabrese . Andrea . Cardone . Lorenzo . Licata . Salvatore . Porro . Marco . Quer . Stefano . 2023 . A Web Scraping Algorithm to Improve the Computation of the Maximum Common Subgraph . SCITEPRESS - Science and Technology Publications . 197–206 . 10.5220/0012130800003538 . 978-989-758-665-1. free .
  6. Schietgat . Leander . Ramon . Jan . Bruynooghe . Maurice . 2013-12-01 . A polynomial-time maximum common subgraph algorithm for outerplanar graphs and its application to chemoinformatics . Annals of Mathematics and Artificial Intelligence . en . 69 . 4 . 343–376 . 10.1007/s10472-013-9335-0 . 1573-7470.
  7. Ehrlich . Hans-Christian . Rarey . Matthias . 2011 . Maximum common subgraph isomorphism algorithms and their applications in molecular science: a review . WIREs Computational Molecular Science . en . 1 . 1 . 68–79 . 10.1002/wcms.5 . 1759-0876.
  8. .
  9. Conte . D. . Foggia . P. . Sansone . C. . Vento . M. . 2004 . Thirty Years of Graph Matching in Pattern Recognition . International Journal of Pattern Recognition and Artificial Intelligence . en . 18 . 3 . 265–298 . 10.1142/S0218001404003228 . 0218-0014.