Skip to main content

Subgraph

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

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

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

Subgraph[{v->w,…},…] uses rules v->w to specify the graph g.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.