If there are balls in box A, a ball currently in B is selected with probability , increasing the count, and a ball in A is selected with probability , decreasing it. For ,
with every other transition zero. This is the Ehrenfest urn model.
The stationary distribution is
It is normalized by the binomial theorem, and it obeys the detailed balance:
All other pairs have zero flux in both directions. These identities prove stationarity and show that this is a reversible Markov chain in equilibrium. The finite chain is irreducible and has period two; reversibility does not require aperiodicity.