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

Examples

open allclose all

Basic Examples  (2)

Replace individual vertices in the graph:

Replace all vertices in the graph:

Scope  (6)

VertexReplace works with undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

Use rules to specify the graph:

VertexReplace works with large graphs:

Applications  (1)

Create a graph that is isomorphic to the original graph:

Find an isomorphism that maps two graphs:

Highlight and label two graphs according to the mapping:

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:

Wolfram Research (2010), VertexReplace, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexReplace.html (updated 2015).

Text

Wolfram Research (2010), VertexReplace, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexReplace.html (updated 2015).

BibTeX

@misc{reference.wolfram_2021_vertexreplace, author="Wolfram Research", title="{VertexReplace}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexReplace.html}", note=[Accessed: 25-September-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_vertexreplace, organization={Wolfram Research}, title={VertexReplace}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexReplace.html}, note=[Accessed: 25-September-2021 ]}

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