Hostname: page-component-77f85d65b8-6c7dr Total loading time: 0 Render date: 2026-03-28T09:28:58.681Z Has data issue: false hasContentIssue false

Counting chemical isomers with multivariate generating functions

Published online by Cambridge University Press:  26 March 2026

Rana Shojaei*
Affiliation:
Helmholtz Institute for Functional Marine Biodiversity (HIFMB), Oldenburg, Germany Alfred Wegener Institute Helmholtz Centre for Polar and Marine Research, Bremerhaven, Germany Carl von Ossietzky University, ICBM, Oldenburg, Germany
Thilo Gross
Affiliation:
Helmholtz Institute for Functional Marine Biodiversity (HIFMB), Oldenburg, Germany Alfred Wegener Institute Helmholtz Centre for Polar and Marine Research, Bremerhaven, Germany Carl von Ossietzky University, ICBM, Oldenburg, Germany
*
Corresponding author: Rana Shojaei; Email: rana321shojaei@gmail.com
Rights & Permissions [Opens in a new window]

Abstract

Counting the number of isomers of a chemical molecule is one of the formative problems of graph theory. However, recent progress has been slow, and the problem has largely been ignored in modern network science. Here we provide an introduction to the mathematics of counting network structures and then use it to derive results for two new classes of molecules. In contrast to previously studied examples, these classes take additional chemical complexity into account and thus require the use of multivariate generating functions. The results illustrate the elegance of counting theory, highlighting it as an important tool that should receive more attention in network science.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BYCreative Common License - NCCreative Common License - SA
This is an Open Access article, distributed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike licence (https://creativecommons.org/licenses/by-nc-sa/4.0/), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the same Creative Commons licence is used to distribute the re-used or adapted article and the original article is properly cited. The written permission of Cambridge University Press or the rights holder(s) must be obtained prior to any commercial use.
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Figure 1. Illustration of different types of isomers. Chemical diagrams illustrate the structure of molecules consisting of hydrogen (H), oxygen (O), and carbon atoms (C). The bonds between these atoms are in the plane of the figure (lines), point toward the reader (filled triangle) or away from the reader (dashed triangle). All carbon atoms have degree 4, but following chemical convention, the links in $-CH_{2}-$ and $-CH_{3}$ are omitted to reduce clutter. Likewise, the link between oxygen and hydrogen is not shown as a bond. The figure illustrates that (a) and (b) are identical structures as they differ only by rotation. Molecule (c) is a stereoisomer of (a) because it is topologically identical but related to (a) by a mirror-symmetry, i.e. (a) cannot be transformed into (c) by rotations alone. Finally (d) is a structural isomer of (a) as it has the same sum formula but a different topology.

Figure 1

Figure 2. Coloring a three-node chain. There are 8 distinguishable colorings, but only 6 if nodes are indistinguishable (I). The labeled graph ($G_1$ in II) has an adjacency matrix that is identical to a graph where the numbers on the end nodes of the chain are exchanged ($G_2$ in II), which reveals that the exchanging of the end nodes is a nontrivial automorphism. However, not every renumbering of the nodes defines an automorphism as the example of $G_3$ shows. The nontrivial automorphism, represented by (2)(13) leads to the term $s_1s_2$ in the counting function, whereas the trivial automorphism, (1)(2)(3), yields a term ${s_1}^3$.

Figure 2

Figure 3. Panels (a)–(d) illustrate all possible unlabeled trees of sizes 3, 5, 7 and 9, where each node has either degree one or degree three. For example, factor 2 in front of $x^7$ in Equation (24) shows that there are two distinct tree structures with 7 nodes (panel (c )). Note that the circle with a black dot at its center in the panels represents the trees’ root.

Figure 3

Figure 4. The representation of the two distinct molecular configurations formed by one hydrogen, one oxygen, and three carbon atoms ($-C_{3}OH$). The structural differences arise due to variations in bonding patterns. Note that the circle with a black dot at its center represents the root of the molecules.

Figure 4

Figure 5. Possible chemical fragments attached to a rooted single bond, a double, and triple bond with the corresponding cycle index and contribution in the generating counting function $A$. Trees $R$, $R'$, and $R^{\prime\prime}$ connect to single, double, and triple bonds, respectively. Some modeling decisions have been made to identify this list of structural building blocks. For example we have decided to exclude cumulene structures where a carbon atom has two double bonds (see text).

Figure 5

Table 1. Coefficients $a_{l,m,n}$ are the number of isomers for a rooted general acyclic compound with $l,m,$ and $n$ carbon, oxygen, and hydrogen atoms

Figure 6

Figure 6. Panels (a), (b), and (c) illustrate the growth of isomers with respect to the number of carbon (constant $m$ and $n$), oxygen (constant $l$ and $n$), and hydrogen (constant $l$ and $m$) atoms, respectively. Note that both axes in figure (a) are plotted on a natural logarithmic scale.

Figure 7

Figure 7. Two cyclic molecular structures. The acyclic molecules $R_i$ are attached to each corner, where the carbon atoms at the corners of the rings are now the roots of these chains. (a) A monocyclic aromatic molecule. The permutation $(R_3)(R_6)(R_1R_5)(R_2R_4)$, for instance, on (a) with cycle index $s_{1}^{2}s_{2}^{2}$ leaves the benzene unchanged. (b) A polycyclic aromatic. The permutation $(R_1R_4)(R_2R_3)(R_5R_8)(R_6R_7)$, for instance, on (b) with cycle index $s_{2}^{4}$ preserves the adjacency matrix of naphthalene.

Figure 8

Table 2. The number of isomers for organic molecules containing one ring (benzene) and two stuck rings (naphthalene) with $l,m,$ and $n$ carbon, oxygen, and hydrogen atoms