# Ergodicity in a Monte Carlo simulation

Q1: What is the ergodicity and ergodicity breaking in a Monte Carlo simulation of a statistical physics problem?

Q2: How does one ensure that the ergodicity is maintained ?

• Ergodicity is a description of a system which has filled all degrees of freedom equally. For example, if you use MC method to simulate gas molecules, with constant initial velocity. The system will be ergodically distributed when the velocity follows the Maxwell-Boltzmann distribution. This is my understanding I'm sure there is a better definition involving entropy. Breaking this condition sounds like it implies a decrease in entropy. Apr 2, 2013 at 13:22

## 2 Answers

To complete the answers already given, ergodicity in MC simulations is a practical problem and not a conceptual one contrary to the ergodicity property in physics. Normally, if you sample your phase space with a Markov chain, it is possible to show that whatever the initial trial distribution, your Markov chain will eventually sample the Gibbs distribution associated to the statistical ensemble you are interested in.

In practice however, your system can be trapped in local minima of the potential energy surface and be ergodic only within those minima (akin to what would really happen in a supercooled liquid). This is an obvious case of ergodicity breaking in the sense suggested by sebastian above.

This can be tested quite easily as your simulations will give different averages depending on the initial condition for instance.

There are many algorithms involving multicanonical sampling or parallel tempering just to name these two that can get rid of this issue.

• Is there a source where this distinction between physical and practical ergodicity is laid out? May 27, 2020 at 8:19
• @taciteloquence Although I would not phrase the distinction as physical versus practical anymore, what I was referring to was essentially a distinction between the practical difficulties to cross some energy barriers in some MC methods and whether or not the underlying physical system is actually ergodic in some sense. For example, periodic hard sphere systems are ergodic (metrically transitive) but at high densities, hard sphere fluid MC simulations can get trapped sampling only a small subset of phase space. May 28, 2020 at 10:41

In the context of a Monte Carlo (MC) simulation, ergodicity means that the algorithm that you use is designed in such a way that all points in the corresponding phase space (the one that contains the trajectory of your statistical ensemble) would be visited if the algorithm ran for an infinite amount of time. There is no way to prove that an algorithm is ergodic, as we just cannot let a simulation run infinitely. In the literature, you can find the concepts of balance and detailed balance. From a practitioner's point of view, if an algorithm fulfils detailed balance, it is safe to assume that the system behaves ergodic.

In general, you cannot show that a system is ergodic. In statistical physics, ergodicity is assumed for systems in thermal equilibrium, but this assumption cannot be proven (to my (limited) knowledge).

A good online resource for learning MC is this site with lecture notes. A good book that covers everything from the beginning is Tuckerman: Statistical Mechanics. A book that is more detailed on MC but requires solid knowledge in statistical physics is Frenkel & Smit: Understanding Molecular Simulation.

• I believe this answer is flawed. Detailed balance and ergodicity are two different and largely unrelated concepts. For instance, the identity transfer matrix for Markov Chain Monte Carlo satisfies detailed balance, but it is as non-ergodic as possible — the system just stays in one state and never evolves. Mar 18, 2015 at 3:52
• I retract my comment "detailed balance and ergodicity are two different and largely unrelated concepts." Instead I should say detailed balance is not enough to guarantee ergodicity. The algorithm also need to be able to traverse the phase space. Mar 18, 2015 at 4:45