The Graph Automorphism (GA) problem is a well-known and well- studied problem. However, it is not known to be either in P or NP-complete [2, 4]. Here we propose a heuristic to solve the GA problem.
Definition 3.3 : A graph G(V,E) with n vertices and m edges consists of a vertex set V(G)={V1,…,Vn} and an edge set E(G)={E1,…,Em}. Each edge consists of two vertices called its endpoints. (U,V) is an edge with endpoints U and V. A graph is undirected if there is no ”direction” on the edges. A graph is weighted if there are positive integer weights on the edges. The weight of the edge (U,V) is denoted as W((U,V)).
1 2
3 4
1 2
3 4
Aut(G)
(1) Aut(G)
(2)
4 3
2 1
Figure 3.3. An example of graph G and its automorphisms.
Definition 3.4 : An automorphism of graph G is a permutation of V(G) that preserves adjacency [20]. The automorphisms of G is denoted as Aut(G), and the cardinality of this set of automorphisms is denoted as |Aut(G)|.
Example 3.3: An undirected graph G = (V, E) as shown in Fig. 3.3 has V = {1,2,3,4}
and E = {(1,2), (2,3), (3,4)}. Its automorphisms are also shown in Fig. 3.3 which are {1234 ,4321}, and |Aut(G)| = 2.
Definition 3.5 : A graph G is disconnected if we can partition its vertices into at least two nonempty sets, R and S, such that no vertex in R is adjacent to any vertex in S.
That is, G is the disjoint union of the two subgraphs induced by R and S.
Definition 3.6 : For any two sets π1 and π2, its intersection π1∩π2 is a set that contains elements in both sets.
We propose an automorphism representation that is similar to the UPS representation mentioned in Chapter 2.2 to record the automotphisms of a graph G.
Vertices in the same group in this automorphism representation imply that any permutation of these vertices is an automorphism.
Example 3.4: For an automorphism representation π1 = (12)(34). It contains 2! × 2!
automorphisms and they are {1234, 1243, 2134, 2143}. If π2 = (2)(134), it contains 1! ×
3! automorphisms and they are {1234, 1243, 3214, 3241, 4213, 4231}, then π1∩π2 = {1234, 1243}, which can be expressed as (1)(2)(34) in automorphism representation.
Now, there are four steps in finding Aut(G) in our algorithm. Given an undirected graph G with N vertices, the initial automorphism representation is expressed as (123…N).
Figure 3.4. An undirected graph G and its Adj(G).
Step 1(Disjoint Graph - DG): If the graph is composed by t disconnected subgraphs, then the automorphism representation is divided into t groups such that each group corresponds to one subgraph. If the graph exists two or more subgraphs with the same number of vertices, then merge the corresponding subgroups into one.
Since swapping any two vertices coming from disconnected subgroups with different size cannot be an automorphism, we can divide the automorphism representation of G respect to the graph connectivity of different sizes directly.
Example 3.5: Given a graph G as shown in Fig. 3.4(a). The graph G can be divided into three subgraphs. Since the subgraphs induced by vertices 7 and 8, and by vertices 9
and 10 are the same size, therefore, by Step 1, the updated automorphism representation π1= (123456)(789A). That means any vertex exchanged from these two groups cannot be an automorphism.
Definition 3.7 : The Degree Vector (DV) of a graph is a vector that contains each vertex’s degree such that DV[i] = degree of the ith vertex.
Step 2(Degree Vector - DV): Calculate the DV of the graph G. Then group the vertices with the same degrees into one group.
Since exchanging of two vertices with different degrees cannot be an automorphism, we calculate the degree of each vertex and group the vertices with the same degrees into the same group. The grouping results are the automorphisms and are complied with the proposed automorphism representation.
An automorphism has to satisfy the properties described in Step 1 and Step 2, so the updated automorphisms can be obtained from the intersection of automorphisms derived by Step 1 and Step 2.
Example 3.6: From Fig. 3.4(a), the DV of G is 5 3 3 3 3 1 1 1 1 1. By grouping the degree of each vertex, the automorphism representation is π2 = (1)(2345)(6789A).
Thus, the updated automorphism representation by the intersection of Step 1 and Step 2 is π3 = (1)(2345)(6)(789A) which comes from (123456)(789A)∩(1)(2345)(6789A).
Definition 3.8 : The partial vector (PV) of vertex Vi in G is the ith row of adjacency matrix of G, Adj(G).
Definition 3.9 : A single element group (SEG) is a group that contains only one vertex in the automorphism representation.
If updated automorphism representation contains SEG, go to Step 3, otherwise go
to Step 4.
Step 3(Repeated Automorphism - RA): Grouping the partial vector of each SEG vertex and intersect this grouping result with the updated automorphism representation.
If the updated automorphism representation has newly generated SEG, repeat Step 3, otherwise go to Step 4.
Since the automorphisms do not relate to the vertex in SEG, partition the partial vector of SEG vertices can determine the automorphisms. That is, only the neighbors with the same degree to the SEG vertices can be swapped as automorphisms.
Example 3.7: In the updated automorphism representation π3(1)(2345)(6)(789A), there are two vertices, 1 and 6, in SEG, respectively. We have known that in Fig. 3.4(a), vertex 1 is connected to vertices 2, 3 and 4, but is not connected to vertex 5. Thus, vertex 5 is different to vertices 2, 3 and 4. Besides, the weight of (1,2) is different to the weight of (1,3) and (1,4). We can use partial vector V_1 to reduce (2345) to (2)(34)(5).
So as targeting on vertex 1, the partial vector V1 is 0122000000. It can be seen from the 1st row of Adj(G). Its corresponding V1_g, is (156789A)(2)(34). Then π3∩V1_g = (1)(2)(34)(5)(6)(789A) = π4. We find that vertices 2 and 5 are new vertices in SEG.
Therefore, we conduct Step 3 for vertices 2, 5 and 6. As targeting on vertex 6, the partial vector V6 is 0000100000, V6_g is (12346789A)(5). π4∩V6_g = (1)(2)(34)(5)(6)(789A) = π5. As targeting on vertex 5, the partial vector V5 is 0200010000, V5_g is (1345789A)(2)(6). π5∩V5_g = (1)(2)(34)(5)(6)(789A) = π6. As targeting on vertex 2, the partial vectors V2 is 1000200000, V2_g is (1)(5)(2346789A), π6∩V2_g = (1)(2)(34)(5)(6)(789A) = π7. Now, no more new vertex in SEG is generated, then go to Step 4.
Step 4: For the group with more than one element in it under automorphism representation, we observe its corresponding subgraph. If the subgraph is disconnected, give the joinder “ ”on those vertices which are connected, respectively. If the subgraph is a cycle, then give the “ [ ] ” on these vertices. If the subgraph is a complete graph, then give the “ { } ” on these vertices. Observe those vertices in some subgraph under automorphism representation with just two elements in it. Record the partial vector if it really can reduce automorphism representation.
After Step 1 ~ Step 3, we can assure that if more than one vertex in a group, they must have the same degrees and may be the combination of smaller subgraphs with the same number of vertices. Their corresponding subgraphs have three conditions. One is that it is just the combination of smaller subgraphs with same vertices, e.g. G1={(1,2), (3,4)} shown in Fig. 3.5(a). The number of |Aut(G1)| has special solution for it. We will introduce this in the next paragraph. Another condition is that it is a connected subgraph and is also a complete subgraph, e.g. G2={(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)} shown in Fig. 3.5(b). So we can change the order of these vertices in the subgraph and remain identical under automorphism representation. The other condition is that it is a connected graph and it is a cycle shown, e.g. G3={(1,2),(1,3),(2,4),(3,4)} shown in Fig.
3.5(c). The number of |Aut(G3)| has special solution for it. We will also introduce this in the next paragraph. And if there are just two vertices in a subgraph, we have to observe the neighbors of these two vertices. If they have no neighbors in common, then the partial vectors of these two vertices are useful. Otherwise, the partial vectors of these two vertices are useless because these two vertices can be exchanged mutually.
1 2
Figure 3.5. Disjoint graph, complete graph and cycle graph.
Example 3.8: For the updated automorphism representation π7 (1)(2)(34)(5)(6) (789A), there are six groups. Only the 6th group (789A) corresponds to the disconnected subgraph. Observe the vertices 7, 8, 9, and A, vertex 7 is connected with 8 while vertex 9 is connected with A. The group (789A) under automorphism representation now becomes (789A). Thus, the updated automorphism representation π7 is now (1)(2)(3 4)(5)(6) (789A).
After Step 1 ~ Step 3, we can find the Aut(G) and |Aut(G) | can be obtained based
on the updated automorphism representation. For updated automorphism representation )
joinders are shown in the automorphism representation, such as
)
( a
1a
2L a
n1b
1b
2L b
n1L r
1r
2L r
n1 , |Aut(G)| = {(n1!) × (n1!) × ··· × (n1!) × (the number of joinder)!}. For example in Fig. 3.5(a), Aut(G1)={1234, 1243, 2134, 2143, 3412, 4312, 3421, 3421}. |Aut(G1)| = 2! × 2! × 2! = 8. If the braces are shown in the automorphism representation, such as ({a1a2Lan1}), |Aut(G)| = n1!. For example in Fig. 3.5(b), Aut(G2)={1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142, 3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321}.|Aut(G2)| = 4! = 32. If the square brackets are shown in the automorphism representation, such as ([a1a2Lan1]), |Aut(G)| = (n1) × 2. For example in Fig. 3.5(c), Aut(G3)={1234, 1324, 2143, 2413, 3142, 3412, 4231, 4321}. |Aut(G3)| = 4 × 2 = 8. For this example, the updated automorphism representation π7 is (1)(2)(34)(5)(6) (789A).
Thus, |Aut(G)| = 1! × 1! × 2! × 1! × 1! × (2! × 2! × 2!) = 16. We can enumerate these 16 automorphisms explicitly and they are {123456789A, 12345678A9, 123456879A, 12345687A9, 1234569A78, 123456A978, 1234569A87, 123456A987, 12435678 9A, 12435678A9, 124356879A, 12435687A9, 1243569A78, 124356A978, 1243569A87, 124356A987}.