Number of compounds with the same chemical formula

81 Views Asked by At

Even though this question may not seem apropriate for this site, it is more of a mathematical one than a chemistry one.
Take an example chemical formula C3H4O2. There are many compounds with this formula, but different structure:

enter image description here

But how many structures are there in total? It is probably not hard to calculate by brute force, but for big molecules, thing can get pretty messy.

To translate into the mathematical problem:

Assume a point in the Hilbert space $\mathbb N_0^\infty: \iota = (n_1, n_2, ...)$ such that only finitely many $n_i$s are nonzero. Then, the problem reads: How many graphs are there with $n_0$ vertices of degree 1, $n_2$ vertices of degree 2, etc. (vertices of deg. 1 correspond to hydrogen, degree 2 oxygen, degree 4 carbon...)

Some additional points to consider:
1) What if we allow disconnected graphs?
2) Do you know of some algorithm to list the structures much faster than brute-force search?