Expansion into a vacuum
A gas starts in the left half of a box. Open the partition, and follow how the particles spread over the box and how the number of microstates grows.
aParticles in the box
nL = of Ω = S = kB
bFraction in the left half, and entropy
Number of particles N
The particles do not interact, as in an ideal gas. nL is the number of particles in the left half, and Ω = N!/[nL! (N − nL)!] is the number of ways to choose which particles they are. The entropy is S = kB ln Ω. The dashed lines mark the even split and the largest possible value of ln Ω.