Maxwell’s Demon

A small being guarding a door could sort hot from cold for nothing. Run the door yourself, build an engine powered by one bit, and find the price: forgetting

Maxwell’s Demon

In 1867 James Clerk Maxwell imagined a being small enough to see molecules, working a tiny door between two rooms. Let the fast ones through one way and the slow ones the other, and one room heats while the other cools, with no work done.

It took more than a century to find out what is wrong.

Run the Door

Watch the demon part hot from cold, then spoil its eyesight or take over the door yourself. After that let a spring do the job, first cold and then left alone.

At the door
0.0 k
entropy taken out of the gas
0
bits written down (0 after compressing the notebook)
—
entropy removed per bit written
0.693 k
the most there can be, ln 2
Fast discs may go to the right, slow ones to the left. One room heats and the other cools, and no work is done on the gas. Look at the notebook.
the gasthe notebook, compressedthe two together

Flat gas, k = 1, both rooms starting at temperature 1; insulating walls, so the total energy is fixed. Gas entropy is that of an ideal gas with the number and energy in each room, N ln(AT/N) for each, and ripples by about 1 k. The bits counted are the demon’s decisions alone: a real one must also notice when somebody arrives, so its notebook is longer still. The compressed length is what an adaptive code would need for this record.

Go deeper:A Very Observant and Neat-Fingered Being

The demon first appears in a letter from Maxwell to Peter Guthrie Tait in December 1867, and in print in Maxwell’s Theory of Heat of 1871. Maxwell did not think of it as a machine anyone might build. The point was that the second law is of a different kind from Newton’s laws: it is true of molecules in crowds, handled by beings who cannot see them one at a time. The name is Kelvin’s, from 1874.

The gas in the demo is an ideal gas to a good approximation, so the entropy of a room with N discs at temperature T in an area A is, up to a constant for each disc,

S = N k ln(A T/N)

(in three dimensions, N k ln(V T3/2/N)). It goes down while the demon works, whether by parting temperatures or by squeezing the gas into one room. What goes up is the length of the record. A one-way door that opens for a share p of the arrivals gains ln((1 − p)/p) of entropy each time it opens, so on average p ln((1 − p)/p) per decision. That is always less than the entropy of a yes or no with probability p:

p ln((1 − p)/p) < −p ln p − (1 − p) ln(1 − p) ≤ ln 2

Such a demon never comes near ln 2 for each bit it writes. The best it can do is about 0.28, when one arrival in five is let through, because most of its notebook is dull. Compress the notebook and the two come closer as the sorting goes on. When a share ε of the readings are wrong, each carries less, ln 2 − H(ε) at most, and the sorting stops where mistakes balance successes: at (1 − ε)/ε discs on the right for each on the left.

Could the door work itself, with no one to look and nothing to remember? In 1912 Marian Smoluchowski considered valves of every sort, of which a trapdoor on a spring is the simplest. To be opened by a single molecule it must be very light and its spring very weak. But such a door is also kicked about by the molecules it stops, until it has the same average energy as they do, ½kT for its motion. Then it opens by itself, as often as it is opened. Computer simulations by Petros Skordos and Wojciech Zurek, in 1992, showed just that. Keep the door cold and it rectifies, but then it is a heat engine between two temperatures, and there is nothing to explain. No passive device at one temperature can do the job, for a general reason: its equilibrium is a state in which everything, door and all, is equally likely to go forwards and backwards.

An Engine Powered by One Bit

Reduce the gas to one particle and the demon to one question. Run the cycle, hurry it, try guessing instead of looking, and then find out what a doubtful bit is worth.

measuring
measured work per cycle, average of 0
0.693 kT
kT ln 2, for a slow piston
0
bits written down, one a cycle
—
of kT ln 2, once there are 20 cycles to average
One bath, one temperature, and work every cycle: forbidden, if this were all there was to it. What changes from cycle to cycle is the notebook, which gains one bit each time.
measured: average force, and work of each cycleslow limit: force kT/length, and its areawork, and its average with error barwall at temperature T

One point particle; each time it reaches the end wall it leaves with a fresh thermal speed for temperature T, and it bounces elastically off the piston, followed exactly from bounce to bounce. Putting a thin partition in and taking it out is taken to cost nothing. The picture runs the push as fast as it must to finish in four seconds. A guesser stops at 0.8 of the box. The thousand cycles use the same rules without the picture, and count towards the force as well.

Go deeper:Information as Fuel

Leo Szilard’s paper of 1929 boiled the demon down to one molecule. Drop a partition in the middle; find out which side the molecule is on; let it push the partition away, as a piston, while the walls keep it at temperature T. A single particle in a length x pushes with an average force kT/x, and the area under that curve from half the box to the whole of it is

W = kT ln 2

which is drawn from the one bath as heat. Szilard concluded that the second law could be saved only if finding out, or remembering, has a price in entropy, and that one binary decision must cost at least k ln 2.

