WLJS LogoWLJS Notebook

IsomorphicSubgraphQ

IsomorphicSubgraphQ[g1, g2] yields True if the graph g1 is isomorphic to a subgraph of the graph g2.

This function tests for subgraph isomorphism.

Examples

IsomorphicSubgraphQ[PathGraph[{1, 2, 3}], CompleteGraph[5]]
IsomorphicSubgraphQ[CycleGraph[3], PetersenGraph[]]
IsomorphicSubgraphQ[CompleteGraph[4], CompleteGraph[3]]

*See the official Wolfram Language Reference for more details.

On this page