VertexContract

VertexContract[g,{v1,v2,}]
contracts a collection of vertices , , into a single vertex of the graph g.

VertexContract[g,{{v1,v2,},}]
contracts several collections of vertices.

DetailsDetails

  • VertexContract is also known as vertex identification.
  • VertexContract[g,{v1,v2,}] creates a new graph from g by removing all edges between and and merging them into the single vertex .
  • VertexContract works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Introduced in 2014
(10.0)