 DeleteEdge - Maple Help

GraphTheory

 DeleteEdge
 delete edge from graph Calling Sequence DeleteEdge(G, E, ip) Parameters

 G - undirected graph E - edge, trail, or set of edges ip - (optional) equation of the form inplace=true or false Description

 • The DeleteEdge command deletes one or more edges from an undirected graph. By default, the original graph is changed to a graph missing the specified set of edges. By setting inplace=false the original graph remains unchanged and a new graph missing the specified set of edges is created.
 • If the graph is a weighted graph, then if a weight is also provided (i.e. $\left[\mathrm{edge},\mathrm{weight}\right]$ instead of $\mathrm{edge}$) that weight is subtracted from the edge weight, which will not necessarily remove the edge from the graph. If no weight is provided, the edge is removed regardless of the weight. Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $G≔\mathrm{CycleGraph}\left(4\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected graph with 4 vertices and 4 edge\left(s\right)}}$ (1)
 > $H≔\mathrm{DeleteEdge}\left(G,\left\{1,2\right\},\mathrm{inplace}=\mathrm{false}\right)$
 ${H}{≔}{\mathrm{Graph 2: an undirected graph with 4 vertices and 3 edge\left(s\right)}}$ (2)
 > $\mathrm{Edges}\left(G\right)$
 $\left\{\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{3}\right\}{,}\left\{{3}{,}{4}\right\}\right\}$ (3)
 > $\mathrm{Edges}\left(H\right)$
 $\left\{\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{3}\right\}{,}\left\{{3}{,}{4}\right\}\right\}$ (4)
 > $\mathrm{DeleteEdge}\left(G,\left\{\left\{1,2\right\},\left\{3,4\right\}\right\}\right)$
 ${\mathrm{Graph 1: an undirected graph with 4 vertices and 2 edge\left(s\right)}}$ (5)
 > $\mathrm{Edges}\left(G\right)$
 $\left\{\left\{{1}{,}{4}\right\}{,}\left\{{2}{,}{3}\right\}\right\}$ (6)