Independent paper

The Demon and the Cost of Knowing

Maxwell imagined a tiny intelligence that could sort molecules and break the second law of thermodynamics for free. The century-long hunt for where the entropy goes ended by revealing that information itself is physical.

  • Physics
  • Thermodynamics
  • Information Theory

The second law of thermodynamics is the one physical law that seems to know which way time runs. For a century a tiny imagined demon threatened to run it backward — and the way the demon was finally beaten changed what we think information is.

The second law of thermodynamics is the one physical law that seems to know which way time runs. Drop a glass and it shatters; you never see the shards leap back together. Stir milk into coffee and it spreads; it never gathers itself back into a clean swirl. Heat flows from the hot cup into the cool room, never the reverse, until everything sits at one dull temperature. Physicists summarize all of this with a single quantity called entropy, a measure of how many microscopic arrangements of atoms would look the same to us at the large scale. A shattered glass can be arranged countless ways and still be a mess; an intact glass is special, one arrangement among very few. The second law says that in an isolated system entropy only ever increases, which is just to say that systems drift from special arrangements toward ordinary ones, because there are overwhelmingly more ways to be ordinary. It is less a law of force than a law of counting.

For all its solidity, the second law has a soft spot, and James Clerk Maxwell found it in 1867. Imagine, he said, a box of gas divided in two by a wall with a tiny door. The gas is all at one temperature, but that is only an average; individual molecules move at a range of speeds, some fast, some slow. Now station a small intelligent being at the door, a creature later called Maxwell’s demon. It watches the molecules approach and operates the door with perfect timing, letting fast molecules pass into the left half and slow ones into the right. It adds no energy; it only opens and closes a frictionless door at the right moments. After a while the left side is hot and the right side is cold, a temperature difference built from nothing, out of gas that started uniform. The demon has lowered the entropy of an isolated system for free, and a temperature difference is something you can run an engine on. If the demon is possible, you can build a machine that does useful work forever by sorting molecules, and the second law is broken.

This bothered physicists for a long time, far longer than you might expect, because the demon is hard to dismiss. You cannot defeat it just by saying intelligent doormen do not exist, since you could try to build a mechanical version, a clever valve that opens only for fast molecules. The challenge is real. Where, exactly, does the entropy you seem to destroy go?

The first crack in the demon came from Leo Szilard in 1929, who stripped the problem down to its essentials and noticed something that everyone had overlooked: the demon has to know which molecules are fast. It has to measure each one, and measurement is not free. But it took several more decades to find where the bill comes due. The answer, when it arrived, reshaped how we think about information itself. In 1961 Rolf Landauer, working at IBM, argued that the truly unavoidable cost is not in measuring or in thinking but in forgetting. A demon, or any machine, has a finite memory. To keep sorting molecules indefinitely it must keep recording which ones were fast, and eventually it has to erase old records to make room for new ones. Landauer showed that erasing information is a physical act with a minimum thermodynamic price. Wiping a single bit of memory must dump at least a small fixed amount of heat into the surroundings, an amount proportional to the temperature. Erasure increases entropy, irreversibly, and there is no way around it.

This is the resolution. The demon really can sort the molecules and really can lower the entropy of the gas. But to do so it must accumulate information, and to keep operating it must eventually erase that information, and the entropy generated by the erasure is always at least as large as the entropy the demon removed from the gas. The books balance. The second law survives, not because the demon cannot sort, but because knowing has a cost and forgetting has a larger one. Charles Bennett sharpened this argument in the 1980s, showing that the measurement and the sorting could in principle be done reversibly, for free, and that the whole unavoidable cost is concentrated in the erasure step. The demon is not defeated by ignorance. It is defeated by its own filing system.

What I find striking is what this did to the idea of information. Before Landauer, information seemed abstract, a thing of minds and symbols, floating above the physical world. After Landauer, information is physical. A bit stored in a memory is a real configuration of matter, and destroying it has consequences measured in heat and entropy, in joules and kelvin. The connection runs both ways. The thermodynamic entropy of a steam engine and the information entropy of a message, which Claude Shannon defined in 1948 using almost the same mathematics, turn out not to be a coincidence of formulas but two faces of one quantity. The demon, dreamed up to break the second law, ended up revealing that the law reaches further than anyone thought, all the way into the cost of computation. Every time a computer erases data it pays a tax that Landauer first calculated, and modern experiments have measured that tax in the laboratory, erasing single bits and detecting the minimum heat released.

So the glass still shatters and never reassembles, the coffee still mixes and never unmixes, and now we know that even a perfect, intelligent, frictionless demon cannot escape the drift, because to fight it the demon must remember, and to keep remembering it must forget, and forgetting is just entropy wearing a different mask.

Information turned out not to float above the physical world but to sit squarely inside it — a real configuration of matter, taxed in joules and kelvin every time a machine is forced to forget.

  1. Maxwell, J. C. (1871). Theory of Heat. Longmans, Green, and Co.
  2. Landauer, R. (1961). Irreversibility and heat generation in the computing process. IBM Journal of Research and Development, 5(3), 183–191.
  3. Bennett, C. H. (1982). The thermodynamics of computation: a review. International Journal of Theoretical Physics, 21(12), 905–940.