Irreversibility and increase of number of microstates

We know,in an irreversible process,always entropy of an isolated system increases,from Clausius inequality.Again,entropy is the logarithm of the number of accessible microstates of a system.How can we merge these two ideas,i.e,an irreversible process always increases the number of accessible microstates of a system?

Here is a combinatorial example that demonstrates the answer to your question. Say we have two systems $$A$$ and $$B$$. $$A$$ is represented by a two-compartment box with one ball; $$B$$ us a two-compartment box that is empty. We then combine the two systems into a single box with four compartments and one ball.

Before combining the systems we have 2 microstates in $$A$$ and 1 microstate in $$B$$. After combining we have 4 microstates in the system $$A+B$$. That is: $$\Omega_{A+B}> \Omega_A \Omega_B \Rightarrow \boxed{\vphantom\int\log\Omega_{A+B} > \log\Omega_A+\log\Omega_B}$$ This example represents irreversible expansion in an isolated system. By combining the two smaller boxes into a larger box we increase the number of possible microstates because the balls of each box can now be found in the other part as well. Generally and irreversible process takes place when a constraint is removed (here, the wall that separates the two boxes) and by doing so the system reaches more microstates that were previously unaccessible.

Let $$\Omega_1$$ be the set of accessible microstates at the beginning of a thermodynamic process, and let $$\Omega_2$$ be the set of accessible microstates at the end. Let $$P$$ denote the time evolution operator acting on microstates, so if we start with a microstate $$\omega_1$$ then at the end of the process, the resulting microstate is $$P(\omega_1)$$. Note that the laws of physics are reversible on the microscopic level. What this means is that there exists a time-reversal operator $$T$$ acting on microstates, and a time-reversed evolution operator $$P^{*}$$ (itself describing a physically allowed process; for example, the time-reverse of expanding the container of a gas is contracting it) such that if $$\omega_2 = P(\omega_1)$$ then $$T\omega_1 = P^{*}(T\omega_2)$$ (where $$T^2 = 1$$). Note that this implies that $$P$$ is invertible, that is it conserves the number of microstates. (However, in general the inverse function $$P^{-1}$$ might not represent a physically allowed process).

If we take any accessible microstate at the beginning and then evolve it in time, at the end of the process the resulting microstate is clearly accessible. That is, $$P(\Omega_1)\subseteq \Omega_2$$. On the other hand, the reversibility of $$P$$ shows that $$|P(\Omega_1)| = |\Omega_1|$$ (where $$|\cdot|$$ is the size of a set). Therefore $$|\Omega_1| \leq |\Omega_2|$$ (this is the "proof" of the Second Law of Thermodynamics!)

Now any suppose that $$|\Omega_1| = |\Omega_2|$$. It follows that $$P(\Omega_1) = \Omega_2$$. I will assume that if a microstate is accessible then so is its time-reverse. Hence we see that $$P^{*}(\Omega_2) = P^{*}(T \Omega_2) = T \Omega_1 = \Omega_1$$. That is, the process $$P^{*}$$ precisely implements the reverse thermodynamic process. So processes that are thermodynamically irreversible must have $$|\Omega_2| > |\Omega_1|$$.

What happens for irreversible processes is that $$P^{*}(\Omega_2) \supsetneq \Omega_1$$. So there is some very small fraction of microstates in $$\Omega_2$$ which go back to the initial macrostate under $$P^{*}$$, but the probablity that we are in such a microstate is vanishingly small for large systems. Indeed, this probability is given by $$|\Omega_1|/|\Omega_2| = e^{S_1 - S_2}$$, (where we introduced the entropy $$S_j = \log |\Omega_j|$$), and entropy is an extensive quantity so the probability is exponentially small in system size.

Exercise for the reader: work out where the "thermodynamic arrow of time" slipped into the above argument. It's subtle!