to select a canonical label. Conversely, if the automorphism group is large, the procedure will pro duce many discrete partitions, and it will take more effort to select a canonical label. For example, if a graph is completely symmetric then each permutation of the vertices gives an automorphism of the graph. In this case, every partition of the graph is equitable and the individualization and refinement procedure will produce each of the n! possible discrete partitions of the vertex set. Recall the graphs G1 and G2 considered above. The automorphism group of G2 has size 2 whereas the auto morphism group of G1 has size 6. Thus, the individuali zation and refinement procedure produces the following two discrete partitions for G2, and.
On the other hand, the six discrete partitions produced for G1 correspond to those permutations of the vertices Drug_discovery where both v2 and v4 come before the three other vertices v1, v3, and v5. At this point it is common to use a brute force method for finding a canonical partition from among those generated by the individualization and refinement procedure. Each generated partition P of the vertices corresponds to a permutation �� of the vertices. Applying this permutation to the vertices of the graph, we get a new adjacency matrix A for the graph. If there are n vertices in the graph, then A is an n �� n array of 0s and 1s. In fact, A can be considered to be a binary string of length n2. Comparing these strings as binary numbers, the smallest is selected and the corresponding partition is ordained the canonical label.
In general, the individualization and refinement proce dure produces significantly less than n! partitions to be compared as binary strings. This efficiency is achieved because most graphs have small automorphism groups. However, the method fails to significantly reduce the number of partitions that must be compared if the graph has a large automorphism group. For instance, a graph with n vertices containing every possible edge connecting these vertices has a full automorphism group, meaning that every permutation of the vertices is an automorphism. For this graph, and similarly for a graph containing no edges, the individualization and refinement procedure will completely fail to reduce the number of partitions to be compared, every discrete ordered partition will be generated by the procedure.
The Nauty algorithm For highly symmetric graphs, the Nauty algorithm implements a fairly effective strategy to speed up the time taken to find a canonical label. It makes use of the automorphisms of a graph to further reduce the number of partitions produced by the individualization and refinement procedure. We will now give a brief overview of the search tree used in Nauty to explain how Nauty takes advantage of knowledge of automorphisms of a graph. Nauty takes as input a colored graph, the coloring is taken to define a starting partition of the ver tices. Nauty then builds a rooted search tree by comput ing successiv