GraphTheory
DeleteVertex
delete vertex from graph
Calling Sequence
Parameters
Description
Examples
DeleteVertex(G, V)
G
-
graph
V
vertex or a list or set of vertices
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.
The next example raises an error because graph only has five vertices.
Error, (in GraphTheory:-DeleteVertex) second argument expected to be a vertex or a list of vertices of the graph
See Also
CycleGraph
Edges
Graph
InducedSubgraph
Download Help Document