0% found this document useful (0 votes)
7 views7 pages

Solutions To Homework Problems For The Complexity Explorer Course On Random Walks

This document provides solutions to homework problems about random walks. It calculates the fourth moment of displacement after N steps in a random walk. It also determines the probability distribution of a biased random walk, deriving that it follows a Gaussian distribution in the long-time limit. Finally, it writes the master equation and diffusion equation for a random walk that can step right, left, or remain in place. The diffusion coefficient D is calculated and shown to be 1/3 that of a nearest-neighbor random walk.

Uploaded by

Joaquim Simão
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
7 views7 pages

Solutions To Homework Problems For The Complexity Explorer Course On Random Walks

This document provides solutions to homework problems about random walks. It calculates the fourth moment of displacement after N steps in a random walk. It also determines the probability distribution of a biased random walk, deriving that it follows a Gaussian distribution in the long-time limit. Finally, it writes the master equation and diffusion equation for a random walk that can step right, left, or remain in place. The diffusion coefficient D is calculated and shown to be 1/3 that of a nearest-neighbor random walk.

Uploaded by

Joaquim Simão
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

Solutions to Homework Problems for the Complexity Explorer Course on Random Walks

1. Displacement of a random walk. Consider the Pearson random walk in any spatial dimension
in which the length of each step has the fixed value a, but the direction is arbitrary. Compute
the fourth moment of the displacement after N steps
D X
N E
4
M4 ⌘ xi .
i=1

Solution. Expanding the quartic, the fourth moment can be written in the form
DX
N E
M4 = xi xj xk x` .
i,j,k,`

The only terms that are non-zero after performing the average are those that contain even powers
of xi . There are two such types of terms—quartic terms of the form x4i and biquadratic terms
of the form x2i x2j , with i 6= j. Clearly, there are N quartic terms. To determine the number of
biquadratic terms, imagine writing out the quartic as the product of its 4 factors. Symbolically

M4 = (. . . . . . ) (. . . . . . ) (. . . . . . ) (. . . . . . ) .

We now need the number of distinct biquadratic groupings. If we pick xi from the first factor (N
ways), it must be joined with another xi from one of the remaining 3 factors. Since the index
i has been “used up”, there are N 1 other available indices to group. Now this second index
comes from a unique pair of the remaining two factors. To summarize, there are 6N (N 1)
unique biquadratic pairings. Thus we obtain
⌦ ↵ ⌦ ↵
M4 = N x4i + 6N (N 1) x2i x2j i 6= j ,
4
⌦ 2 ↵⌦ 2 ↵
= N a + 6N (N 1) xi xj ,
= N a4 + 6N (N 1)a4 .

2. Probability distribution of a biased random walk. Consider a random walk in one di-
mension in which a step to the right occurs with probability p and a step to the left occurs with
probability q = 1 p.