If the reading is wrong with probability ε, the average work from stopping the piston at a share x of the box is kT[(1 − ε) ln 2x + ε ln 2(1 − x)]. Its peak is at x = 1 − ε, where it equals kT[ln 2 − H(ε)]. The bracket is the mutual information I between the reading and the truth (see also Mutual Information). Takahiro Sagawa and Masahito Ueda showed in 2008 and 2010 that this is general. However the system is measured and whatever is then done to it, the work that can be got from one heat bath beyond the loss of free energy is bounded by

⟨W⟩ ≤ kT I

It has been done. In 2010 Shoichi Toyabe and colleagues watched a small bead on a tilted staircase of a potential, and put a barrier behind it each time it happened to jump up; it climbed, on information. In 2014 Jonne Koski and colleagues ran a Szilard engine on one electron in a tiny metal box, and measured close to kT ln 2 for each bit.

The ratchet and pawl is another of Smoluchowski’s examples, made famous by Richard Feynman’s lectures of the early 1960s. It looks as though it can turn only one way. But the pawl must be as warm as something, and if that is as warm as the vane, it lifts by itself with the probability e−ε/kT, where ε is the energy to lift it over a tooth. The vane manages to turn the wheel by a tooth with the very same probability. With T1 ≠ T2 it is a heat engine. It stalls when (ε + load)/T1 = ε/T2, and there its efficiency, load/(ε + load), is Carnot’s 1 − T2/T1. Juan Parrondo and Pep Español pointed out in 1996 that a real one touches both gases at once and so conducts heat even when stalled, which is what the leak in the demo does. See also: Engines.

The Price of Forgetting

Drag the handle to reset two hundred random bits: barrier down, tilt, barrier up, level. Then do it slower, ask which logic gates need paying for, and add up the demon’s whole account.

Play it for me
0 kT
work done per bit so far, average of 200
0.00 kT
least average work that could leave them so, ln 2 − H(share)
54.0%
of the bits are now 1
0.0
time taken (a bead crosses the flat well in about 1)
Each bead is one bit, as likely to be 0 as 1. Reset them all to 1: drag the handle down to lower the barrier, across to tilt, up to raise the barrier again, and back to level.
bits that began as 0bits that began as 1energy of a bead at each place

Beads in thick liquid at one temperature, followed by the Euler–Maruyama rule; energy in kT, the full barrier 12 kT high, beads drawn a little above the curve so that they do not hide one another. Work is the energy given to each bead when the well moves under it. 1 kT at 300 K is 4.14 × 10−21 J, and ln 2 is 0.693.

Go deeper:Where the Entropy Went

For thirty years after Szilard the usual answer was that looking is what costs: to see a molecule you must scatter light off it. In 1961 Rolf Landauer, at IBM, asked instead what computing must cost, and found that only one kind of step has to: the kind that cannot be run backwards. Two states of a memory that become one cannot both be followed by the same motion of everything, so the difference must go somewhere, into the surroundings. Erasing one random bit at temperature T gives off, on average, at least

Q ≥ kT ln 2

Charles Bennett showed in 1973 that any computation can be arranged in steps that run backwards, and in 1982 that a measurement can be, too: it only copies a bit onto a blank. So neither looking nor thinking need cost anything. But the demon’s notebook is finite. To go round again it must be wiped, and that costs at least as much as the bits ever earned. Leave it unwiped and the demon has simply used up a blank tape, as an engine uses up fuel.

Erase imperfectly, so that the bit is 1 with a probability p rather than with certainty, and the least work is kT[ln 2 − H(p)]. Go through the steps in a time τ and the average exceeds the least by an amount proportional to 1/τ, for τ long enough. Work varies from run to run, and some runs cost less than the bound, which is about averages. (The exact statement about all the runs together is Jarzynski’s; see also Free Energy.) In 2012 Antoine Bérut and colleagues carried out this very protocol with a bead of glass two thousandths of a millimetre across, in water, held by a laser in two wells. As they took longer over it the average heat came down towards kT ln 2, some 3 × 10−21 J.

Is the matter closed? Most physicists think so, but not all philosophers of physics. John Earman and John Norton argued in 1998 and 1999 that such arguments face a choice. Either the demon is taken to be a physical system obeying the second law, and then nothing needs to be said about information; or it is not, and then a principle about information needs support of its own. The reply is that Landauer’s principle may indeed be the second law in other words, and that it is worth having, because it says where in the cycle the cost must fall. What the demo shows is the first horn: every part of it obeys the ordinary statistics of jiggling things, and the account balances. See also: Shannon Entropy, the same H, and Counting Arrangements.

Key Takeaways

  • A demon can lower the entropy of a gas, by no more than k ln 2 for each bit it writes down.
  • A door that works itself is only a warm door: at one temperature no passive device can sort.
  • One known bit can be turned into kT ln 2 of work; a doubtful one into kT[ln 2 − H(ε)].
  • Looking and copying can be free, but forgetting cannot: erasing a random bit gives off kT ln 2 at least.

Spot a mistake or have an idea?

Search