To determine the ensemble of secondary structures associated with a nucleotide sequence , we must determine the most stable thermodynamic structure, which is known as the Minimum Free Energy structure. Most often, an isotherma-isobaric ensemble is used, meaning the associated free energy is a Gibbs Free Energy.

Let be a secondary structure on . Decompose into disjoint - cycles , , , . Then the free-energy associated with is given by

This is physical principle is the basis for dynamic programming on RNA secondary structures.