One example in which the problem of a demon-gas system can be easily examined analytically is a ``tube demon,'' which operates at one end of a closed tube. See Figure 5.

The demon observes a small section at the of length
of a tube of
length D. If there are no molecules in this region, the demon inserts a
partition closing off the section. There is now a pressure difference
between the length
, which is empty, and the rest of the tube. The
gas has been compressed into a smaller volume, because the section closed
off by the demon is no longer accessible. The demon can now get work out of
the gas by expanding it into the full volume of the tube.
The only information gathered by the demon here is whether or not the
section is empty of particles. If the times at which the demon looks are
separated by sufficient time for the gas to have reached equilibrium,
successive observations will have uncorrelated values. For simplicity, the
length
can be chosen so that the two observational outcomes are
equally likely. Doing this enables us to approximate the algorithmic entropy
by the number of bits gathered. The entropy changes in the gas can be easily
calculated, so the ability of the demon to reduce the entropy of the
demon-gas system can examined.
If the tube has a length of D, then there is a probability of
that any given molecule is not a section of length
. If
there are N molecules, there is therefore a
chance
that no molecules are in the section. If the bits in the demon's memory are
to be uncorrelated, then it must be equally likely that the section be empty
or otherwise. The length
should therefore be given by the equation
The difference in the entropy of the gas due to the insertion of the wall can be determined using standard thermodynamics.
The demon therefore reduces the entropy of the gas by one bit each time it places a wall in the chamber. Unfortunately for the demon, this happens only half the times it looks. The demon must use on average two bits of its own memory for every bit of the gas's entropy it decreases. The entropy increase of the demon in therefore
which is twice as large as the drop in the entropy of the gas, so the second
law continues to hold. The demon's entropy rises at such a large rate in
comparison to the drop in the entropy of the gas because the demon does not
make full use of the observations it makes. When the demon observes a
particle within the length
, it does nothing to take advantage of
this information. It is more difficult to design a demon which would take
advantage of this, because the number and energy of the molecules within the
end are unknown by the demon.