%\input twocolumn
\magnification\magstep1 \nopagenumbers%\parskip=12 pt plus 4pt minus 4pt  
\line{Physics 352 \hfill \today \hfill Handout D}
%\advance \vsize by .6in \advance \voffset by -.3in 
\beginsection Thermal Monte-Carlo
 
The aim of a Monte-Carlo simulation is to represent a many-degree-of-freedom
system in thermal equilibrium at a temperature $T$.  Thus, the probability
$p(c_1)$ that the simulated system is in configuration $c_1$ must have the
Boltzmann probabilities: $p(c_1)/p(c_2) = \exp[\beta (E(c_2)-E(c_1))]$, where
$E(c)$ is the energy of configuration $c$ in units of $kT$.  A Monte-Carlo
simulation consists of a sequence of elementary random ``steps" $n$.  The
probability $p_n(c)$ of some configuration on the $n$-th step can be readily
related to the $p_{n-1}(c')$ of a few other configurations $c'$ at the previous
step: $$p_{n}(c)= \sum_{c'} p_{n-1}(c') q(c', c) ,\eqno(1)
$$
where $q$ is the conditional probability of going to $c$ on the next step, given
that it is now at $c'$.  Since the simulation always goes to {\it some}
configuration on the $n$'th step, the $q$'s evidently satisfy the normalization
condition $1= \sum_{c'} q(c, c')$.

The Monte-Carlo procedure determines these $q$'s.  The problem is how should
the $q$'s be chosen in order that the $p$'s give the Boltzmann distribution for
this system.  After sufficiently many steps, we want the $p_n$ to become
independent of $n$.  Then Eq. 1 becomes
$$p(c)= \sum_{c'} p(c') q(c', c) .\eqno(2)
$$
If these $p$'s have the Boltzmann form, we must have 
$$\exp[-\beta E(c)]= \sum_{c'} \exp[-\beta E(c')] q(c', c) .\eqno(3)
$$

One condition for a stationary $p(c)$ which is unchanged in a step of the process
is  the
``detailed balance"
condition that the average rate for
$c\goesto c'$ is equal to that of the reverse process $c'\goesto c$
\footnote*
{This is the standard meaning of detailed balance.  In previous discussions
we used a specialized meaning that applied to simple cases where all the $p$'s 
are equal at equilibrium.} 
; \ie 
$$p(c) q(c, c')= p(c') q(c', c) .\eqno(4)
$$  
This condition is sufficient to satisfy Eq. 2, as we see by
substituting it on the right hand side:
$$p(c')= \sum_{c} p(c') q(c, c') .\eqno(5)
$$
Now the $p(c')$ on the two sides cancel, and what's left is the normalization
condition.  Thus the equation is satisfied, and the process has a stationary
distribution $p(c)$.  If the stationary distribution is to be the Boltzmann distribution
we must have
$$
q(c, c')=q(c', c) ~p(c')/p(c) = q(c', c) \exp[\beta (E(c)-E(c'))].\eqno(6)
$$

It is usually easy to devise an easy-to-implement $q(c, c')$ for which the {\it only} stationary
distribution is the Boltzmann distribution.  Then any initial probability distribution
becomes the Boltzmann distribution after sufficiently many steps.  
