# vertexMultiplication

## Synopsis

• Usage:
H = vertexMultiplication (G, v, u)
• Inputs:
• G, an instance of the type Graph,
• u, , u is the new vertex to be added
• v, , v is the vertex whose neighbors become the vertices that u connects to.
• Outputs:
• H, an instance of the type Graph,

## Description

Multiplying the vertex of a graph adds one vertex to the original graph. It also adds several edges, namely, if we are multiplying a vertex v and calling the new vertex u, {u,W} is an edge if and only if {v,w} is an edge.

 i1 : G = completeGraph 5 o1 = Graph{0 => {1, 2, 3, 4}} 1 => {0, 2, 3, 4} 2 => {0, 1, 3, 4} 3 => {0, 1, 2, 4} 4 => {0, 1, 2, 3} o1 : Graph i2 : H = vertexMultiplication(G, 0, 6) o2 = Graph{0 => {1, 2, 3, 4} } 1 => {0, 2, 3, 4, 6} 2 => {0, 1, 3, 4, 6} 3 => {0, 1, 2, 4, 6} 4 => {0, 1, 2, 3, 6} 6 => {1, 2, 3, 4} o2 : Graph

## Ways to use vertexMultiplication :

• "vertexMultiplication(Graph,Thing,Thing)"

## For the programmer

The object vertexMultiplication is .