# relabelGraph -- applies a vertex invariant based refinement to a graph

## Synopsis

• Usage:
L' = relabelGraph(L, i, a)
L' = relabelGraph(L, i)
L' = relabelGraph L
T = relabelGraph(S, i, a)
T = relabelGraph(S, i)
T = relabelGraph S
H = relabelGraph(G, i, a)
H = relabelGraph(G, i)
H = relabelGraph G
• Inputs:
• L, a list, a list of graphs in various formats
• S, , a graph encoded in either Sparse6 or Graph6 format
• G, an object of class Graph
• i, an integer, a choice of invariant to order by (0 ≤i ≤15, default is 0)
• a, an integer, a non-negative argument passed to nauty, (default is 3)
• Outputs:
• L', a list, a list of graphs isomorphic to S
• T, , a graph isomorphic to S encoded in either Sparse6 or Graph6 format
• H, an object of class Graph, a graph isomorphic to G

## Description

This method applies one of sixteen vertex invariant based refinements to a graph. See the nauty documentation for a more complete description of each and how the argument a is used.

The sixteen vertex invariants are:

• i = 0: none,
• i = 1: twopaths,
• i = 3: triples,
• i = 5: celltrips,
• i = 7: cellquins,
• i = 8: distances(K),
• i = 9: indsets(K),
• i = 10: cliques(K),
• i = 11: cellcliq(K),
• i = 12: cellind(K),
• i = 14: cellfano, and
• i = 15: cellfano2.
 ```i1 : G = graph {{0,1},{1,2},{2,3},{3,4},{0,4}} o1 = Graph{0 => {1, 4}} 1 => {0, 2} 2 => {1, 3} 3 => {2, 4} 4 => {0, 3} o1 : Graph``` ```i2 : relabelGraph G o2 = Graph{0 => {1, 2}} 1 => {0, 3} 2 => {0, 4} 3 => {1, 4} 4 => {2, 3} o2 : Graph```

Note that on most small graphs, all sixteen orderings produce the same result.

• relabelBipartite -- relabels a bipartite graph so all vertices of a given class are contiguous

## Ways to use relabelGraph :

• relabelGraph(Graph)
• relabelGraph(Graph,ZZ)
• relabelGraph(Graph,ZZ,ZZ)
• relabelGraph(List)
• relabelGraph(List,ZZ)
• relabelGraph(List,ZZ,ZZ)
• relabelGraph(String)
• relabelGraph(String,ZZ)
• relabelGraph(String,ZZ,ZZ)