In 1867, James Clerk Maxwell came up with an intriguing puzzle in thermodynamics via a thought experiment. This has turned out to be much more illuminating and hard to solve than he might ever have imagined. The thought experiment can be stated as follows:
Imagine two gas chambers A and B. Chamber is filled with a gas and Chamber B is a vacuum. The Two chambers are connected via a door. When that door is opened, the gas molecules from Chamber A starts filling Chamber B and now both have come to a thermal equilibrium. The pressure of both chambers is now half of what it was before. This is what we call Joule`s expansion. This is an irreversible process, meaning we cannot reverse the process without applying some work to the system. Or can we?
Maxell imagined “a being who can play a game of skill with the molecules”. Lord Kelvin would later call it a “demon.” The demon has control of the door between chambers and opens it when a molecule moves toward chamber A and shuts it when any molecule from A moves toward B. Thereby reversing the process. The demon does no work and yet it can make sure that the gas molecules in the second chamber all go back into the first chamber. Thus it creates a pressure difference between the two chambers where none existed before the demon started its mischief.
Violating the Second Law of Thermodynamics
The same demon could be employed to violate the second law of thermodynamics, that is heat flows the wrong way, from cold to hot – this, in fact, was Maxwell’s original implementation of the demon. It looks as if the demon could therefore cause entropy to decrease in a system with no consequent increase in entropy anywhere else. In short, Maxwell’s demon appears to make a mockery out of the second law of thermodynamics. How on earth does it get away with it?
Remarkably, it turns out that because a demon needs to have a memory to operate (so that it can remember where it has observed a molecule and any other results of its measurement process), this act of storing information is associated with an increase in entropy, and this increase cancels out any decrease in entropy that the demon might be able to effect in the system. This connection between information and entropy is an extremely important insight.
The Maxwell demon is in fact a computational device that process and stores information. And it is possible to design such a device for a reversible process given that the size of the hard drive is large enough so that it doesn’t need to erase the information. Actually what a demon does is erase the information and not store it as erasing of information is associated with an increase in entropy. The Maxwell demon therefore beautifully illustrates the connection between entropy and information.
Some of the extracts in the above article are taken from Concepts in Thermal Physics by Stephen J. Blundell and Katherine M. Blundell.