Subgraph

Subgraph[g,{v1,v2,}]
gives the subgraph of the graph g generated by the vertices .

Subgraph[g,{e1,e2,}]
gives the subgraph generated by the edges .

Subgraph[g,patt]
gives the subgraph generated by the vertices and edges that match the pattern patt.

Details and OptionsDetails and Options

  • The subgraph generated by the vertices includes the vertices and all edges connecting them in the original graph g.
  • The subgraph generated by the edges includes the edges and all edges connecting vertices of in the original graph g.
  • Subgraph works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Introduced in 2010
(8.0)
| Updated in 2014
(10.0)