# Detailed balance of an energy function

I'm having difficulties understanding a problem about the acceptance rules for a given energy landscape.

The Problem

Suppose a system in which the energy is a function of x only: $$e^{-\beta U(x)} = \theta(x)\theta(1-x)$$ where $\theta$ is the Heaviside step function. The question asks to write down the distribution of x in the canonical ensemble for two possible algorithms.

i.Generate a random change x between [-$\delta$,$\delta$]. Accept or reject the new x according to its energy.

ii. Generate a random number $\phi$ between [1,1+$\delta$]. With a probability of 0.5 invert the value of $\phi$ thus obtained. The new value of x is obtained by multiplying x with $\phi$.

a) Derive the correct acceptance/rejection rules for both schemes.

b) What happens when the acceptance rule of method (i) is used in the algorithm of method (ii)?

My approach so far

Starting with detailed balance $$N_i\cdot\alpha_{ij}\cdot acc_{ij} =N_j\cdot\alpha_{ji}\cdot acc_{ji}$$ we can write

$$\frac{acc_{ij}}{acc_{ji}} = \frac{N_j}{N_i}$$ Supposing that $\alpha$, the probability of choosing the state in the first place, is symmetrical. Given that it is a canonical ensemble the probability per site equals

$$P = e^{ \frac{F-E}{kT} }$$ So i guess from this I have to calculate a distribution N depending on the scheme (i or ii). So the probability function can be calculated with

$$\int_a^b p(E)dE$$ I could substitute the energy, but than I wouldn't know what the integration limits would be. Also I have no idea if I'm on the right track, or I am thinking way too complicated. Anyone who could help?

• As a comment, is this potential (finite square well between x=0 and x=1) really what you're trying to study? Are there walls at x=0 or x=1? It seems like there may be a steady flow out to infinity though, I mean, maybe it can stabilize... Mar 2 '16 at 15:28
• its an infinite square well for U(x), right? with walls at x=0 and x=1. Mar 2 '16 at 16:15
• Ah, I see, you take $\ln(0)$. I was thinking $\theta(x) + \theta(1 - x).$ Mar 3 '16 at 21:51

So usually the acceptance criterion for an simulated annealing approach is "accept if $\operatorname{rand}(0,1) < \exp[(U_0 - U_1)/\tau]$," and this will always accept if $U_0 > U_1$ or occasionally accept otherwise. However if your energy goes infinite outside of this range then you get an $e^{-\infty} = 0$ result, and we instead accept with probability 1 any movement that is in the appropriate range $x\in(0,1)$. Those are apparently your acceptance rules.
Now you say that you're having trouble determining what the steady-state probability density $f(x)$ is. We know that $f(x)~dx$ is the probability of observing the particle between $x$ and $x+dx.$ Supposing indeed that we start with density $f(x),$ update with the above, and then obtain $f(x)$ again, we can work out the result. Call the random variable beforehand $Y$ and afterwards $X$.
We generate a $Z$ uniformly between $-\delta$ and $+\delta$, then calculate $X = Y + Z.$ When we want to add variables like this, we have a joint probability $j(y,z)$ that we start with (in this case the events are independent and $j(y,z) = f(y) \cdot u_\delta(z),$ of course) and we derive our new distribution $h(x)~dx$ by summing up all of the $j(y, z)~dy~dz$ which lead to an $X$ between $x$ and $x + dx.$ So $h(x)~dx$ must be equal to $j(y(x, z), z)~\frac{\partial y}{\partial x}~dx~dz,$ and in the summing case, this works out really cleanly to:$$h(x) = \int_{\Omega_z} dz~j(x-z, z).$$ Assuming the uniform distribution we find that $$h(x) = \int_{-\delta}^{\delta} dz~\frac{1}{2\delta}~f(x-z),$$ and we recover $f$ after we throw out all values which are outside $(0, 1)$:$$f(x) = \frac{h(x)~\theta(x)~\theta(1-x)}{\int_0^1 du~h(u)}.$$Solving this equation is what would be necessary to get an explicit probability distribution in closed form. You should in principle be able to get a differential equation for this thing which can possibly be solved for a suitable $f(x),$ and qualitatively it should be roughly-constant in the middle with fringes of size $\delta$ where it drops to 0.