“Young lady, in this house we obey the Second Law of Thermodynamics!”
- Homer Simpson
Here is a paradox:
A box is divided into two compartments, A and B. The box is filled with air at room temperature. The two compartments are connected by a tiny gate that will let one air molecule through at a time, when open. Assume that this gate can be opened and closed with no net expenditure of energy. A devilish microscopic lawn gnome controls this gate. When the gnome sees a fast-moving air molecule in compartment B approaching the gate, he opens it so that it goes into compartment A. Also, when a slow moving particle from compartment A approaches the gate, he opens the gate so that the particle goes into compartment B. At all other times the gnome keeps the gate closed. Lest this become too abstract, here is a picture:

Not surprisingly, over time the temperature of the air in compartment A becomes warmer (due to the higher kinetic energy of the air molecules there) and the temperature in compartment B gets cooler (we must have conservation of energy, after all).

Surprisingly, we have flouted the Second Law of Thermodynamics as the entropy of the system has been decreased. Any device that can convert a temperature difference to electricity, such as a Stirling Engine or thermocouple, could be used here to generate power from nothing.
So we have a paradox. Can you figure it out?
Novice Pitfall:
The answer is not that opening and closing the gate is taken to be an energy-free process. If you reason it out this much should be obvious because the gate’s operation is energy-neutral with respect to the rest of the system.

