Random Walks

←Previous

Diffusion

Having mentioned the connection between diffusion and random walks several times so far, we will now substantiate these claims. We will again adopt the example of a drop of milk in a cup of tea, in which we have a sufficiently large number of particles (milk) moving in solution. The goal will be to calculate the spatial distribution of these particles as a function of time. In our discussion of random walkers up to now we have concentrated on the description of individual particles, i.e. walkers. An alternative way to describe the same physics is provided by the density of particles, ρ(x,y,z;t), which can be conveniently defined if enough particles are present. This idea can be reformulated such that sub-volumes of the original volume are considered, allowing us to count the number of particles in each sub-volume, identifying this as the respective density. This method goes under the name of coarse graining. It basically centres around considering regions of the physical volume that are large enough to allow for a meaningful definition of density as number of particles per volume element, i.e per sub-volume.

This density is then proportional to the probability of finding a particle, P(x,y,z;t), per unit volume and time at the corresponding coordinates. Thus ρ and P essentially describe the same physics and obey the same equations. It is therefore sufficient to consider probabilities P.

To find the underlying equations, let us focus on an individual walker. We assume that it walks on a cubic lattice, with walking steps along each of the three dimensions x, y, and z with unit size. Thus the walker essentially hops from lattice point to lattice point.Then P(i,j,k;n) is the probability to find the walker on the link with coordinates (x,y,z) = Δx(i,j,k) at a time (step) n, if the size of the lattice spacing is Δx. Since we are on a simple cubic lattice, there are typically 6 different possible steps, one for each neighbouring site. If the walker in on one of those steps at a time n-1 then the probability to be at (i,j,k) at time n reads

\[ \begin{eqnarray*} P(i,\,j,\,k;\,n)\,=\frac{1}{6} \left[ \vphantom{\frac{1}{2}} \right. &P&(i+1,\,j,\,k;\,n-1)+P(i-1,\,j,\,k;\,n-1) \,+ \\ &P&(i,\,j+1,\,k;\,n-1)+P(i,\,j-1,\,k;\,n-1)\,+ \\ &P&(i,\,j,\,k+1;\,n-1)+P(i,\,j,\,k+1;\,n-1)\left. \vphantom{\frac{1}{2}} \right]\,. \end{eqnarray*} \]
Rearranging yields
\[ \begin{eqnarray*} P(i,\,j,\,k;\,n)-P(i,\,j,\,k;\,n-1)\,=\, \frac{1}{6} \left[ \vphantom{\frac{1}{2}}\right. &P&(i+1,\,j,\,k;\,n-1)-2P(i,\,j,\,k;\,n-1)+P(i-1,\,j,\,k;\,n-1)\,+ \\ &P&(i,\,j+1,\,k;\,n-1)-2P(i,\,j,\,k;\,n-1)+P(i,\,j-1,\,k;\,n-1)\,+ \\ &P&(i,\,j,\,k+1;\,n-1)-2P(i,\,j,\,k;\,n-1)+P(i,\,j,\,k+1;n-1) \left. \vphantom{\frac{1}{2}} \right] \, . \end{eqnarray*} \]
This can easily be written in differential form, when the missing constant factor Δ t on the l.h.s. of the equation above is absorbed into a diffusion constant, D. For the r.h.s. of the equation it is important to realise that each line represents a second derivative. Then
\[ \frac{\partial P(x,y,z;t)}{\partial t}\,=\,D\nabla^2P(x,y,z;t)\, ,\]
the diffusion equation. The diffusion constant, D, is given by
\[ D\,=\, \frac{(\Delta x)^2}{6\Delta t}\, . \]

Due to the link between probabilities and densities, the particle density obeys the same diffusion equation:

\[ \frac{\partial\rho(x,y,z;t)}{\partial t}\,=\,D\nabla^2\rho(x,y,z;t)\, . \]
In general, an analytic solution to this equation is hard to construct. However, there is one special case, which is very instructive. Direct substitution allows to verify that the function
\[ \rho(x,t)\,=\, \frac{1}{\sigma}\exp \left[ -\frac{x^2}{2\sigma} \right] \]
solves the diffusion equation in 1+1 dimensions, if
\[ \sigma\,=\, \sqrt{2Dt}\, .\]
The generalisation to 3+1 dimensions is straightforward, just replace with x²+y²+z². This solution is nothing but a Gaussian distribution in space, with a width increasing with time (as a square root of time). This is - not surprisingly - in accordance with the finding above that the average displacement of a random walker from its starting point increases as a square root of time.

Phrased in another way: A disturbance, like the milk drop, will spread out over a distance √(2Dτ) during a time τ, or equivalently: it will take a time l²/(2D) to spread out over a dimension l. This can be seen in the plot below, where 40,000 random walkers have been initialised at x=0 at time t=0, and they will walk for 1000 steps, i.e. for a time τ=1000Δt.

Diffusion in 1 dimension, simulated by random walkers
Note that only every second entry is different from 0 - the random walkers are all either located at even or at odd positions x.

Next→





Frank Krauss and Daniel Maitre
Last modified: Tue Oct 3 14:43:58 BST 2017