Polynomial Time Subgraph Isomorphism Algorithm for Large and Different Kinds of Graphs

  • Rachna SomkunwarEmail author
  • Vinod M. Vaze
Conference paper
Part of the Smart Innovation, Systems and Technologies book series (SIST, volume 106)


Graphs are used to represent complex structures in pattern recognition and computer vision. In various applications, these complex structures must be classified, recognized, or compared with one another. Except for special classes of graphs, graph matching has in the worst case an exponential complexity; however, there are algorithms that show an acceptable execution time, as long as the graphs are not too large. In this work, we introduce a new polynomial time algorithm for Subgraph Isomorphism, COPG algorithm, efficient for large and different kinds of graphs The Subgraph Isomorphism is used for deciding if there exist a copy of a pattern graph in a target graph. COPG algorithm is based on three phases Clustering, Optimization, and Path Generation. Performance of the new approach is based on different types of graphs, size of graphs, and number of graphs. Dataset and test set contain 10,000 numbers of graphs and subgraphs with 10,000 nodes. It also contains different graphs and subgraphs such as Generalized, M2D, M3D, and M4D. The performance of the new approach is compared with Ullman and VF series algorithms in terms of space and time complexity.


Graphs Pattern matching Subgraph Graph isomorphism Subgraph isomorphism Clustering 


  1. 1.
    Colbourn, C.J.: On testing isomorphism of permutation graphs. Networks 11, 13–21 (1981)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Lueker, G.S., Booth, K.S.: A linear time algorithm for deciding interval graph isomorphism. J. ACM 183–195 (1979)Google Scholar
  3. 3.
    Garey, M.R. Johnson, D.S.: Computers and Intractability: a guide to the theory of NP-completeness. W.H. Freeman and Company (1979)Google Scholar
  4. 4.
    Damaschke, P.: Induced subgraph isomorphism for cographs is NP-complete. In: WG’90. Lecture Notes in Comput. Sciences, vol. 487, pp. 72–78 (1991)Google Scholar
  5. 5.
    Garey, M.R., Johnson, D.S.: Computers and Intractability: a guide to the theory of NP-Completeness. Freeman (1979)Google Scholar
  6. 6.
    Conte, D., Foggia, P., Sansone, C., Vento, M.: Thirty years of graph matching in Pattern Recognition. Int J Pattern Recogn 18(3), 265–298 (2004)CrossRefGoogle Scholar
  7. 7.
    Vento, M.: A long trip in the charming world of graphs for pattern recognition. Pattern Recognit. 1–11 (2014)Google Scholar
  8. 8.
    Foggia, P., Percannella, G., Vento, M.: Graph matching and learning in pattern recognition on the last ten years. Int. J. Pattern Recogn. 28(1) 2014Google Scholar
  9. 9.
    Livi, L., Rizzi, A.: The graph matching problem. Pattern Anal. Appl. 16(3), 253–283 (2013)Google Scholar
  10. 10.
    He, H., Singh, A.: Graphs-At-A-Time: query language and access methods for graph databases. In: Proceedings of the 2008 ACM SIGMOD International, pp. 405–417 (2008)Google Scholar
  11. 11.
    Shang, H., Zhang, Y., Lin, X., Yu, J.X.: Taming verification hardness: An efficient algorithm for testing subgraph isomorphism. Proc. VLDB Endow. 1(1), 364–375 (2008)Google Scholar
  12. 12.
    Zhang, S., Li, S.,Yang, J.: Gaddi: Distance index based subgraph matching in biological networks. In: EDBT, pp. 192–203. ACM (2009)Google Scholar
  13. 13.
    Zhao, P., Han, J.: On graph query optimization in large networks. Proc. VLDB Endow. 3(1–2), 340–351 (2010)Google Scholar
  14. 14.
    Han, W., Lee, J.-h., Lee, J.: Turbo Iso: towards ultrafast and robust subgraph isomorphism search. In: Large Graph Databases, SIGMOD, pp. 337–348 (2013)Google Scholar
  15. 15.
    Ullman, J.R.: An Algorithm for Subgraph Isomorphism, of the Assoc. for Computing. Machinery 23(1), 31–42 (1976)MathSciNetzbMATHGoogle Scholar
  16. 16.
    Haralick, R.M., Elliot, G.L.: Increasing Tree Search Efficiency for Constraint Satisfaction Problems. Artif. Intell. 14, 263–313 (1980)CrossRefGoogle Scholar
  17. 17.
    Kim, W.Y., Kak, A.C.: 3-D Object Recognition Using Bipartite Matching Embedded in Discrete Relaxation, IEEE Trans. Pattern Anal. Mach. Intell. 13, 224–251 (1991)CrossRefGoogle Scholar
  18. 18.
    Falkenhainer, B., Forbus, K.D., Gentner, D.: The Structure-Mapping Engine: Algorithms and Examples. Artif. Intell. 41, 1–63 (1990)CrossRefGoogle Scholar
  19. 19.
    Myaeng, S.H., Lopez-Lopez, A.: ™Conceptual graph matching: A Flexible Algorithm and Experiments. Exp. Theor. Artif. Intell. 4, 107–126 (1992)Google Scholar
  20. 20.
    Blake, R.E.: Partitioning Graph Matching with Constraints. Pattern Recognit. 27(3), 439–446 (1994)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Narayana, G.S, Vasumathi, D.: An attributes similarity-based K-medoids clustering technique in data mining. Arab. J. Sci. Eng. 1–14 (2017)Google Scholar
  22. 22.
    Bhatnagar, V., Ritanjali M., Pradyot R.J.: Comparative performance evaluation of clustering algorithms for grouping manufacturing firms. Arab. J. Sci. Eng. 1–13 2017Google Scholar
  23. 23.
    Cordella, L.P., Foggia, P., Sansone, C., Vento, M.: A (sub)graph isomorphism algorithm for matching large graphs. IEEE Trans. Pattern Anal. Mach. Intell. 26(10), 1367–1372 (2004)CrossRefGoogle Scholar
  24. 24.
    Carletti, V., et al.: Challenging the time complexity of exact subgraph isomorphism for huge and dense graphs with VF3. IEEE Trans. Pattern Anal. Mach. Intell. (2017)Google Scholar
  25. 25.
    Cordella, L.P., Foggia, P., Sansone, C., Vento, M.: An improved algorithm for matching large graphs. In: 3rd IAPR-TC15 Workshop on GBR, pp. 149–159 (2001)Google Scholar

Copyright information

© Springer Nature Singapore Pte Ltd. 2019

Authors and Affiliations

  1. 1.Shri Jagdishprasad Jhabarmal Tibrewala UniversityJhunjhunuIndia

Personalised recommendations