Ehrenfest model

The Ehrenfest model (or dog–flea model) of diffusion was proposed by Tatiana and Paul Ehrenfest to explain the second law of thermodynamics. The model considers N particles in two containers. Particles independently change container at a rate λ. If X(t) = i is defined to be the number of particles in one container at time t, then it is a birth–death process with transition rates


 * $$q_{i, i-1} = i\, \lambda$$ for i = 1, 2, ..., N
 * $$q_{i, i+1} = (N-i\,) \lambda$$ for i = 0, 1, ..., N – 1

and equilibrium distribution $$\pi_i = 2^{-N} \tbinom Ni$$.

Mark Kac proved in 1947 that if the initial system state is not equilibrium, then the entropy, given by


 * $$H(t) = -\sum_{i} P(X(t)=i) \log \left( \frac{P(X(t)=i)}{\pi_i}\right), $$

is monotonically increasing (H-theorem). This is a consequence of the convergence to the equilibrium distribution.

Interpretation of results
Consider that at the beginning all the particles are in one of the containers. It is expected that over time the number of particles in this container will approach $$N/2$$ and stabilize near that state (containers will have approximately the same number of particles). However from mathematical point of view, going back to the initial state is possible (even almost sure). From mean recurrence theorem follows that even the expected time to going back to the initial state is finite, and it is $$2^N$$. Using Stirling's approximation one finds that if we start at equilibrium (equal number of particles in the containers), the expected time to return to equilibrium is asymptotically equal to $$\textstyle\sqrt{\pi N/2}$$. If we assume that particles change containers at rate one in a second, in the particular case of $$N=100$$ particles, starting at equilibrium the return to equilibrium is expected to occur in $$13$$ seconds, while starting at configuration $$100$$ in one of the containers, $$0$$ at the other, the return to that state is expected to take $$4\cdot 10^{22}$$ years. This supposes that while theoretically sure, recurrence to the initial highly disproportionate state is unlikely to be observed.