Removing and replacing a barrier between two gas halves should conserve entropy — resolves an apparent violation of the 2nd law via indistinguishability.

Same Gas

Before barrier removal: S=2NkBlnV
After removal (naive): S=2NkBln(2V)=2NkBlnV+2NkBln2 ← entropy increased?
Fix: particles are indistinguishable, so microstates =VN/N!

S=2kBlnVNN!=2NkBlnV2NkBlnN2NkB

After removal (corrected):

S=kBln(2V)2N(2N)!=2NkBlnV2NkBlnN2NkB

Same — no entropy change.

Two Different Gases

Now the two sides have distinguishable particles (blue vs red). Mixing increases entropy:

ΔS=2NkBln2

Replacing the barrier leaves N/2 blue and N/2 red on each side — not the original state. The number of ways to arrange this mixed partition adds back:

ΔS=2NkBln2

So entropy stays elevated — consistent with the 2nd law.
Key point: entropy change from mixing depends on whether the particles are distinguishable. Same gas → no entropy of mixing. Different gases → ΔS=2NkBln2.