add vertex to graph
vertex or list of vertices
The AddVertex command adds a vertex or vertices to a graph. A new graph is returned which contains the specified set of vertices in addition to the vertices in the original graph G.
G≔Graph 1: an undirected unweighted graph with 5 vertices and 5 edge(s)
Graph 2: an undirected unweighted graph with 7 vertices and 5 edge(s)
Error, (in GraphTheory:-AddVertex) some of the vertices to be added are already present in the graph
Download Help Document
What kind of issue would you like to report? (Optional)