Random Walk/Diffusion: 2.1 Langevin Equation
Random Walk/Diffusion: 2.1 Langevin Equation
RANDOM WALK/DIFFUSION
Because the random walk and its continuum diffusion limit underlie so many fundamental processes in
non-equilibrium statistical physics, we give a brief introduction to this central topic. There are several
complementary ways to describe random walks and diffusion, each with their own advantages.
15
16 CHAPTER 2. RANDOM WALK/DIFFUSION
One of the advantages of the Langevin equation description is that average values of the moments of the
position can be obtained quite simply. Thus formally integrating Eq. (2.1), we obtain
Z t
x(t) = (t ) dt . (2.3)
0
Because h(t)i = 0, then hx(t)i = 0. However, the mean-square displacement is non-trivial. Formally,
Z tZ t
2
hx(t) i = h(t )(t )i dt dt . (2.4)
0 0
Using h(t)(t )i = 2D(tt ), it immediately follows that hx(t)2 i = 2Dt. Thus we recover the classical result
that the mean-square displacement grows linearly in time. Furthermore, we can identify D as the diffusion
coefficient. The dependence of the mean-square displacement can also be obtained by dimensional R analysis
of the Langevin equation. Because the delta function (t) has units p of 1/t (since the integral (t) dt = 1),
the statementh(t)(t )i = 2D(t t ) means that has the units D/t. Thus from Eq. (2.3), x(t) must
have units of Dt.
The Langevin equation has the great advantage of simplicity. With a bit more work, it is possible to
determine higher moments of the position. Furthermore there is a standard prescription to determine the
underlying and more fundamental probability distribution of positions. This prescription involves writing
a continuum Fokker-Planck equation for the evolution of this probability distribution. The Fokker-Planck
equation is in the form of a convection-diffusion equation, namely, the diffusion equation augmented by a
term that accounts for a global bias in the stochastic motion. The coefficients in this Fokker-Planck equation
are directly related to the parameters in the original Langevin equation. The Fokker-Planck equation can
be naturally viewed as the continuum limit of the master equation, which represents perhaps the most
fundamental way to describe a stochastic process. We will not pursue this conventional approach because
we are generally more interested in developing direct approaches to write the master equation.
P (x, N + 1) = p P (x 1, N ) + q P (x + 1, N ). (2.5)
Because of translational invariance in both space and time, it is expedient to solve this equation by transform
techniques. One strategy is to Fourier transform in space and write the generating function (sometimes called
the z-transform). Thus multiplying the master equation by z N +1 eikx and summing over all N and x gives
X
X
z N +1 eikx [P (x, N + 1) = p P (x 1, N ) + q P (x + 1, N )] . (2.6)
N =0 x=
We now define the joint transformthe Fourier transform of the generating function
X
X
P (k, z) = zN eikx P (x, N ).
N =0 x=
In what follows, either the arguments of a function or the context (when obvious) will be used to distinguish
transforms from the function itself. The left-hand side of (2.6) is just the joint transform P (k, z), except that
the term P (x, N = 0) is missing. Similarly, on the right-hand side the two factors are just the generating
2.2. MASTER EQUATION FOR THE PROBABILITY DISTRIBUTION 17
function at x 1 and at x + 1 times an extra factor of z. The Fourier transform then converts these shifts
of 1 in the spatial argument to the phase factors eik , respectively. Thus
X
P (k, z) P (x, N = 0)eikx = zu(k)P (k, z), (2.7)
x=
where u(k) = p eik + q eik is the Fourier transform of the single-step hopping probability. For the initial
condition of a particle initially at the origin, P (x, N = 0) = x,0 , the joint transform becomes
1
P (k, z) = . (2.8)
1 zu(k)
We now invert the transform to reconstruct the probability distribution. Expanding P (k, z) in a Taylor
series, the Fourier transform of the generating function is simply P (k, N ) = u(k)N . Then the inverse Fourier
transform is Z
1
P (x, N ) = eikx u(k)N dk, (2.9)
2
To evaluate the integral, we write u(k)N = (p eik + q eik )N in a binomial series. This gives
N
1 N m ikm N m ik(N m)
Z X
ikx
P (x, N ) = e p e q e dk. (2.10)
2 m=0
m
The only non-zero term is the one with m = (N + x)/2 in which all the phase factors cancel. This leads to
the classical binomial probability distribution of a discrete random walk
N! N +x N x
P (x, N ) = p 2 q 2 . (2.11)
( N 2+x )!( N 2x )!
Finally, using Stirlings approximation, the binomial approaches the Gaussian probability distribution in the
long-time limit,
1 2
P (x, N ) e[xN (pq)] /2N pq . (2.12)
2N pq
This result is a particular realization of the central-limit theoremnamely, that the asymptotic probability
distribution of an N -step random walk is independent of the form of the single step distribution, as long as
the mean displacement hxi and the mean-square displacement hx2 i in a single step are finite; we will present
the central limit theorem in Sec. 2.3.
Continuous time
Alternatively, we can treat the random walk in continuous time by replacing N by continuous time t, the
increment N N + 1 with t t + t, and finally Taylor expanding the master equation (2.5) to first order
in t. These steps give
P (x, t)
= w+ P (x 1, t) + w P (x + 1, t) w0 P (x, t) (2.13)
t
where w+ = p/t and w = q/t are the hopping rates to the right and to the left, respectively, and
w0 = 1/t is the total hopping rate from each site. This hopping process satisfies detailed balance, as the
total hopping rates to a site equal the total hopping rate from the same site.
Again, the simple structure of Eq. (2.13) calls out for applying the Fourier transform. After doing so,
the master equation becomes
dP (k, t)
= (w+ eik + w eik w0 ) P (k, t) w(k) P (k, t). (2.14)
dt
For the initial condition P (x, t = 0) = x,0 , the corresponding Fourier transform is P (k, t = 0) = 1, and the
solution to Eq. (2.14) is P (k, t) = ew(k)t . To invert this Fourier transform, lets consider the symmetric case
18 CHAPTER 2. RANDOM WALK/DIFFUSION
where w = 1/2 and w0 = 1. Then w(k) = w0 (cos k 1), and we use the P generating function representation
for the modified Bessel function of the first kind of order x, ez cos k =
x= e ikx
Ix (z) (10), to give
X
P (k, t) = et eikx Ix (t), (2.15)
x=
to simplify the convection-diffusion equation to P (k, t) = (ikv Dk 2 )P (k, t), with solution
2 2
P (k, t) = P (k, 0)e(ikvDk )t
= e(ikvDk )t
, (2.22)
2.3. CENTRAL LIMIT THEOREM 19
for the initial condition P (x, t = 0) = (x). We then obtain the probability distribution by inverting the
Fourier transform to give, by completing the square in the exponential,
1 2
P (x, t) = e(xvt) /4Dt . (2.23)
4Dt
Alternatively, we may first Laplace transform in the time domain. For the convection-diffusion equation,
this yields the ordinary differential equation
sP (x, s) (x) + vP (x, s) = DP (x, s), (2.24)
where the delta function reflects the initial condition. This equation may be solved separately in the half-
spaces x > 0 and x < 0. In each subdomain Eq. (2.24) reduces to a homogeneous constant-coefficient
equation that has exponential solutions. The corresponding solution for the entire line has
the form c+ (x, s) =
A+ e x for x > 0 and c (x, s) = A e+ x for x < 0, where = v v 2 + 4Ds /2D are the roots of
the characteristic polynomial. We join these two solutions at the origin by applying the joining conditions
c
of continuity of P (x, s) at x = 0, and a discontinuity in x at x = 0 whose magnitude is determined
by integrating Eq. (2.24) over an infinitesimal domain which includes the origin. The continuity condition
trivially gives A+ = A A, and the condition for the discontinuity in P (x, s) is D P+ |x=0 P |x=0 = 1.
This gives A = 1/ v 2 + 4Ds. Thus the Laplace transform of the probability distribution is
1
c (x, s) = e |x| . (2.25)
v2 + 4Ds
For zero bias, this coincides with Eq. (2.20) and thus recovers the Gaussian probability distribution.
This equation merely states that to reach x in N steps, the walk first reaches an arbitrary point x in N 1
steps and then makes a transition from x to x with probability p(x x). It is now useful to introduce the
Fourier transforms Z Z
1
f (k) = f (x)eikx dx f (x) = f (k)eikx dk
2
to transform Eq. (2.27) to the algebraic equation PN (k) = PN 1 (k)p(k) that we iterate to give PN (k) =
P0 (k)p(k)N . At this stage, there is another mild condition for the central limit theorem to holdthe initial
condition cannot be too long range in space. The natural condition is for the random walk to start at
the origin, P0 (x) = x, 0 for which the Fourier transform of the initial probability distribution is simply
P0 (k) = 1. Then the Fourier transform of the probability distribution is simply
PN (k) = p(k)N , (2.28)
20 CHAPTER 2. RANDOM WALK/DIFFUSION
so that
1
Z
PN (x) = p(k)N eikx dk. (2.29)
2
To invert the Fourier transform, we now use the fact that the first two moments of p(x) are finite to write
the Fourier transform p(k) as
Z
p(k) = p(x) eikx dx
Z
1 2 2
= p(x) 1 + ikx k x + . . . dx
2
1
= 1 + ikhxi k 2 hx2 i + . . .
2
Now the probability distribution is
Z
1 1
PN (x) [1 + ikhxi k 2 hx2 i]N eikx dx
2 2
Z
1 1 2 2
eN ln[1+ikhxi 2 k hx i] eikx dx
2
Z
1 k2 2 2
eN [1+ikhxi 2 (hx ihxi )] eikx dx (2.30)
2
We now complete the square in the exponent and perform the resulting Gaussian integral to arrive at the
fundamental result
1 2 2
PN (x) e(xN hxi) /2N . (2.31)
2N 2
t-t
r,t r,t
= +
0,r
0 0
Figure 2.1: Diagrammatic relation between the occupation probability of a random walk (propagation is
represented by a wavy line) and the first-passage probability (straight line).
2.4. CONNECTION TO FIRST-PASSAGE PROPERTIES 21
We now present a simple-minded approach to understand this transition between recurrence and tran-
sience. Let P (r, t) be probability that a random walk is at r at time t when it starts at the origin. Similarly,
let F (r, t) be the first-passage probability, namely, the probability that the random walk visits r for the first
time at time t with the same initial condition.
For a random walk to be at r at time t, the walk must first reach r at some earlier time step t and then
return to r after t t (Fig. 2.1). This connection between F (r, t) and P (r, t) may therefore be expressed as
the convolution Z t
P (r, t) = r,0 t,0 + F (r, t ) P (0, t t ) dt . (2.32)
0
The delta function term accounts for the initial condition. The second term accounts for the ways that a
walk can be at r at time t. To reach r at time t, the walk must first reach r at some time t t. Once
a first passage has occurred, the walk must return to r exactly at time t (and the walk can also return to
r at earlier times, so long as the walk is also at r at time t). Because of the possibility of multiple visits
to r between time t and t, the return factor involves P rather than F . This convolution equation is most
conveniently solved in terms of the Laplace transform to give P (r, s) = r,0 + F (r, s)P (0, s). Thus we obtain
the fundamental connection
P (r, s) ,
r 6= 0
F (r, s) = P (0, s)1
(2.33)
1
, r = 0,
P (0, s)
in which the Laplace transform of the first-passage probability is determined by the corresponding transform
of the probability distribution of diffusion P (r, t).
We now use the techniques of Section A.2 to determine the time dependence of the first-passage probability
in terms of the Laplace transform for the occupation probability. ForR isotropic diffusion, P (r = 0, t) =
(4Dt)d/2 in d dimensions and the Laplace transform is P (0, s) = 0 P (0, t) est dt. As discussed in
R
Section A.2, this integral has two fundamentally different behaviors, depending on whether P (0, t) dt
diverges or converges. In the former case, we apply the last step in Eq. (A.6) to obtain
Z t =1/s (
d/2 Ad (t )1d/2 = Ad sd/21 , d < 2
P (0, s) (4Dt) dt (2.34)
A2 ln t = A2 ln s, d = 2,
where the dimension-dependent prefactor Ad is of the order of 1 and does not play any role in the asymptotic
behavior. R
For d > 2, the integral P (0, t) dt converges and one has to be more careful to extract the asymptotic
behavior by studying P (0, 1) P (0, s). By such an approach, it is possible to show that P (0, s) has the
asymptotic behavior
P (0, s) (1 R)1 + Bd sd/21 + . . . , d > 2, (2.35)
where R is the eventual return probability, namely, the probability that a diffusing particle random walk
ultimately reaches the origin, and Bd is another dimension-dependent constant of the order of 1. Using these
results in Eq. (2.33), we infer that the Laplace transform for the first-passage probability has the asymptotic
behaviors
1d/2
1 Ad s
, d<2
F (0, s) 1 + A2 (ln s)1 , d=2 (2.36)
2 d/21
R + Bd (1 R) s , d > 2,
From this Laplace transform, we determine the time dependence of the survival probability by approxi-
mation (A.9); that is,
Z t
F (0, s = 1 1/t ) F (0, t) dt T (t ), (2.37)
0
where T (t) is the probability that the particle gets trapped (reaches the origin) by time t. For what follows,
we also define the survival probability S(t) = 1 T (t), which is simply the probability that the particle has
22 CHAPTER 2. RANDOM WALK/DIFFUSION
not reached the origin by time t. Here the trick of replacing an exponential cutoff by a sharp cutoff provides
an extremely easy way to invert the Laplace transform. From Eqs. (2.36) and (2.37) we thus find
d/21
Ad t
, d<2
1
S(t) A2 (ln t) , d=2 (2.38)
(1 R) + Cd (1 R)2 t1d/2 , d > 2.
It is worth emphasizing several important physical ramifications of the above first-passage properties.
First, the asymptotic behavior is determined by the spatial dimension only and that there is a dramatic
change in behavior when d = 2. For d 2, the survival probability S(t) ultimately decays to zero. This
means that a random walk is recurrent and is certain to eventually return to its starting point, and indeed
visit any site of an infinite lattice. Finally, because a random walk has no memory, it is renewed every
time a specific lattice site is reached. Thus recurrence also implies that every lattice site is visited infinitely
often.
We can give is a simple physical explanation for this efficient visitation of sites. After a time t a random
walk explores a roughly spherical domain of radius Dt. The total number of sites visited during this
exploration is also proportional to t. Consequently in d dimensions, the density of visited sites within this
exploration sphere is t/td/2 t1d/2 . For d < 2, diverges as t and a random walk visits each site
within the sphere infinitely often. This feature is termed compact exploration. Paradoxically, although every
site isRvisited with certainty, these visitations take forever because the mean time to return to the origin,
hti = t F (0, t) dt, diverges for all d 2.
Finally, we outline a useful technique to compute where on a boundary is a diffusing particle absorbed
and when does this absorption occur. This method will provide helpful in understanding finite-size effect in
reaction kinetics. For simplicity, consider a symmetric nearest-neighbor random walk in the finite interval
[0, 1]. Let E + (x) be the probability that a particle, which starts at x, eventually hits x = 1 without hitting
x = 0. This eventual hitting probability E + (x) is obtained by summing the probabilities for all paths that
start at x and reach 1 without touching 0. Thus
X
E + (x) = P p (x), (2.40)
p
where P p (x) denotes the probability of a path from x to 1 that does not touch 0. The sum over all such
paths can be decomposed into the outcome after one step (the factors of 1/2 below) and the sum over all
path remainders from the location after one step to 1. This gives
X 1 1
1
E + (x) = P p (x + x) + P p (x x) = [E + (x + x) + E + (x x)]. (2.41)
p
2 2 2
where (2) is the second-difference operator. Notice the opposite sense of this recursion formula compared
to the master equation Eq. (2.5) for the probability distribution. Here E + (x) is expressed in terms of output
from x, while in the master equation, the occupation probability at x is expressed in terms of input to x.
For this reason, Eq. (2.41) is sometimes referred to as a backward master equation. This backward equation
is just the Laplace equation and gives a hint of the deep relation between first-passage properties, such as
the exit probability, and electrostatics. Equation (2.42) is subject to the boundary conditions E + (0) = 0
2.4. CONNECTION TO FIRST-PASSAGE PROPERTIES 23
and E + (1) = 1; namely if the walk starts at 1 it surely exits at 1 and if the walk starts at 0 it has no
chance to exit at 1. In the continuum limit, Eq. (2.42) becomes the Laplace equation E = 0, subject to
appropriate boundary conditions. We can now transcribe well-known results from electrostatics to solve the
exit probability. For the one dimensional interval, the result is remarkably simple: E + (x) = x!
This exit probability also represents the solution to the classic gamblers ruin problem: let x represent
your wealth that changes by a small amount dx with equal probability in a single bet with a Casino. You
continue to bet as long as you have money. You lose if your wealth hits zero, while you break the Casino
if your wealth reaches 1. The exit probability to x = 1 is the same as the probability that you break the
Casino.
Lets now determine the mean time for a random walk to exit a domain. We focus on the unconditional
exit time, namely, the time for a particle to reach any point on the absorbing boundary of this domain. For
the symmetric random walk, let the time increment between successive steps be t, and let t(x) denote the
average exit time from the interval [0, 1] when a particle starts at x. The exit time is simply the time for
each exit path times the probability of the path, averaged over all trajectories, and leads to the analog of
Eq. (2.40)
X
t(x) = P p (x) tp (x), (2.43)
p
where tp (x) is the exit time of a specific path to the boundary that starts at x.
In analogy with Eq. (2.41), this mean exit time obeys the recursion
1
t(x) = [(t(x + x) + t) + (t(x x) + t)] , (2.44)
2
This recursion expresses the mean exit time starting at x in terms of the outcome one step in the future, for
which the initial walk can be viewed as restarting at either x+x or xx, each with probability 1/2, but also
with the time incremented by t. This equation is subject to the boundary conditions t(0) = t(1) = 0; the
exit time equals zero if the particle starts at the boundary. In the continuum limit, this recursion formula
reduces to the Poisson equation Dt (x) = 1. For diffusion in a d-dimensional domain with absorption
on a boundary B, the corresponding Poisson equation for the exit time is D2 t(r) = 1, subject to the
boundary condition t(r) = 0 for r B. Thus the determination of the mean exit time has been recast as
a time-independent electrostatic problem! For the example of the unit interval, the solution to the Laplace
equation is just a second-order polynomial in x. Imposing the boundary conditions immediately leads to the
classic result
1
t(x) = x(1 x). (2.45)
2D
c(~r, t)
Z
K(t) = D d. (2.49)
r r=a
S
There are two regimes of behavior as a function of the spatial dimension. For d > 2, the loss of reactants
at the absorbing sphere is sufficiently slow that it is replenished by the re-supply from larger distances. A
steady state is thus reached and the reaction rate K is finite. In this case, the reaction rate can be determined
more simply by solving the time-independent Laplace equation, rather than the diffusion equation (2.48).
The solution to the Laplace equation with the above initial and boundary conditions is
a d2
c(r) = 1 .
r
c
The flux is then D r |r=a = D(d 2)/a and the total current is the integral of this flux over the surface of
the sphere K = (d 2)d Dad2 , where d = 2 d/2 /(d/2) is the area of a unit sphere in d dimensions. We
translate this flux into the reaction kernel for aggregation by expressing a and D in terms of the parameters
of the constituent reactants to give
We can express this result as a function of reactant masses only for the physical case of three dimension by
using Ri i1/3 , while for the diffusion coefficient, we use the Einstein-Stokes relation Di = kT /(6Ri )
i1/3 , where kT is the thermal energy and is the viscosity coefficient to obtain
2kT
Kij (Ri1 + Rj1 )(Ri + Rj ).
3
(2.51)
What happens for d < 2? We could solve the diffusion equation with the absorbing boundary condition
and the unit initial condition, from which the time-dependent flux and thereby a time-dependent reaction rate
2.5. THE REACTION RATE 25
c(r,t)
a Dt r
Figure 2.2: Sketch of the concentration about an absorbingsphere according to the quasi-static approxima-
tion. The near- and far-zone concentrations match at r = Dt.
can be deduced. However, it is simpler and more revealing to apply the general quasi-static approximation.
Because of its simplicity and general utility, we now present the quasi-static calculation of the reaction rate.
The basis of the quasi-static approximation is that the region exterior to the absorbing sphere naturally
divides into near and far zones. In the near zone, which extends to a distance Dt from the sphere,
diffusing particles have ample time to explore this near zone thoroughly and the concentration is nearly time
independent. In thecomplementary far zone there is negligible depletion because diffusing particles that are
more distant than Dt typically will not hit the sphere in a time t. Thus in the far zone the concentration
c(r) = 1 for r > Dt.
Based on this picture, we merely solve the Laplace equation in the near zone a < r < Dt with the
time-dependent boundary conditions c(r = Dt) = 1, to match to the static far-zone solution, and c(a) = 0.
The general solution is c(r) = A + Br2d , and matching to the boundary conditions gives
!d2
1 (a/r)d2 Dt
c(r, t) = t for d = 1. (2.52a)
1 (a/ Dt)d2 r
For d = 2, we can still apply the same quasi-static approach because diffusion is still recurrent, so that
a qualitatively similar depletion layer builds up around the absorbing sphere. Now, however, the general
solution to the Laplace equation is c(r) = A + B ln r. Apply the boundary conditions at r = a and r = Dt
leads to
ln(r/a) ln r
c(r, t) = t for d = 2. (2.52b)
ln( Dt/a) ln t
Finally, we substitute the above expressions for the concentration into the definition of the time-dependent
reaction rate from Eq. (2.49) to obtain the reaction rate.
D (Dt)(d2)/2
d < 2;
4D
K(t) d = 2; (2.53)
ln Dt/a2
d2
Da d > 2.
Notice that the rate does not depend on the cluster radius for d 2. This surprising fact arises because
of the recurrence of diffusion in d 2 so that two diffusing particles are guaranteed to eventually meet
independent of their radii.
26 CHAPTER 2. RANDOM WALK/DIFFUSION
Problems
Section 2.2
1. Find the generating function for the Fibonacci
P sequence, Fn = Fn1 + Fn2 , with the initial condition
F0 = F1 = 1; that is, determine F (z) = 0 Fn z n . Invert the generating function to find a closed form
expression for Fn .
2. Consider a random walk in one dimension in which a step to the right of length 2 occurs with probability
1/3 and a step to the left of length 1 occurs with probability 2/3. Investigate the corrections to the
isotropic Gaussian that characterizes the probability distribution in the long-time limit. Hint: Consider
the behavior of moments beyond second order, hxk i with k > 2.
3. Solve the gamblers ruin problem when the probability of winning in a single bet is p. The betting
game is repeated until either you are broke or the casino is broken. Take the total amount of capital to
be $N and you start with $n. What is the probability that you will break the casino? Also determine
the mean time until the betting is over (either you are broke or the Casino is broken). More advanced:
Determine the mean time until betting is over with the condition that: (i) you are broke, and (ii) you
break the Casino. Solve this problem both for fair betting and biased betting.
4. Consider the gamblers ruin problem under the assumptions that you win each bet with probability
p 6= 1/2, but that the casino has an infinite reserve of money. What is the probability that you break
the casino as a function of p? For those values of p where you break the casino, what is the average
time for this event to occur?
Section 2.4
5. For r 6= 0 and t > 0, explicitly verify Eq. (2.32) in one dimension.
Solution.
Notes
The field of random walks, diffusion, and first-passage processes are classic areas of applied probability
theory and there is a corresponding large literature. For the more probabilistic aspects of random walks and
probability theory in general, we recommend 15; 3; 11; 9. For the theory of random walks and diffusion from
a physicists perspective, we recommend 12; 13; 14. For first-passage properties, please consult 8; 9.