How do the molecules know the future? How do they proceed to form “Most Stable” compound?

I'm tutoring few students for Chemistry. During the course, I many times use the phrase "Out of these possibilities this one is stable. So it is formed". I get questions like, "How do the molecules know?"

Honestly I don't know. How do the molecules know the future? How do they proceed to form "Most Stable" compound?

-

Chemical reactions occur because the thermal energy in a substance makes molecules bump into each other, and each time they bump into each other there is some chance for a reaction to take place. This is an oversimplified model, but it suffices to get some intuition for what's going on.

The molecules of course do not "know" that some configuration is more stable than others. What happens is that the molecules react randomly, again and again; they take a sort of random walk through the available configurations. Every now and then, a molecule will purely randomly find its way into the stable state. Once it's there, it's "stuck" - it has a much smaller chance of getting out of the stable state. That's more or less what it means for a state to be stable.

Over time, more and more molecules will find their way into the stable state and get stuck, so the result looks as if the molecules "knew" which state to go to and just went straight there. But actually they only got there through the process of randomly bouncing around the configuration space, plus the stable state acting as a trap that molecules can enter but not (as easily) leave.

-
This is a good answer, but one thing to add. The random action of molecules works so well because there are usually a huge number of them interacting, and thus the Law of Large Numbers from probability theory works extremely well. For example, one mole of any molecule involves over 600 sextillion molecules (that's 600 with 21 additional zeros after it). Even if trillions of molecules fail to react, this is insignificant compared to sextillions of molecules. So yes, randomness is a great reason why molecules don't need to "know the future". – trb456 Jan 22 '13 at 2:06

Clearly, molecules are not in any sense volitional agents. They're simply subject to the basic and immutable laws of thermodynamics, the second of which states that any isolated system always spontaneously develops toward a state of equilibrium in which entropy (which can be informally described as "disorder" or "randomness," meaning thermal energy distributed in such a way that it cannot be used to perform useful work) is maximized. Increased stability is really another term for the minimization of free energy, i.e., energy available to perform useful work. All irreversible spontaneous chemical reactions are ones in which the free energy change is negative, either because the chemical reagents involved experience an increase in entropy, or because the thermal energy released by the reaction sufficiently increases the entropy of the surroundings. The basic, simplified equation for describing this situation is:

$$\ce{\Delta G\ =\ \Delta H\ -\ T\Delta S}$$

Where $\small\ce{\Delta G}$ is the change in free energy, $\small\ce{\Delta H}$ is enthalpy (change in heat energy), $\small\ce{T}$ is absolute temperature, and $\small\ce{\Delta S}$ is the change in entropy. If $\small\ce{\Delta G}$ is negative for a particular reaction at a given temperature, the reaction will proceed spontaneously. In essence, the entire universe is evolving toward a state in which entropy is maximized and free energy is minimized, and only chemical reactions which contribute to that phenomenon can spontaneously take place.

-
If I understood you correctly, what you are saying is that reaction proceeds in that direction, which reduces free energy. This is Second Law of thermodynamics. But "Law" is an action/process. Its not the cause. right? I feel my question is still unanswered, How does the reactants know that going in a particular direction reduces $\Delta G$? – claws Jan 21 '13 at 16:27
Well, it's a law because it's been empirically demonstrated and mathematically determined to be the fundamental, underlying force at work in driving reactions in a particular direction. The reactants cannot "know" anything, they don't have any sort of intentional drive, they're simply at the mercy of probability and thermodynamic imperatives. There's really no deeper meaning to be discovered here, at least as far as chemistry is concerned. For that, you can look to metaphysics. The laws of thermodynamics are axiomatic, they're first principles, so there's no deeper meaning to search for here. – Greg E. Jan 22 '13 at 3:21
To expand: when you have molecules constantly in motion, colliding with great frequency and in very large numbers, then it becomes statistically inevitable that they will form bonds (and break others). However, only certain combinations yield products that are stable (i.e., lower in free energy), and these are the combinations that are observed to exist with at least some degree of persistence. Still, there's no way to answer the question without recourse to principles of quantum mechanics, probability, thermodynamics, and reaction kinetics. This is simply the nature of our universe. – Greg E. Jan 22 '13 at 3:30