(a) Determine the probability P (r, `, t) that a walk of t total steps has taken r steps to the right
and ` steps to the left.
(b) Transform the above expression for P (r, `, t) to P (x, t), the probability that the walk is at
x at time t.
(c) Use Stirling’s approximation to compute the long-time limit of the probability distribution
P (x, t).
Solution. The number of distinct t-step walks with r steps to the right and ` steps to the
left is the binomial factor
t!
N (r, `, t) = .
r! `!
The probability P (r, `, t) is then
t! r `
P (r, `, t) = pq .
r! `!
Using x = r ` and t = r + `, we eliminate r and ` in favor of t and x via r = 12 (t + x) and
` = 12 (t x). Using these in the above equation, we have

t!
P (x, t) = ⇣ ⌘ ⇣ ⌘ p(t+x)/2 q (t x)/2
.
t+x
2
! t 2x !

To obtain the long-time limit of the distribution, one needs to be careful in applying Stirling’s
approximation for the biased random walk. The crucial point is that the distribution is
sharply peaked about the most probable value of the displacement xmp = (p q)t, and
the final Gaussian form is an expansion about this most probable displacement. Thus as a
preliminary to applying Stirling’s approximation, we write x = xmp + ✏ = (p q)t + ✏, so
that we can expand about ✏ = 0. We have
1 1

2
(t + x) = 2
t + (p q)t + ✏] = pt + 12 ✏ = pt(1 + 2pt

),
1 1
⇥ 1 ✏
2
(t x) = 2 t (p q)t ✏] = qt 2 ✏ = qt(1 2qt ) .

We now apply Stirling’s approximation to ln P (x, t) to give

ln P (x, t) ' t ln t t + 12 ln(2⇡t)


1
⇥ ⇤ 1
2
(t + x) ln 12 (t + x) 2
ln[⇡(t + x)]
1
⇥ ⇤
2
(t x) ln 12 (t x) 1
2
ln[⇡(t x)]
1 1
+ 2 (t + x) ln p + 2 (t x) ln q .

As an additional simplification, we write the first term as

t ln t = 12 (t + x) ln t + 12 (t x) ln t ,

and then combine the terms with the same prefactors in front of the logarithms. We also
use the alternative expressions for 12 (t ± x) given above to obtain, after some simple steps,
h 2⇡t i
✏ ✏ ✏ ✏ 1
ln P ' pt(1 + 2pt
) ln 1+ 2pt
qt(1 2qt
) ln 1 2qt
+ ln
2 1 1 .
2⇡(pt + 2 ✏) 2⇡(qt 2
✏)

Finally, we expand the first two logarithms in a Taylor series to second order and the third
logarithm to zeroth order. Clearly, all terms linear in ✏ must cancel in the first two logarithms
(you can easily check this), and we are left with

✏2 ✏2 h 1 i
ln P ' + 12 ln ,
8pt 8qt 2⇡pqt
✏2 1
= ln(2⇡pqt) .
8pqt 2
Thus the final result in the large-time asymptotic limit is the Gaussian distribution
1 ✏2 /8pqt
P (x, t) ' p e ,
2⇡pqt

with ✏ = x (p q)t.

3. Diffusion equation. Consider a random walk that steps to the right with probability 1/3, to
the left with probability 1/3, and remains in place with probability 1/3.

(a) Write the Master equation that determines the evolution of P (x, t).
(b) Taylor expand the master equation and determine the partial di↵erential equation that is
satisfied by P (x, t). Determine the di↵usion coefficient D of this process and compare it
with the di↵usion coefficient of the nearest-neighbor random walk.
Solution. Let us take the time increment for a single step as dt. Then the Master equation
for P (x, t) is
P (x, t + dt) = 13 P (x 1, t) + 13 P (x, t) + 13 P (x + 1, t) .
The first term on the right accounts for the contribution to P (x, t + dt) due to the walk
hopping from x 1 to x, the second term accounts for the walk remaining in place, and the
third term account for the walk hopping from x + 1 to x.
We now Taylor expand the above Master equation to first order in time and second order in
space. This gives

@P h @P @ 2P i
P (x, t) + dt + . . . = 13 P (x, t) + dx + 12 2 (dx)2 + . . .
@t @x @x
1
+ 3 P (x, t)
h @P @ 2P i
+ 13 P (x, t) dx + 12 2 (dx)2 + . . . .
@x @x
Gathering terms, the zeroth-order terms and the first-order spatial terms cancel and we
arrive at the di↵usion equation

@P 1 (dx)2 @ 2 P
= ,
@t 3 dt @x2
in which we identify the di↵usion coefficient D with (dx)2 /(3 dt). Compared to the nearest-
neighbor random walk, the di↵usion coefficient is reduced by a factor of 2/3.

4. Kinetic theory. The density of a typical room-temperature gas is ⇢ ⇡ 1020 molecules/cc and
each molecule has a typical speed that is roughly 30000 cm/sec. Estimate the number of collisions
that the ambient air makes with your body per second.
`

x
A
z

Solution. First, we estimate the number of air molecules that pass through a unit area per unit
time. Consider a parallelpiped of length equal to the mean-free path ` and area A. The number
of molecules in this parallelpiped is ⇢`A. Very roughly, 16 of the molecules are moving in each of
the coordinate directions ±x, ±y, and ±z. Thus, roughly 16 of the molecules are moving in the
+x direction and will hit the shaded side of the parallelpiped in the above figure in a time that
is roughly `/v. Thus the number of molecules hitting the end of a parallelpiped of unit area per
unit time is 61 ⇢v; the exact result is 14 ⇢v. I guesstimate the surface area of the body as 1 m2 , or
104 cm2 . Thus the number of molecules hitting somebody per unit time is
1
6
⇢v ⇥ 104 ⇡ 16 1020 ⇥ (3 ⇥ 104 ) ⇥ 104 ⇡ 1028 molecules/sec .

5. Extreme value statistics. The distribution of velocities of an ideal gas of molecules of mass
m at temperature T is given by the Maxwell-Boltzmann distribution
⇣ m ⌘3/2 2
P (v)dv = e mv /2kT dv ,
2⇡kT
1
where kT , the thermal energy of each molecule is roughly 40 eV at room temperature (⇡ 300 K).
Thus P (v)dv is the probability that a molecule as a velocity that is in a range dv about v. Using
the reasoning given in the discussion of the failure of the central limit theorem, estimate the
energy of the most energetic molecule in a gas at room temperature in a room of volume of 1000
cubic meters.
Solution. To simplify matters, let’s directly consider the energy distribution of the molecules:
P (E) dE = e E/kT dE, where E is the energy. Now we apply the extremal criterion that was
used in lecture Z 1
1
e E/kT dE ⇡ .
Emax N
Again, this criterion states that in gas of N molecules, there is one molecule whose energy is
greater than or equal to Emax . This statement then allows us to estimate Emax . Evaluating the
above integral gives
1
kT e Emax /kT = ! Emax = kT ln N .
N
The density of a room-temperature gas is roughly 1020 molecules/cc. For a room of 1000 cubic
meters, the number of molecules within this room is therefore roughly 1029 . Thus
Emax ⇡ kT ln 1029 ⇡ 70 kT ⇡ 1.7 eV ⇡ 20000 K .
6. First-passage in a finite interval. Consider a biased random walk in the finite interval
[0, L] in which the walk hops to the right with probability p and to the left with probability
q = 1 p. The walk is immediately absorbed when it reaches either 0 or L.

(a) Determine the probability En that the walk is absorbed at L when it starts at site n.
Solution. The exit probability En satisfies the backward Kolmogorov equation

En = pEn+1 + qEn 1 .

This constant-coefficient, second-order recursion generally has exponential solutions in n,


except in the case where p = 12 where the solution is a power law in n (and we know from
the lecture that the solution is En = Ln ). The statement of the problem mandates that
E0 = 0 and EL = 1. We now assume En / n , substitute into the above recursion, and
cancel out
⇥ ap common ⇤factor n 1 to arrive at p 2 + 1 = 0, with elemental solutions
1
± = 2p 1 ± 1 4pq . Thus the general solution has the form
n n
En = A + +B ,

where A and B are constants. These constants are determined by the boundary conditions
E0 = 0 and EL = 1. The former gives B = A, while the latter gives A and the solution to
our problem is
n n
+
En = L L
.
+

A plot of En versus n for the case of L = 20 is shown below for the cases of p = 0.45 (concave
upward) and p = 0.55 (concave downward). The straight line gives the exit probability in
the case of no bias.
���

���

���

���

���


� �� �� ��

(b) Determine the average time tn for the walk to exit the interval either at 0 or at L when it
starts at site n. Find the starting location that maximizes the exit time.
Solution. The average exit time tn satisfies the backward Kolmogorov equation

tn = p(tn+1 + 1) + q(tn 1 + 1) = ptn+1 + qtn 1 + 1.

The general solution to this equation is the sum of a particular solution plus the solution
to the homogeneous equation, which is the same as the equation for En in part (a). With a
little trial and error, the particular solution is tn = nv . Thus the general solution for the
average exit time is
n
tn = + A n+ + B n .
v
The boundary condition T0 = 0 immediately gives A + B = 0, while the boundary condition
TL = 0 leads to
L/v
A= L L
.
+
Thus the final expression for the average exit time is
✓ n n

n L +
tn = + L L
.
v v +

This formula holds for both v > 0 and v < 0, that is for p 6= q.
A plot of tn versus n for the case of L = 20 is shown below for the cases of p = 0.45 (peak
at n ⇡ 6) and p = 0.55 (peak at n ⇡ 14). The symmetric curve is the exit time in the case
of no bias, p = 12 .

���

��

��

��

��


� �� �� ��

7. First-passage on the semi-infinite interval. Consider a biased nearest-neighbor random


walk with hopping probabilities p and q to the right and left, respectively, on the semi-infinite
interval [0, 1]. The walk is absorbed if it reaches x = 0.

(a) Using the backward Kolmogorov approach, determine the probability En that the walk is
eventually absorbed at the origin when it starts at site n. Separately consider the cases
p > q, p < q, and p = q (symmetric walk).
Solution. The exit probability En satisfies the backward Kolmogorov equation
En = pEn+1 + qEn 1 .
This constant-coefficient, second-order recursion generally has exponential solutions. In
addition, we must have E0 = 1 by definition. We now assume En / n , substitute into the
above recursion, and cancel out a common factor n 1 to arrive at p 2 + 1 = 0. This
equation has two solutions:
(
1 p  12 ,
= 1⇥ p ⇤
2p
1 1 4pq p > 12 .
For p > 12 , is always less than 1 and monotonically decays to 0 as p ! 1. Thus the
probability of eventually reaching the origin, En = n , decays very quickly with starting
location n as p ! 1.
(b) For the case where p < q (bias to the left), compute the average time tn for the walk to
reach the origin when it starts at site n. What is the limiting behavior of this exit time in
the limit p = q?
Solution. Please notes that this solution uses some information that was not presented in
lecture. Because we’re dealing with the semi-infinite interval, I’m going to cheat a tiny bit
and study the problem in the continuum limit; it’s much simpler in this formulation. Thus
we start with the backward Kolmogorov equation for the average exit time

tn = ptn+1 + qtn 1 + 1,

replace tn by t(x) and tn±1 by t(x ± dx), define the time increment of a single step as dt,
and Taylor expand the di↵erences. This gives
⇥ (dx)2 00 ⇤ ⇥ (dx)2 00 ⇤
t(x) ⇡ p t(x) + t0 dx + 2
t + . . . + q t(x) t0 dx + 2
t + . . . + dt .
2
Keeping only terms up to quadratic and identifying v = (p q) dx
dt
and D = (p + q) dx
2dt
, the
backward Kolmogorov equation for t(x) is

Dt00 + vt0 = 1.

We now solve this equation on the finite interval [0, L] and then take the limit L ! 1. For
the problem on the finite interval, the boundary conditions are t(0) = 0 and (more subtly)
t0 (L) = 0. The latter reflecting boundary condition mandates that the walk is reflected if it
reaches the point x = L.
The general solution to Dt00 + vt0 = 1 is the sum of the particular and homogeneous
solutions:
x
t(x) = + A e vx/D + B .
v
The boundary condition t(0) = 0 gives that A + B = 0, while the boundary condition
t0 (L) = 0 gives A = vD2 e vL/D . Thus for the finite interval

x D vL/D vx/D
t(x) = e (e 1) .
v v2
To obtain the exit time for the infinite interval we let L ! 1. This gives
x
t(x) = .
v
This simple result is just the exit time for a particle that moves at constant speed v. Thus
the random-walk nature of the motion plays no role for this system; all that matters is the
underlying bias.

You might also like