GraphTheory
InducedSubgraph
construct induced subgraph
Calling Sequence
Parameters
Description
Examples
InducedSubgraph(G, S)
G
-
graph
S
set or list of vertices
The InducedSubgraph command returns the subgraph induced by a specified set (or list) of vertices.
To construct a subgraph using a set of edges, use the Subgraph command.
withGraphTheory:
C6≔CycleGraph6
C6≔Graph 1: an undirected graph with 6 vertices and 6 edge(s)
H≔InducedSubgraphC6,1,2,6
H≔Graph 2: an undirected graph with 3 vertices and 2 edge(s)
VerticesH
1,2,6
EdgesH
1,2,1,6
withSpecialGraphs:
P≔PetersenGraph
P≔Graph 3: an undirected graph with 10 vertices and 15 edge(s)
DrawGraphP
H≔InducedSubgraphP,1,2,3,6,7,9
H≔Graph 4: an undirected graph with 6 vertices and 6 edge(s)
DrawGraphH
See Also
DeleteVertex
Subgraph
Download Help Document