So, I’ve already made you, dear reader, somewhat familiar with entropy (if not, go back and read this post). I have bad news, I am afraid: I LIED. But trust me, I had only the best intentions! The definitions I have given in the previous post are still completely correct, but simplified too far. The problem that arises from the old post is called the Gibbs Paradox, and I will in this post explain what this is, and how it is rectified.
Picture a chamber filled with gas particles, with a partition in the middle. This partition can be opened
or closed. The particles in this gas do not interact with each other, and the two sides of the partition are in equilibrium with each other (equal temperature and pressure). When the partition is closed, each side of the partition has total entropy S (and therefore the total entropy of the system is 2S). When the partition opens, the gas particles can now flow between the two chambers. If we use the original Boltzmann definition of entropy, we find that the entropy of a system like this is not in fact 2S, but 2S+a, where a is some constant offset based on the number of particles in the system and the volume of the chamber. This means, simply by closing the partition, we can decrease the entropy of the system by some amount a. This is a clear violation of the second law of thermodynamics (which states that the entropy of a closed system cannot decrease)! This tells us that something is wrong with our definition of entropy.
The source of the problem becomes clear if we picture the gas consisting of only two particles: one on the left side, and one on the right. When the partition is closed, the particles have no freedom: they are stuck in whatever chamber they are in. There is only 1 way in which the particles can be arranged, the way in which they are currently arranged. If the partition opens, they are free to swap places (but not bunch together in one chamber, as the system is in equilibrium). This means that there are two ways of arranging the particles (either the original state, or with both particles swapped). This seems to suggest that the number of microstates is greater when the partition is opened than when it is closed! So how can we fix the paradox, if the number of microstates is greater for an open partition than a closed one? Well, the problem arises from the idea that we can tell the difference between the particles making up the gas. Remember that the entropy of a coin with two heads is zero (you will always get a head). If the particles are all indistinguishable, then the open partition still has only one microstate (one particle on each side). This is the solution to Gibbs paradox! If we remove all of the extra microstates that come about from permutations (re-ordering of particles in the same positions), we find that the entropy of the system is the same whether the partition is open or closed. This new insight allows us to slightly alter the equation for thermodynamic entropy to account for the change in the number of microstates we take into account (the new formula is called the Sackur-Tetrode equation). Gibbs paradox is a fascinating example of how a single faulty assumption can yield a major paradox in a physical theory.