# Isomer Count Problem Preview

Early in the first semester of organic chemistry (“orgo”) students are asked to find the structural isomers of a given hydrocarbon. For a small molecule like hexane (six carbons), there are five solutions (see the image below). For eight carbons there are eighteen. Ten has seventy five. But thirty has over four billion. Push it to 100 carbons (hectane) and there are as many isomers as atoms on our planet. Of course there can’t be more isomers than atoms, which suggests that not every isomer is physically possible. But in the realm of mathematical enumerations these details are ignored. Fortunately for orgo students, the problem sets rarely involve more than eight carbons.

With this sort of explosive growth, the counting problem is at least exponential. But is there a formula to predict the exact number?

This turned out to be a hard nut to crack. Arthur Cayley first studied the question in the 1870s and even developed an iterative technique to compute the next value from the previous one. It didn’t fully address the deeper question lurking in this problem, which is how to sift through a collection of objects that are often topologically identical in pursuit of those that are distinct.

This latter question got sorted out by the Hungarian mathematician George Pólya in the 1930s. In doing so, he developed a new system of enumeration that took into account permutations. As to the question of a formula for isomer counts, Pólya also developed an upper bound for these values. It was indeed exponential. But there is no simple expression to spit out this number. Cayley acknowledged this too. It has to be computed recursively, either by hand for low values, or programmatically for larger ones.

It therefore wasn’t until the computer age that the values could be computed for larger hydrocarbons (greater than, say, 20). These programs all rely on the recursive techniques first introduced in a 1931 paper by Henze and Blair and later by Pólya himself. There are now scores of these available on github written in a variety of languages (python, java, C++).

For a deep dive into all of these topics and more read the article below. It’s a truly fascinating problem.