FindIsomorphicSubgraph
✖
FindIsomorphicSubgraph
Details and Options

- FindIsomorphicSubgraph is also known as subgraph matching.
- FindIsomorphicSubgraph is typically used to find similar substructures in graphs.
- FindIsomorphicSubgraph gives a list of subgraphs of g1 that are equal to g2 after renaming vertices.
- FindIsomorphicSubgraph gives an empty list if no subgraph can be found.
- FindIsomorphicSubgraph[g1,g2,All] gives all the subgraphs of g1 that are isomorphic to g2.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (7)Survey of the scope of standard use cases
Specification (4)
FindIsomorphicSubgraph works with undirected graphs:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-898nmh


https://wolfram.com/xid/0fohsmw01kcodjbdzfq-is1cya


https://wolfram.com/xid/0fohsmw01kcodjbdzfq-4gv4ef


https://wolfram.com/xid/0fohsmw01kcodjbdzfq-f4y8wy

Enumeration (3)
Find a subgraph that is isomorphic to a graph:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-cvsbaj

Find at most two isomorphic subgraphs:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-j7b3rh

Find all isomorphic subgraphs:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-kewkuy

Applications (2)Sample problems that can be solved with this function
Find a substructure of a chemical structure graph that is isomorphic to the given graph:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-vmbg0r


https://wolfram.com/xid/0fohsmw01kcodjbdzfq-em8rzn

Count the frequency of a motif in a directed family marriage network:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-d6qgb1

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-izjjh9

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-k25tay

Highlight one instance of the motif:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-d78tjw

Properties & Relations (2)Properties of the function, and connections to other functions
Test whether a graph and a subgraph are isomorphic using IsomorphicSubgraphQ:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-f4vgcx


https://wolfram.com/xid/0fohsmw01kcodjbdzfq-fw1rxe


https://wolfram.com/xid/0fohsmw01kcodjbdzfq-b8ah4f

Use FindSubgraphIsomorphism to find a subgraph isomorphism:

https://wolfram.com/xid/0fohsmw01kcodjbdzfq-v3ae5

Wolfram Research (2021), FindIsomorphicSubgraph, Wolfram Language function, https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html.
Text
Wolfram Research (2021), FindIsomorphicSubgraph, Wolfram Language function, https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html.
Wolfram Research (2021), FindIsomorphicSubgraph, Wolfram Language function, https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html.
CMS
Wolfram Language. 2021. "FindIsomorphicSubgraph." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html.
Wolfram Language. 2021. "FindIsomorphicSubgraph." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html.
APA
Wolfram Language. (2021). FindIsomorphicSubgraph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html
Wolfram Language. (2021). FindIsomorphicSubgraph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html
BibTeX
@misc{reference.wolfram_2025_findisomorphicsubgraph, author="Wolfram Research", title="{FindIsomorphicSubgraph}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_findisomorphicsubgraph, organization={Wolfram Research}, title={FindIsomorphicSubgraph}, year={2021}, url={https://reference.wolfram.com/language/ref/FindIsomorphicSubgraph.html}, note=[Accessed: 26-March-2025
]}