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 vertices they are connected to in the original graph g.
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »