We wish to calculate the i ∈ [[1, ..., M ]] relative free energies F * i of M thermodynamic states sampled independently, with potential U i . To compute the relative free energies, the system should be sampled according to Boltzmann distribution. We note q i,n the n ∈ [[1, ..., N i ]] configurations sampled from state i. To compute the relative free energies of the M thermodynamic states, the configurations q i,n are combined and considered as samples from the generalized ensemble p i (q) ∝ e -β(U i (q)+b i ) where b i is an unknown biased energy. This biased energy was introduced to adjust the relative weight of state i to be proportional to N i , leading to