How can I find all possible isomers of a given molecule?

I attend a course on [combinatorics](https://en.wikipedia.org/wiki/Combinatorics) (mathematics) which contains many examples related to chemistry. Unfortunately, I don't have enough chemistry knowledge to feel comfortable with the examples.


For example, how can I be sure that I have produced all isomers of a given molecule?


The example I am struggling with at the moment is $\ce{C\_nH\_{2n+1}OH}$ for $n = 3$. There are two isomers given:


[![Enter image description here](https://i.stack.imgur.com/TvJ9w.png)](https://i.stack.imgur.com/TvJ9w.png)


How do I know these are all there are?


Why is the molecule with $\ce{OH}$ at the bottom left (bottom of left most $\ce{C}$ atom) not another isomer?




As drawn, there are 8 positions where the *OH* could replace an *H*, but only 3 structurally unique arrangements:


1. Two positions: on the centre-*C* (above or below are a symmetric reflection).
2. Two positions: on the middle of either end-*C* (left or right are a symmetric reflection).
3. Four positions: above or below at either end-*C* (two-way symmetry).


The diagrams for these three configurations can be rotated or reflected to match all possibilities.


To answer the question, one only has to determine how many distinct locations there are. If there were 6 *C* atoms (pentane), the choices would be at an end or at the 1st, 2nd or 3rd position from an end: 4 possibilities.




---


There's a problem with this though, one that mathematicians will be oblivious to, but which chemists will be instinctively aware of.


Anyone not familiar with organic chemistry will observe that the *C* atoms have four arms branching off at 90° angles within a plane, since that's how they are represented in the diagram.


A chemist though will know that *C* atom arms aren't all in a plane; they spread themselves out to be equally separated in 3 dimensions.
The *C* is at the centre of a tetrahedron with one arm extending to each of its four corners.


For instance, a methane molecule, *CH4* would shape itself as a completely symmetrical tetrahedron:


![wikimedia image of methane molecule](https://upload.wikimedia.org/wikipedia/commons/c/cb/Figure_02_03_01f.jpg)


In the given propane molecule, the two *C* atoms at either end have four arms that are symmetrically located in 3 dimensions, again in the form of a tetrahedron.


That means that the 3 attached *H*s are all symmetrically equivalent.
Rather than forming a T-shape, they are actually arranged in a triangle, whose plane is perpendicular to the diagram.
Each of the thee *H* positions are equivalent and indistinguishable.


So, it matters not which of the 3 *H*s at the end gets replaced, in terms of the actual molecule the results will be identical.
By convention though, it is the end location that is always used in the diagram, to keep the diagram as symmetric as possible.


As a further exercise, consider the *C* at the centre of the diagram in the question, whose four arms are attached to two *H*s and two *C*s.
How many distinct ways can these connections be made?
Perhaps surprisingly, the answer is that *all arrangements will be identical*.
Attach one of the *H*s anywhere.
No matter where the second *H* goes, it will be adjacent to the first.
No matter where the two *C*s go, each will be adjacent to both of the *H*s and to the other *C*.


 9

To do so, you need to know in advance the atoms *by type* (carbon, hydrogen, nitrogen, etc.), their number, and their [*valence*](https://en.wikipedia.org/wiki/Valence_(chemistry)). The later states how many bonds an atom may share with an adjacent atom. In your example, you consider hydrogen (only one bond), oxygen (up to two), and carbon (up to four).


You then introduce a constraint *how* these atoms are connected with each other. In the examples above, for example, you seem to use an explicit constraint; in the hydroxyl ($\ce{-OH}$) group oxygen binds to hydrogen, but this ensemble binds to carbon *only* via oxygen. An implicit constraint one may infer from the two illustrations you share is that you do not allow the formation of cycles for non-hydrogen atoms. Instead, you want to have them as chain.


Now to put this into perspective (literally), chemists convened how to draw molecular structures e.g., on paper while these are 3D objects. This is importance because often it does not suffice to know which atom binds to the next atom ([*constitutional isomer*](https://en.wikipedia.org/wiki/Structural_isomer)), but the spatial arrangement around e.g., carbon atoms ([*chirality*](https://en.wikipedia.org/wiki/Chirality), [*stereoisomers*](https://en.wikipedia.org/wiki/Stereoisomerism)). Each of these levels is a potential pitfall for the exhaustive generation of the isomers possible; both for chemists who need training on this as well as for computer programs. Some generator programs (implicitly/explicitly) do not consider all of these levels.


In the examples shown by you, [*molecular symmetry*](https://en.wikipedia.org/wiki/Molecular_symmetry) reduces the number of isomers possible. *On paper*, you might assume that any of the six hydrogen atoms at the two terminal carbon atoms may be replaced by a $\ce{-OH}$ group which already would lead to six isomers. No, this is not the case as they are all symmetry equivalent:


[![enter image description here](https://i.stack.imgur.com/NOE7U.gif)](https://i.stack.imgur.com/NOE7U.gif)


Assume the three carbon atoms - symbolized by dark spheres - as a plane; the hydroxyl group (oxygen symbolized by a red, hydrogen by white spheres) may be once at this level, or above, or below. But the whole molecule (propan-1-ol) may be rotated; the rotation of the very same group binding to $\ce{-OH}$ may be again above, at level, or below of this imaginary plane.


The second structure you drew is a constitutional isomer of the first one, it is propan-2-ol. You might think that it would matter if the hydrogen replaced by $\ce{-OH}$ is above of this level of the three carbon atoms. Again, *because of symmetry*, this is not the case, the two are symmetry equivalent and you have to consider only one isomer:


[![enter image description here](https://i.stack.imgur.com/Jfytd.gif)](https://i.stack.imgur.com/Jfytd.gif)


Thus, if you are set to look for the isomers of alcohols with the sum formula $\ce{C3H8O}$, there are only two isomers in total.


There would be a third isomer, an ether, if one allows for the joining $\ce{CH3CH2-O-CH3}$:


[![enter image description here](https://i.stack.imgur.com/c5Ze9.gif)](https://i.stack.imgur.com/c5Ze9.gif)


 8