Scott: A Method for Representing Graphs as Rooted Trees for Graph Canonization

  • Nicolas BloyetEmail author
  • Pierre-François Marteau
  • Emmanuel Frénod
Conference paper
Part of the Studies in Computational Intelligence book series (SCI, volume 881)


Graphs increasingly stand out as an essential data structure in the field of data sciences. To study graphs, or sub-graphs, that characterize a set of observations, it is necessary to describe them formally, in order to characterize equivalence relations that make sense in the scope of the considered application domain. Hence we seek to define a canonical graph notation, so that two isomorphic (sub) graphs have the same canonical form. Such notation could subsequently be used to index and retrieve graphs or to embed them efficiently in some metric space. Sequential optimized algorithms solving this problem exist, but do not deal with labeled edges, a situation that occurs in important application domains such as chemistry. We present in this article a new algorithm based on graph rewriting that provides a general and complete solution to the graph canonization problem. Although not reported here, the formal proof of the validity of our algorithm has been established. This claim is clearly supported empirically by our experimentation on synthetic combinatorics as well as natural graphs. Furthermore, our algorithm supports distributed implementations, leading to efficient computing perspectives.


Graph canonization Graph isomorphism Graph rewriting Labeled graph 


  1. 1.
    Arvind, V., Kurur, P.P.: Graph isomorphism is in SPP. In: The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002 Proceedings, pp. 743–750. IEEE (2002)Google Scholar
  2. 2.
    Babai, L.: Graph isomorphism in quasipolynomial time. In: Proceedings of the Forty-Eight Annual ACM Symposium on Theory of Computing, pp. 684–697. ACM (2016)Google Scholar
  3. 3.
    Babai, L., Luks, E.M.: Canonical labeling of graphs. In: Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, pp. 171–183. ACM (1983)Google Scholar
  4. 4.
    Bloyet, N., Marteau, P.-F., Frénod, E.: Étude lexicographique de sous-graphes pour l’élaboration de modèles structures à activité–cas de la chimie organique. In: Extraction et Gestion des Connaissances: Actes de la conférence EGC 2019, vol. 79, p. 3. BoD-Books on Demand (2019)Google Scholar
  5. 5.
    Booth, K.S., Colbourn, C.J: Problems polynomially equivalent to graph isomorphism. Computer Science Department, University (1979)Google Scholar
  6. 6.
    Codenotti, P., Katebi, H., Sakallah, K.A., Markov, I.L.: Conflict analysis and branching heuristics in the search for graph automorphisms. In: 2013 IEEE 25th International Conference on Tools with Artificial Intelligence, pp. 907–914. IEEE (2013)Google Scholar
  7. 7.
    Darga, P.T., Sakallah, K.A., Markov, I.L.: Faster symmetry discovery using sparsity of symmetries. In: Design Automation Conference, 2008. DAC 2008. 45th ACM/IEEE, pp. 149–154. IEEE (2008)Google Scholar
  8. 8.
    Gurevich, Y., Shelah, S.: On finite rigid structures. J. Symbolic Logic 61(2), 549–562 (1996)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Heller, S.R., McNaught, A.D.: The IUPAC international chemical identifier (INCHI). Chem. Int. 31(1), 7 (2009)Google Scholar
  10. 10.
    Hopcroft, J.E., Wong, J.-K.: Linear time algorithm for isomorphism of planar graphs (preliminary report). In: Proceedings of the Sixth Annual ACM Symposium on Theory of Computing, pp. 172–184. ACM (1974)Google Scholar
  11. 11.
    Junttila, T., Kaski, P.: Engineering an efficient canonical labeling tool for large and sparse graphs. In: 2007 Proceedings of the Ninth Workshop on Algorithm Engineering and Experiments (ALENEX), pp. 135–149. SIAM (2007)Google Scholar
  12. 12.
    Junttila, T., Kaski, P.: Conflict propagation and component recursion for canonical labeling. In: International Conference on Theory and Practice of Algorithms in (Computer) Systems, pp. 151–162. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  13. 13.
    Kobler, J., Schöning, U., Torán, J.: The Graph Isomorphism Problem: Its Structural Complexity. Springer, Heidelberg (2012)zbMATHGoogle Scholar
  14. 14.
    López-Presa, J.L., Anta, A.F., Chiroque, L.N.: Conauto-2.0: Fast isomorphism testing and automorphism group computation. arXiv preprint arXiv:1108.1060 (2011)
  15. 15.
    Luks, E.M.: Isomorphism of graphs of bounded valence can be tested in polynomial time. J. Comput. Syst. Sci. 25(1), 42–65 (1982)MathSciNetCrossRefGoogle Scholar
  16. 16.
    McKay, B.D., et al.: Practical graph isomorphism (1981)Google Scholar
  17. 17.
    McKay, B.D., Piperno, A.: Practical graph isomorphism, ii. J. Symbolic Comput. 60, 94–112 (2014)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Neuen, D., Schweitzer, P.: Benchmark graphs for practical graph isomorphism. arXiv preprint arXiv:1705.03686 (2017)
  19. 19.
    Neveu, J.: Arbres et processus de galton-watson. In: Annales de l’IHP Probabilités et statistiques, vol. 22, pp. 199–207 (1986)Google Scholar
  20. 20.
    Piperno, A.: Search space contraction in canonical labeling of graphs. arXiv preprint arXiv:0804.4881 (2008)
  21. 21.
    Schöning, U.: Graph isomorphism is in the low hierarchy. J. Comput. Syst. Sci. 37(3), 312–323 (1988)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Velasco, P.P.P.: Matrix Graph Grammars (2008)Google Scholar
  23. 23.
    Velasco, P.P.P., de Lara, J.: Matrix Approach to Graph Transformation: Matching and Sequences. LNCS, vol. 4178, p. 122 (2006)Google Scholar
  24. 24.
    Weininger, D.: Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules. J. Chem. Inf. Comput. Sci. 28(1), 31–36 (1988)CrossRefGoogle Scholar
  25. 25.
    Zemlyachenko, V.N., Korneenko, N.M., Tyshkevich, R.I.: Graph isomorphism problem. J. Soviet Math. 29(4), 1426–1481 (1985)CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Nicolas Bloyet
    • 1
    • 2
    • 3
    Email author
  • Pierre-François Marteau
    • 1
  • Emmanuel Frénod
    • 2
    • 3
  1. 1.IRISA, Université Bretagne SudVannesFrance
  2. 2.LMBA, Université Bretagne SudVannesFrance
  3. 3.See-d, Parc Innovation Bretagne SudVannesFrance

Personalised recommendations