Two Theories of Why the Demon Cannot Exist
First Theory: The Demon Needs a Torch
Consider wearing night vision goggles inside a room with no windows. Could anything be seen?
On first thought it would seem: "yes." But, at least in an idealised situation, the answer is "no".
If the contents and walls of the room are in thermal equilibrium, then every point inside the space must be emitting radiation (radiating and reflecting radiation) with the same intensity. And this is true at all wavelengths. Any point which did not do this would emit more radiation (or less radiation) than it received from the other points and so would cool (or warm). Eventually equilibrium would be established, with every point emitting equally. This is a consequence of the second law.
Since the same light at the same intensity is coming to the eye from every point, no point can be distinguished from any other. All that is seen is a uniform glow.
The demon finds itself in this position. It cannot see the incoming particles and so cannot decide when to cover up the hole. (The demon is stationed in front of a hole in a wall. It lets fast moving particles go through the hole to the chamber on the other side - the gas in this chamber is therefore at a higher temperature. Slow moving particles it prevents from going through, by covering the hole with a piece of wood. Assuming it can move the wood using negligible work it is breaking the second law - because it is creating a temperature difference without dissipating work.)
To remedy the situation the Demon must be equipped with a light. The filament in the bulb of the light is hotter than the temperature of the room and its light (radiated heat) makes the incoming particles visible.
Scattered Photons
The demon sends out a stream of photons (light quanta) from its torch and some of these hit incoming particles. A proportion of these bounce back into the demon's eye. Only in this way may the demon do its job. The scattering of the photons creates entropy, solving the "paradox" of Maxwell's Demon.
Creating Entropy
The filament of the demon's light bulb must be at a higher temperature than the room and its contents, otherwise it cannot do its job. The stream of photons the demon directs into the room, in order to see incoming particles, transfers heat energy from the bulb into the room. The net result is that some heat energy has been transferred from a high temperature - that of the filament - to a low temperature - that of the room. This, by definition, creates entropy. (The amount of entropy created is equal to q/Troom - q/Tfilament; where q is the amount of heat transferred and T is temperature.)
Necessarilly furnished with a flashlight therefore the demon is not breaking the second law.
A Second, More Recent, Theory: Information In the Demon's Brain:
(Sporus either does not understand or disagrees with this theory and is perhaps therefore unsuited to its exposition. For a complete discussion see the reference at the end. And see Suvrat above.)
How Might Information Be Destroyed?
Consider two rubber balls. Hold one at a height of two metres and the other at one metre. Let them both drop. If they are imaginary, perfect balls they will continue to bounce for ever. They will continue to bounce up to the heights they were dropped from - 2m & 1m. The information about what heights they were dropped from is never lost.
If, however, they are real balls their bouncing energy is quickly dissipated as heat and the information about their initial states is lost.
More formally: a reversible process (a process in which no entropy is created; a process conducted quasistatically - infinitely slowly - in a medium in which quasistatic processes dissipate no work), because it can be reversed, looses no information about its history. The only way information can be destroyed is in an irreversible process - a process in which there is a net increase in the total entropy of the universe. (Is there some sort of implication here that information is always about history, about the past? Is this remarkable for the past cannot be observed?)
The Demon's Brain
The demon has to classify the incoming particles into two types according to whether they are to be let through the hole or are to be blocked. It puts this type information into its brain and the brain then moves the demon's arms appropriately to block or uncover the hole. But the demon must get rid of the old information, in its brain, in order to create room, in its finite brain, for the next piece of information. Destroying information necessitates an irreversible process - entropy must be created.
Thus the demon creates entropy by continuously destroying the information in its brain and is not, therefore, violating the second law.
(Also see: Szilard Engine; which is similar to Maxwell's Demon but, perhaps, easier to analyse.
"Demons, Engines and the Second Law." Charles H. Bennett. Scientific American. Nov. '87. Page 88.)