# Does the act of storing information (not its erasure) locally increase entropy in Maxwell's demon's memory?

I have the following confusion with Maxwell's demon thought experiment and its resolution.

According to this thought experiment, when the demon's memory space becomes completely full, it erases information, and it is the act of erasure of information that causes the entropy of the Universe to increase so as not to violate the 2nd law of thermodynamics.

Question But what happens before the erasure of information? What's going on till the information is not erased?

Assume that the gas and the demon together form one isolated system. Also, assume that the demon can store information for a finite time. During this finite time, in which the act of storing information (and not erasing) takes place, the entropy of the gas configuration definitely decreases. Does that mean in order to conserve the entropy of an isolated system, the entropy of the demon's memory increase? Does that mean not only erasure but also the storing of information leads to a local increase in entropy?

If this act of storing is not associated with an entropy increase in the demon's memory, then during the time of storing information, how will one account for the decrease in entropy of the gas and yet save the 2nd law of thermodynamics?

during the time of storing information, how will one account for the decrease in entropy of the gas and yet save the 2nd law of thermodynamics?

In Landauer's/Bennett's thinking, there is no need to account for that - temporary decrease of entropy possible with any memory device is so small it is fluctuation.

There are two commonly used variants of 2nd law. One is the simple but less accurate classical thermodynamics version, where entropy of a system that only exchanges work, not heat, with outside, can't decrease. This is useful and accurate enough for many applications of thermodynamics to macroscopic systems.

There is also the more informed statistical physics version, which takes into account fluctuations: decrease of entropy of such thermodynamic system can happen, but probability of such event is very low, and the greater the entropy drop, the lower the probability.

The idea of Maxwell's demon originally is to break the second variant: maybe there can be a device that takes advantage of the fluctuations and accumulates their effect in single direction that reliably and measurably decreases entropy of the system. If such device was constructed and verified to work, the second variant of 2nd law would become incorrect.

We already know the first variant is overly confident about what cannot happen, because we know about molecules and any mechanical or probabilistic model of them in simulations can result in temporary entropy decrease. It will occur with very low probability, but it is possible.

Landauer argues/assumes that informationally irreversible operations have to be also thermodynamically irreversible, thus erasing $$N$$ bits of information must increase thermodynamic entropy by something like $$Nk_B\ln 2$$ (the erasure principle, an interesting, plausible idea which I think is a logical jump, an idea with poor justification).

Bennet adopts the erasure principle and shows it can explain why Maxwell's demon, even it decreases entropy of the gas, overall does not violate 2nd law, because it produces enough entropy to make up for the decrease.

He starts with the idea that if the demon is operating as a thermodynamically reversible machine (which in reality is close to impossible to construct), it can't produce any thermodynamic entropy, so it works as intended, and breaks 2nd law. Now he assumes this breaking is impossible, so any real instance of the demon has to have some irreversibility to it, and Bennet finds it in the fact that 1) it needs to write to memory 2) it has to erase it after some time to continue working 3) this erasure is obviously informationally irreversible, the information can't be reconstructed from the memory after the erasure 4) (erasure principle) this informationally irreversible process has to be also thermodynamically irreversible process (generating thermodynamic entropy).

Bennet then takes this as valid result and claims it solves the problem with the demon: that the modern probabilistic variant of 2nd law is saved because the erasure principle: the thermodynamic entropy produced is enough (is it? this needs some quantitive analysis) to prevent systematic decrease of entropy in the system so the only decrease possible is that consistent with fluctuations.

So I think Landauer and Bennett would answer your question as follows: if the demon just works reversibly (both thermodynamically and informationally) which they assume is possible for some number of cycles, then no entropy production takes place and the demon really decreases entropy of the system. This stops at some point when the memory needs to be erased, because then some entropy (according to the erasure principle) has to be generated.

Now to make things balanced, I don't believe Landauer's and Bennett's arguments are very convincing. As argued by Laszlo Kish et al. in several papers [1],[2], information entropy is different from thermodynamic entropy, freeing memory is not usually done by zeroing memory but by shifting the address of start of the free memory, and even zeroing memory requires at least energy $$k_B T \ln 2$$ only for those bits that get flipped, not all of them. This means changing bits in memory in the course of operation can't be thermodynamically reversible; if the demon is writing to memory, already then, each bit change requires some generation of thermodynamic entropy.

[1] L. B. Kish, D. K. Ferry, Information entropy and thermal entropy: apples and oranges (2017), J Comput Electron, DOI 10.1007/s10825-017-1044-1

[2] L. B. Kish et al. Demons: Maxwell's demon, Szilard's engine and Landauer's erasure-dissipation (2013), Hot Topics in Physical Information (HoTPI-2013) International Journal of Modern Physics: Conference Series Vol. 33 (2014), DOI: 10.1142/S2010194514603640

• @Lalinsky [1] begs to my mind the question as to whether information-theoretic entropy or thermodynamic entropy is more fundamental? (I would have made this into a separate question but I wanted your take on it.) Commented Dec 5, 2020 at 15:13
• They are different concepts with different uses. In special cases thermodynamic entropy function of state variables can be found through information entropy, but information entropy has uses beyond thermodynamics. Commented Dec 5, 2020 at 19:46
• Even if one accepts Landauer's principle, there is the additional problem that no one has shown that erasure produces enough entropy in a general Maxwell's demon to make up for the entropy decrease of the system.
– pwf
Commented Dec 7, 2020 at 17:18
• One key principle in deriving the second law is Liouville's theorem that roughly says dynamics should preserve volume in phase space--thinking in these terms might we say that there is no problem with reliable temporary reductions in entropy, it just requires dividing phase space into macrostates in such a way that initial macrostate with volume V reliably evolves into one of several later macrostates with volumes v1, v2, ..., vN that are individually smaller than V, but collectively sum to be greater than or equal to V? Commented Jun 5 at 15:07
• In particular we might define macrostates by temperature on each side of barrier (or total particle number/energy on each side) and by the state of the demon's memory, then we'd start in a macrostate with more uniform temp on both sides and blank memory, that can evolve into a number of different macrostates that each have different sequences of 1's and 0's in memory along with less uniform temperature, such that each of those later macrostates has smaller volume in phase space than initial macrostate, but sum of their volumes is greater than or equal to initial one. Commented Jun 5 at 15:11