VertexDelete

VertexDelete[g,v]

makes a graph by deleting the vertex ν and all edges connected to v from the graph g.

VertexDelete[g,{v1,v2,}]

deletes a collection of vertices from g.

VertexDelete[g,patt]

deletes all vertices that match the pattern patt.

VertexDelete[{vw,},]

uses rules vw to specify the graph g.

Details

  • VertexDelete[g,v] will delete the vertex v only if it is present in g.
  • VertexDelete works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Examples

open allclose all

Basic Examples  (1)

Delete a vertex from a complete graph:

In[1]:=
Click for copyable input
Out[1]=

Scope  (8)

See Also

VertexAdd  EdgeDelete

Introduced in 2010
(8.0)
| Updated in 2015
(10.3)