Efficient Suboptimal Graph Isomorphism

  • Kaspar Riesen
  • Stefan Fankhauser
  • Horst Bunke
  • Peter Dickinson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5534)


In the field of structural pattern recognition, graphs provide us with a common and powerful way to represent objects. Yet, one of the main drawbacks of graph representation is that the computation of standard graph similarity measures is exponential in the number of involved nodes. Hence, such computations are feasible for small graphs only. The present paper considers the problem of graph isomorphism, i.e. checking two graphs for identity. A novel approach for the efficient computation of graph isomorphism is presented. The proposed algorithm is based on bipartite graph matching by means of Munkres’ algorithm. The algorithmic framework is suboptimal in the sense of possibly rejecting pairs of graphs without making a decision. As an advantage, however, it offers polynomial runtime. In experiments on two TC-15 graph sets we demonstrate substantial speedups of our proposed method over several standard procedures for graph isomorphism, such as Ullmann’s method, the VF2 algorithm, and Nauty. Furthermore, although the computational framework for isomorphism is suboptimal, we show that the proposed algorithm rejects only very few pairs of graphs.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Conte, D., Foggia, P., Sansone, C., Vento, M.: Thirty years of graph matching in pattern recognition. Int. Journal of Pattern Recognition and Artificial Intelligence 18(3), 265–298 (2004)CrossRefGoogle Scholar
  2. 2.
    Ullmann, J.: An algorithm for subgraph isomorphism. Journal of the Association for Computing Machinery 23(1), 31–42 (1976)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Cordella, L.P., Foggia, P., Sansone, C., Vento, M.: An improved algorithm for matching large graphs. In: Proc. 3rd Int. Workshop on Graph Based Representations in Pattern Recognition (2001)Google Scholar
  4. 4.
    Larrosa, J., Valiente, G.: Constraint satisfaction algorithms for graph pattern matching. Mathematical Structures in Computer Science 12(4), 403–422 (2002)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    McKay, B.: Practical graph isomorphism. Congressus Numerantium 30, 45–87 (1981)MathSciNetMATHGoogle Scholar
  6. 6.
    Emms, D., Hancock, E., Wilson, R.: A correspondence measure for graph matching using the discrete quantum walk. In: Escolano, F., Vento, M. (eds.) GbRPR 2007. LNCS, vol. 4538, pp. 81–91. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Messmer, B., Bunke, H.: A decision tree approach to graph and subgraph isomorphism detection. Pattern Recognition 32, 1979–1998 (2008)CrossRefGoogle Scholar
  8. 8.
    Umeyama, S.: An eigendecomposition approach to weighted graph matching problems. IEEE Transactions on Pattern Analysis and Machine Intelligence 10(5), 695–703 (1988)CrossRefMATHGoogle Scholar
  9. 9.
    Garey, M., Johnson, D.: Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman and Co., New York (1979)MATHGoogle Scholar
  10. 10.
    Aho, A., Hopcroft, J., Ullman, J.: The Design and Analysis of Computer Algorithms. Addison Wesley, Reading (1974)MATHGoogle Scholar
  11. 11.
    Hopcroft, J., Wong, J.: Linear time algorithm for isomorphism of planar graphs. In: Proc. 6th Annual ACM Symposium on Theory of Computing, pp. 172–184 (1974)Google Scholar
  12. 12.
    Luks, E.: Isomorphism of graphs of bounded valence can be tested in polynomial time. Journal of Computer and Systems Sciences 25, 42–65 (1982)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Jiang, X., Bunke, H.: Optimal quadratic-time isomorphism of ordered graphs. Pattern Recognition 32(17), 1273–1283 (1999)CrossRefGoogle Scholar
  14. 14.
    Dickinson, P., Bunke, H., Dadej, A., Kraetzl, M.: Matching graphs with unique node labels. Pattern Analysis and Applications 7(3), 243–254 (2004)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Ebeling, C.: Gemini ii: A second generation layout validation tool. In: IEEE International Conference on Computer Aided Design, pp. 322–325 (1988)Google Scholar
  16. 16.
    Bunke, H.: Error correcting graph matching: On the influence of the underlying cost function. IEEE Transactions on Pattern Analysis and Machine Intelligence 21(9), 917–911 (1999)Google Scholar
  17. 17.
    Riesen, K., Bunke, H.: Approximate graph edit distance computation by means of bipartite graph matching. In: Image and Vision Computing (2008) (accepted for publication)Google Scholar
  18. 18.
    Eshera, M., Fu, K.: A graph distance measure for image analysis. IEEE Transactions on Systems, Man, and Cybernetics (Part B) 14(3), 398–408 (1984)CrossRefMATHGoogle Scholar
  19. 19.
    Munkres, J.: Algorithms for the assignment and transportation problems. Journal of the Society for Industrial and Applied Mathematics 5, 32–38 (1957)MathSciNetCrossRefMATHGoogle Scholar
  20. 20.
    Foggia, P., Sansone, C., Vento, M.: A database of graphs for isomorphism and subgraph isomorphism benchmarking. In: Proc. 3rd Int. Workshop on Graph Based Representations in Pattern Recognition, pp. 176–187 (2001)Google Scholar
  21. 21.
    Cordella, L., Foggia, P., Sansone, C., Vento, M.: A (sub)graph isomorphism algorithm for matching large graphs. IEEE Trans. on Pattern Analysis and Machine Intelligence 26(20), 1367–1372 (2004)CrossRefGoogle Scholar
  22. 22.
    Morgan, H.: The generation of a unique machine description for chemical structures-a technique developed at chemical abstracts service. Journal of Chemical Documentation 5(2), 107–113 (1965)CrossRefGoogle Scholar
  23. 23.
    Mahé, P., Ueda, N., Akutsu, T.: Graph kernels for molecular structures – activity relationship analysis with support vector machines. Journal of Chemical Information and Modeling 45(4), 939–951 (2005)CrossRefGoogle Scholar
  24. 24.
    Foggia, P., Sansone, C., Vento, M.: A performance comparison of five algorithms for graph isomorphism. In: Jolion, J., Kropatsch, W., Vento, M. (eds.) Proc. 3rd Int. Workshop on Graph Based Representations in Pattern Recognition, pp. 188–199 (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Kaspar Riesen
    • 1
  • Stefan Fankhauser
    • 1
  • Horst Bunke
    • 1
  • Peter Dickinson
    • 2
  1. 1.Institute of Computer Science and Applied MathematicsUniversity of BernBernSwitzerland
  2. 2.C3I Division, DSTOEdinburghAustralia

Personalised recommendations