Subgraph isomorphism problem
In theoretical computer science, the subgraph isomorphism problem is a computational task in which two graphs G and H are given as input, and one must determine whether G contains a subgraph that is isomorphic to H. Subgraph isomorphism is a generalization of both the maximum clique problem and the problem of testing whether a graph contains a Hamiltonian cycle, and is therefore NP-complete.[1] However certain other cases of subgraph isomorphism may be solved in polynomial time.[2]
Sometimes the name subgraph matching is also used for the same problem. This name puts emphasis on finding such a subgraph as opposed to the bare decision problem.
Decision problem and computational complexity
To prove subgraph isomorphism is NP-complete, it must be formulated as a decision problem. The input to the decision problem is a pair of graphs G and H. The answer to the problem is positive if H is isomorphic to a subgraph of G, and negative otherwise.
Formal question:
Let [math]\displaystyle{ G=(V,E) }[/math], [math]\displaystyle{ H=(V^\prime,E^\prime) }[/math] be graphs. Is there a subgraph [math]\displaystyle{ G_0=(V_0,E_0) \mid V_0\subseteq V, E_0\subseteq E\cap(V_0\times V_0) }[/math] such that [math]\displaystyle{ G_0\cong H }[/math]? I. e., does there exist a bijection [math]\displaystyle{ f\colon V_0\rightarrow V^\prime }[/math] such that [math]\displaystyle{ \{\,v_1,v_2\,\} \in E_0 \iff \{\,f(v_1), f(v_2)\,\} \in E^\prime }[/math]?
The proof of subgraph isomorphism being NP-complete is simple and based on reduction of the clique problem, an NP-complete decision problem in which the input is a single graph G and a number k, and the question is whether G contains a complete subgraph with k vertices. To translate this to a subgraph isomorphism problem, simply let H be the complete graph Kk; then the answer to the subgraph isomorphism problem for G and H is equal to the answer to the clique problem for G and k. Since the clique problem is NP-complete, this polynomial-time many-one reduction shows that subgraph isomorphism is also NP-complete.[3]
An alternative reduction from the Hamiltonian cycle problem translates a graph G which is to be tested for Hamiltonicity into the pair of graphs G and H, where H is a cycle having the same number of vertices as G. Because the Hamiltonian cycle problem is NP-complete even for planar graphs, this shows that subgraph isomorphism remains NP-complete even in the planar case.[4]
Subgraph isomorphism is a generalization of the graph isomorphism problem, which asks whether G is isomorphic to H: the answer to the graph isomorphism problem is true if and only if G and H both have the same numbers of vertices and edges and the subgraph isomorphism problem for G and H is true. However the complexity-theoretic status of graph isomorphism remains an open question.
In the context of the Aanderaa–Karp–Rosenberg conjecture on the query complexity of monotone graph properties, (Gröger 1992) showed that any subgraph isomorphism problem has query complexity Ω(n3/2); that is, solving the subgraph isomorphism requires an algorithm to check the presence or absence in the input of Ω(n3/2) different edges in the graph.[5]
Algorithms
(Ullmann 1976) describes a recursive backtracking procedure for solving the subgraph isomorphism problem. Although its running time is, in general, exponential, it takes polynomial time for any fixed choice of H (with a polynomial that depends on the choice of H). When G is a planar graph (or more generally a graph of bounded expansion) and H is fixed, the running time of subgraph isomorphism can be reduced to linear time.[2]
(Ullmann 2010) is a substantial update to the 1976 subgraph isomorphism algorithm paper.
(Cordella 2004) proposed in 2004 another algorithm based on Ullmann's, VF2, which improves the refinement process using different heuristics and uses significantly less memory.
(Bonnici Giugno) proposed a better algorithm, which improves the initial order of the vertices using some heuristics.
The current state of the art solver for moderately-sized, hard instances is the Glasgow Subgraph Solver ((McCreesh Prosser)).[6] This solver adopts a constraint programming approach, using bit-parallel data structures and specialized propagation algorithms for performance. It supports most common variations of the problem and is capable of counting or enumerating solutions as well as deciding whether one exists.
For large graphs, state-of-the art algorithms include CFL-Match and Turboiso, and extensions thereupon such as DAF by (Han 2019).
Applications
As subgraph isomorphism has been applied in the area of cheminformatics to find similarities between chemical compounds from their structural formula; often in this area the term substructure search is used.[7] A query structure is often defined graphically using a structure editor program; SMILES based database systems typically define queries using SMARTS, a SMILES extension.
The closely related problem of counting the number of isomorphic copies of a graph H in a larger graph G has been applied to pattern discovery in databases,[8] the bioinformatics of protein-protein interaction networks,[9] and in exponential random graph methods for mathematically modeling social networks.[10]
(Ohlrich Ebeling) describe an application of subgraph isomorphism in the computer-aided design of electronic circuits. Subgraph matching is also a substep in graph rewriting (the most runtime-intensive), and thus offered by graph rewrite tools.
The problem is also of interest in artificial intelligence, where it is considered part of an array of pattern matching in graphs problems; an extension of subgraph isomorphism known as graph mining is also of interest in that area.[11]
See also
- Frequent subtree mining
- Induced subgraph isomorphism problem
- Maximum common edge subgraph problem
- Maximum common subgraph isomorphism problem
Notes
- ↑ The original (Cook 1971) paper that proves the Cook–Levin theorem already showed subgraph isomorphism to be NP-complete, using a reduction from 3-SAT involving cliques.
- ↑ 2.0 2.1 (Eppstein 1999); (Nešetřil Ossona de Mendez)
- ↑ Wegener, Ingo (2005), Complexity Theory: Exploring the Limits of Efficient Algorithms, Springer, p. 81, ISBN 9783540210450, https://books.google.com/books?id=1fo7_KoFUPsC&pg=PA81.
- ↑ de la Higuera, Colin; Janodet, Jean-Christophe; Samuel, Émilie; Damiand, Guillaume; Solnon, Christine (2013), "Polynomial algorithms for open plane graph and subgraph isomorphisms", Theoretical Computer Science 498: 76–99, doi:10.1016/j.tcs.2013.05.026, https://www.ibisc.univ-evry.fr/~janodet/pub/hjsds13.pdf, "It is known since the mid-70’s that the isomorphism problem is solvable in polynomial time for plane graphs. However, it has also been noted that the subisomorphism problem is still N P-complete, in particular because the Hamiltonian cycle problem is NP-complete for planar graphs."
- ↑ Here Ω invokes Big Omega notation.
- ↑ For an experimental evaluation, see (Solnon 2019).
- ↑ (Ullmann 1976)
- ↑ (Kuramochi Karypis).
- ↑ (Pržulj Corneil).
- ↑ (Snijders Pattison).
- ↑ http://www.aaai.org/Papers/Symposia/Fall/2006/FS-06-02/FS06-02-007.pdf; expanded version at https://e-reports-ext.llnl.gov/pdf/332302.pdf
References
- Cook, S. A. (1971), "The complexity of theorem-proving procedures", Proc. 3rd ACM Symposium on Theory of Computing, pp. 151–158, doi:10.1145/800157.805047, http://4mhz.de/cook.html.
- Eppstein, David (1999), "Subgraph isomorphism in planar graphs and related problems", Journal of Graph Algorithms and Applications 3 (3): 1–27, doi:10.7155/jgaa.00014, http://www.cs.brown.edu/publications/jgaa/accepted/99/Eppstein99.3.3.pdf.
- Garey, Michael R.; Johnson, David S. (1979), Computers and Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman, ISBN 978-0-7167-1045-5. A1.4: GT48, pg.202.
- Gröger, Hans Dietmar (1992), "On the randomized complexity of monotone graph properties", Acta Cybernetica 10 (3): 119–127, http://www.inf.u-szeged.hu/actacybernetica/edb/vol10n3/pdf/Groger_1992_ActaCybernetica.pdf.
- Han, Myoungji; Kim, Hyunjoon; Gu, Geonmo; Park, Kunsoo; Han, Wookshin (2019), "Efficient Subgraph Matching: Harmonizing Dynamic Programming, Adaptive Matching Order, and Failing Set Together", SIGMOD, doi:10.1145/3299869.3319880
- Kuramochi, Michihiro; Karypis, George (2001), "Frequent subgraph discovery", 1st IEEE International Conference on Data Mining, p. 313, doi:10.1109/ICDM.2001.989534, ISBN 978-0-7695-1119-1.
- Ohlrich, Miles; Ebeling, Carl; Ginting, Eka; Sather, Lisa (1993), "SubGemini: identifying subcircuits using a fast subgraph isomorphism algorithm", Proceedings of the 30th international Design Automation Conference, pp. 31–37, doi:10.1145/157485.164556, ISBN 978-0-89791-577-9.
- "18.3 The subgraph isomorphism problem and Boolean queries", Sparsity: Graphs, Structures, and Algorithms, Algorithms and Combinatorics, 28, Springer, 2012, pp. 400–401, doi:10.1007/978-3-642-27875-4, ISBN 978-3-642-27874-7.
- Pržulj, N.; Corneil, D. G.; Jurisica, I. (2006), "Efficient estimation of graphlet frequency distributions in protein–protein interaction networks", Bioinformatics 22 (8): 974–980, doi:10.1093/bioinformatics/btl030, PMID 16452112.
- Snijders, T. A. B.; Pattison, P. E.; Robins, G.; Handcock, M. S. (2006), "New specifications for exponential random graph models", Sociological Methodology 36 (1): 99–153, doi:10.1111/j.1467-9531.2006.00176.x.
- Ullmann, Julian R. (1976), "An algorithm for subgraph isomorphism", Journal of the ACM 23 (1): 31–42, doi:10.1145/321921.321925.
- Jamil, Hasan (2011), "Computing Subgraph Isomorphic Queries using Structural Unification and Minimum Graph Structures", 26th ACM Symposium on Applied Computing, pp. 1058–1063.
- Ullmann, Julian R. (2010), "Bit-vector algorithms for binary constraint satisfaction and subgraph isomorphism", Journal of Experimental Algorithmics 15: 1.1, doi:10.1145/1671970.1921702.
- Cordella, Luigi P. (2004), "A (sub) graph isomorphism algorithm for matching large graphs", IEEE Transactions on Pattern Analysis and Machine Intelligence 26 (10): 1367–1372, doi:10.1109/tpami.2004.75, PMID 15641723
- Bonnici, V.; Giugno, R. (2013), "A subgraph isomorphism algorithm and its application to biochemical data", BMC Bioinformatics 14(Suppl7) (13): S13, doi:10.1186/1471-2105-14-s7-s13, PMID 23815292
- Carletti, V.; Foggia, P.; Saggese, A.; Vento, M. (2018), "Challenging the time complexity of exact subgraph isomorphism for huge and dense graphs with VF3", IEEE Transactions on Pattern Analysis and Machine Intelligence 40 (4): 804–818, doi:10.1109/TPAMI.2017.2696940, PMID 28436848
- Solnon, Christine (2019), "Experimental Evaluation of Subgraph Isomorphism Solvers", Graph-Based Representations in Pattern Recognition - 12th IAPR-TC-15 International Workshop, GbRPR 2019, Tours, France, June 19-21, 2019, Proceedings, Lecture Notes in Computer Science, 11510, Springer, pp. 1–13, doi:10.1007/978-3-030-20081-7_1, ISBN 978-3-030-20080-0, https://hal.archives-ouvertes.fr/hal-02086499/file/paper.pdf
- McCreesh, Ciaran; Prosser, Patrick; Trimble, James (2020), "The Glasgow Subgraph Solver: Using Constraint Programming to Tackle Hard Subgraph Isomorphism Problem Variants", Graph Transformation - 13th International Conference, ICGT 2020, Held as Part of STAF 2020, Bergen, Norway, June 25-26, 2020, Proceedings, Lecture Notes in Computer Science, 12150, Springer, pp. 316–324, doi:10.1007/978-3-030-51372-6_19, ISBN 978-3-030-51371-9
Original source: https://en.wikipedia.org/wiki/Subgraph isomorphism problem.
Read more |