VertexReplace
VertexReplace[g,{v1w1,v2w2,…}]
replaces each vertex vi in the graph g by wi.
VertexReplace[{vw,…},…]
uses rules vw to specify the graph g.
Details and Options
- VertexReplace is also known as vertex substitution.
- VertexReplace effectively uses Replace for each vertex in the VertexList.
- VertexReplace works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open allclose allScope (6)
VertexReplace works with undirected graphs:
Use rules to specify the graph:
VertexReplace works with large graphs:
Applications (1)
Properties & Relations (5)
The graph created by replacing vertices has the same number of vertices as the original graph:
The graph created by replacing vertices has the same number of edges as the original graph:
The graph created by replacing vertices is isomorphic to the original graph:
IndexGraph can be implemented using VertexReplace:
The graph created by replacing vertices has the same adjacency matrix as the original graph:
Text
Wolfram Research (2010), VertexReplace, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexReplace.html (updated 2015).
CMS
Wolfram Language. 2010. "VertexReplace." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexReplace.html.
APA
Wolfram Language. (2010). VertexReplace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexReplace.html