finds a subgraph isomorphism that maps the graph g1 to a subgraph of g2 by renaming vertices.
finds at most n subgraph isomorphisms.
- FindSubgraphIsomorphism is also known as subgraph matching.
- FindSubgraphIsomorphism is typically used to find similarities and substructures in graphs.
- FindSubgraphIsomorphism[g1,g2] gives a list of associations Association[v1->w1,v2->w2,…] where vi are vertices in g1 and wi are vertices in g2.
- FindSubgraphIsomorphism gives an empty list if no isomorphism can be found.
- FindSubgraphIsomorphism[g1,g2,All] gives all the subgraph isomorphisms.
Examplesopen allclose all
Basic Examples (2)
FindSubgraphIsomorphism works with undirected graphs:
Properties & Relations (2)
Test whether a graph and a subgraph are isomorphic using IsomorphicSubgraphQ:
Use FindIsomorphicSubgraph to find a subgraph that is isomorphic to a graph:
Wolfram Research (2021), FindSubgraphIsomorphism, Wolfram Language function, https://reference.wolfram.com/language/ref/FindSubgraphIsomorphism.html.
Wolfram Language. 2021. "FindSubgraphIsomorphism." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindSubgraphIsomorphism.html.
Wolfram Language. (2021). FindSubgraphIsomorphism. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindSubgraphIsomorphism.html