GraphTheory - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

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

GraphTheory

 AddVertex

 Calling Sequence AddVertex(G, V)

Parameters

 G - graph V - vertex or list of vertices

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $G≔\mathrm{CycleGraph}\left(5\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 5 vertices and 5 edge\left(s\right)}}$ (1)
 > $\mathrm{AddVertex}\left(G,\left["a","b"\right]\right)$
 ${\mathrm{Graph 2: an undirected unweighted graph with 7 vertices and 5 edge\left(s\right)}}$ (2)
 > $\mathrm{AddVertex}\left(G,4\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