GraphTheory[DeleteVertex] - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/DeleteVertex

GraphTheory[DeleteVertex]

 Calling Sequence DeleteVertex(G, V)

Parameters

 G - graph V - vertex or a list or set of vertices

Description

 • The DeleteVertex command returns a copy of the graph G with the specified vertex, or list of vertices, deleted.  The graph G is not changed. The resulting graph is the subgraph of G induced by the remaining vertices. Any edges adjacent to V are removed.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $G:=\mathrm{CycleGraph}\left(5\right):$
 > $H:=\mathrm{DeleteVertex}\left(G,\left[1,4\right]\right)$
 ${H}{:=}{\mathrm{Graph 2: an undirected unweighted graph with 3 vertices and 1 edge\left(s\right)}}$ (1)
 > $\mathrm{Edges}\left(H\right)$
 $\left\{\left\{{2}{,}{3}\right\}\right\}$ (2)
 > $J:=\mathrm{InducedSubgraph}\left(G,\left\{2,3,5\right\}\right)$
 ${J}{:=}{\mathrm{Graph 3: an undirected unweighted graph with 3 vertices and 1 edge\left(s\right)}}$ (3)
 > $\mathrm{Edges}\left(J\right)$
 $\left\{\left\{{2}{,}{3}\right\}\right\}$ (4)
 > $\mathrm{DeleteVertex}\left(G,6\right)$
 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam