Journal of Information, Control and Management Systems, Vol. 4, (2006), No. 1 3 AN ALGEBRAIC APPROACH TO GRAPH ISOMORPHISM TESTING Peter Czimmermann Faculty of Management science and Informatics University of Zilina e-mail: [email protected] Abstract We deal with a possible improvement of a certain polynomial algorithm for the graph isomorphism problem. The local complements of the graph are used in this improvement. Keywords: Graph isomorphism, local complements, polynomial algorithm. 1 INTRODUCTION The graph isomorphism problem is famous, still unsolved problem. In this work we study a certain improvement of the algorithm presented in [?, ?]. We will call it a walk algorithm. Two graphs G1 = (V1 ; E1 ), G2 = (V2 ; E2 ) are isomorphic if there is an bijection f : V (G1 ) !V (G2 ) such that 8u; v 2 V (G1 ) the edge fu; vg 2 E (G1 ) if and only if the edge ff (u); f (v )g 2 E (G2 ) [?]. If two graphs G1 , G2 are isomorphic, we denote it by G1 = G2 . The graph isomorphism problem (GI) is the problem to decide if two given graphs are isomorphic or not. Any polynomial algorithm is not known for solving GI and it is not known if GI is NP -complete problem. As we mentioned above, in [?] there is studied the following algorithm: Let the graphs G and H with their adjacency matrices A = (aij ) and B = (bij ) be given. Vertices of G will be denoted v1 ; : : : ; vn , vertices of H u1 ; : : : ; un . Let us consider the sequence sij (rij ) which k-th element is the number of walks of length k (k ) (k ) between vertices vi and vj in G (ui and uj in H ): sij = faij gqk=1 (rij = fbij gqk=1 ) (k ) - where aij is the element of the matrix Ak and q is the number of distinct non-zero eigenvalues of graphs G and H (q 2n). We can assign to every vertex the set of such sequences that corresponds to given vertex as follows: vi ! Vi = fsi1 ; si2 ; : : : ; sin g 4 An Algebraic Approach to Graph Isomorphism Testing and ui ! Ui 2 basic parts: = fri ; ri ; : : : ; ring for i = 1; : : : ; n. The suggested algorithm contains 1 2 1. Generating sets V1 ; : : : ; Vn and U1 ; : : : ; Un . 2. Finding a bijection f : V (G1 ) !V (G2 ) for which the following condition holds: if uj = f (vi ) then Vi = Uj and sii = rjj . If the bijection f exists for graphs G1 , G2 and uj = f (vi ) then it will be denote by G1 w G2 , vi w uj . Obviously graphs for which the mentioned bijection does not exist are not isomorphic. It is shown in [?] that the complexity of the algorithm is O(n5 ). Unfortunately pairs of nonisomorphic graphs for which algorithm fails have been found. The graphs that cause difficulties are for example strongly regular graphs. Remark. A graph is called strongly regular with parameters (n; k; ; ) if it contains n vertices, every vertex has degree k , every pair of adjacent vertices has common neighbours and every pair of distinct nonadjacent vertices has common neighbours. Two nonisomorphic strongly regular graphs with parameters (16; 6; 2; 2) are the smallest discovered graphs for which our algorithm fails and we can find these graphs in [?]. 2 RECONSTRUCTION AND LOCAL COMPLEMENTS Our goal is to find such polynomial improvement of the mentioned algorithm which will be more succesful in deciding of nonisomorphic strongly regular graphs with the same parameters. The question of reconstruction of algebraic or combinatorial structures can play an iteresting role in our work. Let us define this notion [?]: Let C , D be two Brandt grupoids and F :C !D a functor. Hence X = Y im plies F (X ) = F (Y ). We call F (weakly) reconstructible if the converse also holds: F (X ) = F (Y ) implies X = Y . We also say that the object X is reconstructible from F ( X ). Remark. A Brandt grupoid is a category in which all arrows (morphisms) are isomorphisms [?]. See also [?] for the exact definitions of the functor, the category and the isomorphism in category. Let G = (V (G); E (G)) be a graph and u 2 V (G). The local complement u (G) of G at u [?] is the graph with the same vertex set as G such that: 1. If v and w are distinct neighbours of u in and only if they are not adjacent in G. G, then they are adjacent in u (G) if Journal of Information, Control and Management Systems, Vol. 4, (2006), No. 1 5 2. If v and w are distinct vertices of G, and not both neighbours of u, then they are adjacent in u (G) if and only if they are adjacent in X . Now we are able to define the deck of local complements of the graph. Let the graph G = (V (G); E (G)) with the vertex set V (G) = fv1 ; : : : ; vn g be given. The set of its local complements Dlc (G) = fvi (G)j8vi 2 V (G)g together with the mappings gvi : V (vi (G)) ! f0; 1g ,where gvi (vj ) = 1 0 if vj = vi otherwise will be called the deck of local complements. We say that two decks of local complements Dlc (G), Dlc (H ) (where V (H ) = fu1 ; : : : ; un g) are isomorphic if there is a bijection f : V (G) ! V (H ) such that for 8i 2 f1; : : : ; ng vi (G) = f (vi ) (H ) and gvi (vi ) = gf (vi ) (f (vi )) = 1. We call the bijection f an isomorphism from Dlc (G) to Dlc (H ).It is not hard to show that the class of all decks of local complements with all isomorphisms between the decks forms a category - a Brandt grupoid. We will denote this category by Dlci . Let us consider the category Grai of all graphs in which every arrow is an isomorphism. There is a natural functor F : Grai ! Dlci such that F (G) = Dlc (G) for every graph G. We show that F is reconstructible. Theorem 1. Every graph is uniquely reconstructible from its deck of local complements. Proof. Let the deck of local complements D be given. Let us take some graph H from D. There is an unique vertex v in H such that g(v) = 1. Let N (v) be the subgraph of H induced by neighbours of v. Then we can form the graph G from H by replacing the edges of N (v ) with the edges of its complement N (v ). The graph G is given uniquely up to isomorphism and have to be the preimage of the deck D. 3 IMPROVED ALGORITHM The basic idea of the improvement is in replacing the SRG by their local complements - we can use the fact that above mentioned functor F is reconstructible. Let G, H be two SRG with the same parameters and with local complements Dlc (G) = fv (G); : : : ; vn (G)g, Dlc(H ) = fu (H ); : : : ; un (H )g. We try to find bijection ' : V (G) !V (H ), for which vi (G) w u' i (H ) and vi w u'(i) (where i = 1; : : : ; n). The mentioned bijection does not ensure that Dlc (G) and Dlc (H ) are isomorphic. But if such bijection does not exist, it is obvious that Dlc (G) Dlc (H ) and also G H . The complexity of this improvement of thewalk algorithm is O(n7 ), because we need to repeat the walk-algorithm at most n+1 times. This number of steps 2 6 An Algebraic Approach to Graph Isomorphism Testing is too high from the practical view but the results of testing on SRG are very interesting. M.Kaukič programmed this algorithm in the language Python which seems to be very convenient for such type of computation (more about using Python in mathematics can be found in [?, ?]). We used for the testing the databases of all known SRG up to 64 vertices from the web pages [?, ?]. The improved version of the walk algorithm was succesful in distinguishing between all SRG from this database. Space constraints make us omit the details of the testing but they will be published soon in [?]. The basic question is: Will be the improved walk-algorithm succesful also for SRGs with more than 64 vertices? It was shown in [?, ?] that the number of steps of the walk algorithm (and also its successfulness) depends on the number of distinct nonzero eigenvalues of tested graphs. Therefore it is important to investigate how many distinct nonzero eigenvalues have the local complements of SRGs. 4 CONCLUSION The definition of the improved walk-algorithm with the help of categories seems to be cumbersome and unnecessary. However it provides us a different approach to graph isomorphism problem. The category Dlci can be replaced by another convenient category for which the condition of reconstruction holds. We can also study this improvement for other algorithms, for example McKay’s algorithm ”Nauty” [?] or WeisfeilerLehman method [?]. Acknowledgement This paper is supported by the grant FRI 6/2006 REFERENCES [1] L. Babai: Automorphism groups, Isomorphism, Reconstruction, Chapter 27 in Handbook of Combinatorics, editors R.L.Graham, M.Grötschel, L.Lovasz, Elsevier Science B.V., 1995, ISBN 0-444-88002-X [2] P. Czimmermann: Návrh algoritmu na hľadanie izomorfizmu grafov, Zbornı́k 6.vedeckej konferencie doktorandov, Nitra, ISBN 80-8050-813-5, 2005, (in Slovak) [3] P. Czimmermann: On Certain Algorithm for Graph Isomorphism Problem, Journal of Information, Control and Management Systems, University of Žilina, Vol.3, No.1, ISSN 1336-1716, 2005 [4] Ch. Godsil, G. Royle: Algebraic Graph Theory, Springer-Verlag, 2001, ISBN 0387-95220-9 Journal of Information, Control and Management Systems, Vol. 4, (2006), No. 1 7 [5] F. Harary: Graph Theory, Reading(Mass.), Addison-Wesley, 1969 [6] M. Kaukič: Numerical Analysis with Python, Proc. of II. International Conference APLIMAT, 2003 [7] M. Kaukič: Open Source Software Resources for Numerical Analysis Teaching, International Journal for Mathematics Teaching and Learning, 2005, ISSN 14730111 [8] M. Kaukič: Algorithmic Aspects of Algebraic Methods for Graph Isomorphism Testing, Studies of the University of Žilina, Mathematical Series, vol. 21, 2006, (to appear) [9] B. McKay: Practical graph isomorphism, Congressus Numerantium, vol.30, pp. 45-87, 1981 [10] B.C. Pierce: Basic Category Theory for Computer Scientists, The MIT Press, 1991, ISBN 0-262-66071-7 [11] T. Spence: Strongly Regular Graphs on at most 64 vertices, http://www.maths.gla.ac.uk/˜es [12] SRG database on http://cs.anu.edu.au/˜bdm/data/graphs.html [13] R. Weisfeiler: On Construction and Identification of Graphs, Lecture Notes in Mathematics, vol.556, Springer, Berlin, 1976
© Copyright 2026 Paperzz