I wrote a Python script which already approximates this, however I would like to know how one can arrive at a purely analytical solution (or at least an analytically derived approximation).

Let us suppose that we have a linear chain of carbon (C) atoms - all covalently bonded with single bonds and no side chains, $N$ carbon (C) atoms long, with hydrogen (H) atoms bonded to each. Now let us suppose that we can randomly substitute the hydrogens (H) for hydroxyl (OH) groups. Here is an example visualised:

A visualisation of the problem described.

Each N-long chain originally has $2N+2$ H-atoms, of which between $0$ to $2N+2$ number can be substituted for OH-groups. The single bonds here can rotate and so assume that the position of an OH-group, i.e. whether the OH is substituting the "top" or "bottom" (or "side", at the ends) H-atom bonded to a C-atom, is irrelevant and does not make molecules distinct. To be very clear, all $3$ example molecules shown below are considered the same in this model:

Image displaying 3 identical configurations, not be confused as unique.

Let us try analysing some scenarios...

For $0$ OH-groups:

It is trivial that there is just $1$ unique molecule possible for each N-chain (simply no H-atoms substituted).

For $1$ OH-group:

We have $\frac{N}{2} $ configurations possible (when $N$ is an even number), as this accounts for the OH-group being bonded to any of the C-atoms, while considering that an OH on the $m^{th}$ C is an equivalent configuration to an OH on the $(N-m+1)^{th}$ C (for $m< \frac{N}{2}$). When $N$ is an odd number, there are $\frac{N}{2}+0.5$ unique configurations and the same logic applies, but for $m< \frac{N}{2} +0.5$.

For $2$ OH-groups:

There should be $N$ sites that a new OH-group can bond to, for each previous $1$ OH-group configuration, however we need to exclude non-unique configurations that pop up (e.g. placing an OH on the $m^{th }$ C of a chain that already has an OH on the $l^{th}$ C gives an equivalent configuration to placing an OH on the $(N-m+1)^{th}$ C of a chain that already has an OH on the $(N-l+1)^{th}$ C). Also any configuration where a middle C-atom had an OH-group (for a case where $N$ is odd), the symmetrical nature would mean that just $\frac{N}{2} +0.5$ configurations from there could possibly be unique.

As we can see, the problem becomes much more complex as higher numbers of OH-groups are added.

Am I missing some clean way to analytically resolve this? I am interested to find an expression for the total number of unique molecules that can be formed by this problem, for any $N$-long chain that is allowed to be substituted with any possible number (ranging from $0$ to $2N+2$) of OH-groups. Ideally I would also like to then use this to derive an expression for the number of unique molecules of $N$ or less C-atoms long.

  • 1
    $\begingroup$ See Polya Enumeration. In particular you need to state more about what permutations of the $2N+2$ positions where $H$ or $OH$ go are allowed as counting as the same configuration. That is $G \subseteq S_{2N+2}$ and it is a subgroup containing the 3 rotations of the last CC bond, the flips, etc. $\endgroup$
    – AHusain
    2 days ago

1 Answer 1


For $N=1$ there are $5$ possibilities as you can substitute anywhere from $0$ to $4$ locations.

For $N=2$ there would be $16$ possibilities if we did not consider end to end flips equivalent. $4$ of these are symmetric on the flip and $12$ are not. The $12$ should be divided by $2$, so there is a total of $10$ possibilities, $4$ symmetric and $6$ asymmetric.

If $N$ is odd and greater than $1$ we can take any chain of $N-1$ carbons, break it in the middle, and insert a carbon with $0$ to $2$ substitutions. This means we will have $3$ times as many possibilities as for $N-1$ with the same mix of symmetric and not.

If $N$ is even and greater than $2$ we can take any chain of $N-2$ carbons, break it in the middle, and insert two carbons. These two carbons have $3$ symmetric possibilities and $3$ asymmetric possibilities. If we put a symmetric pair in a symmetric chain the result is still symmetric, so each symmetric chain of $N-2$ gives $3$ symmetric and $3$ asymmetric chains of $N$. We can insert a symmetric pair in an asymmetric chain in $3$ ways and an asymmetric pair in an asymmetric chain in $6$ ways because the asymmetry of the rest of the chain means the orientations of the central pair are different so each asymmetric chain of $N-2$ gives $9$ asymmetric chains of $N$.

I made a spreadsheet incorporating this. It gives $N$, the number of symmetric chains, the number of asymmetric chains, and the total. I did not find $5,10,30,78$ in OEIS. The total number becomes very close to $\frac 893^N=8\cdot 3^{N-2}$

enter image description here

  • $\begingroup$ Great answer! The numbers you found are also in line with the values I found using the Monte Carlo method in Python. Thanks! $\endgroup$ 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.