An Efficient Algorithm to Count Tree-Like Graphs with a Given Number of Vertices and Self-Loops

Graph enumeration with given constraints is an interesting problem considered to be one of the fundamental problems in graph theory, with many applications in natural sciences and engineering such as bio-informatics and computational chemistry. For any two integers n≥1 and Δ≥0, we propose a method to count all non-isomorphic trees with n vertices, Δ self-loops, and no multi-edges based on dynamic programming. To achieve this goal, we count the number of non-isomorphic rooted trees with n vertices, Δ self-loops and no multi-edges, in O(n2(n+Δ(n+Δ·min{n,Δ}))) time and O(n2(Δ2+1)) space, since every tree can be uniquely viewed as a rooted tree by either regarding its unicentroid as the root, or in the case of bicentroid, by introducing a virtual vertex on the bicentroid and assuming the virtual vertex to be the root. By this result, we get a lower bound and an upper bound on the number of tree-like polymer topologies of chemical compounds with any “cycle rank”.

[1]  G. Pólya,et al.  Combinatorial Enumeration Of Groups, Graphs, And Chemical Compounds , 1988 .

[2]  Horiyama Takashi,et al.  On the Enumeration of Polymer Topologies , 2017 .

[3]  Lorenz C. Blum,et al.  970 million druglike small molecules for virtual screening in the chemical universe database GDB-13. , 2009, Journal of the American Chemical Society.

[4]  Djork-Arné Clevert,et al.  De novo generation of hit-like molecules from gene expression signatures using artificial intelligence , 2020, Nature Communications.

[5]  Hiroshi Nagamochi,et al.  A Novel Method for Inference of Chemical Compounds of Cycle Index Two with Desired Properties Based on Artificial Neural Networks and Integer Programming , 2020, Algorithms.

[6]  Maciej M. Sysło,et al.  Some applications of graph theory to the study of polymer configuration , 1988, Discret. Appl. Math..

[7]  Bruno H. Zimm,et al.  The Dimensions of Chain Molecules Containing Branches and Rings , 1949 .

[8]  H. Oike,et al.  Topological polymer chemistry , 2002 .

[9]  C. Jordan Sur les assemblages de lignes. , 1869 .

[10]  Jean-Loup Faulon,et al.  OMG: Open Molecule Generator , 2012, Journal of Cheminformatics.

[11]  Emma L. Schymanski,et al.  Small Molecule Identification with MOLGEN and Mass Spectrometry , 2013, Metabolites.

[12]  Sang-Yeon Hwang,et al.  Scaffold-based molecular design using graph generative model , 2019, ArXiv.

[13]  T. Akutsu,et al.  A Method for the Inverse QSAR/QSPR Based on Artificial Neural Networks and Mixed Integer Linear Programming , 2020, ICBBB.

[14]  G. Pólya Kombinatorische Anzahlbestimmungen für Gruppen, Graphen und chemische Verbindungen , 1937 .

[15]  A. Kerber,et al.  MOLGEN+, a generator of connectivity isomers and stereoisomers for molecular structure elucidation , 1995 .

[16]  J. Bajorath,et al.  Chemoinformatics: a view of the field and current trends in method development. , 2012, Bioorganic & medicinal chemistry.