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:

Introduced in 2010
 (8.0)
 |
Updated in 2014
 (10.0)
2015
 (10.3)