we wan to obtain an estimate for the mean value of an observable :
A crude Monte Carlo procedure is to generate a configuration at random,
calculate and , and the contributions of this configuration to
the sums. This is equivalent to the ``hit and miss'' Monte Carlo
method for evaluating integrals. We have seen that this approach is very
inefficient, because the configurations generated would likely be very
improbable and contribute very little to the sum. Instead, we want to
generate a sample of configurations that are important, i. e.
have large contributions to the sums. This is precisely the equivalent to
``importance sampling''. Hence, we need to generate the configurations
according to a probability distribution. In this case, the most convenient
one is not other than the Boltzmann probability itself
(276). Since we will average over the configurations
generated with this probability, we must use the expression:
The idea of the Monte Carlo algorithm consists in performing a random walk
over the space of configurations. The walker ``hops'' from a configuration
to another using the ``transition probability''
Since we are only interested in the ratio , it is not necessary to
know the normalization constant . Although we have picked this
expression for the transition probability , is not the only choice. It
can be shown that the only requirement is that satisfies the
``detailed balance'' condition:
Another comon choice in the literature is given by:
The pseudocode for a Monte Carlo simulation can be outlined as follows: