TITLE: Does the act of storing information (not its erasure) locally increase entropy in Maxwell's demon's memory?
QUESTION [4 upvotes]: 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?

REPLY [4 votes]: 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 system that only exchanges work with outsides 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 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 just will occur with very low probability but it is possible.
Landauer argues 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$.
Bennet starts with the idea that if the demon is operating as thermodynamically reversible machine (which in reality is close to impossible to construct), it can't produce any thermodynamic entropy so it works and breaks 2nd law. Now he assumes the 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) (logical jump) 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 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 needs to take place and the demon really decreases entropy of the system.
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. This means changing bits in memory in the course of operation can't be thermodynamically reversible, if the demon is writing to memory, 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
PDF: https://noise.ece.tamu.edu/research_files/info_thermal_entropy_web_published.pdf
[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
PDF: https://www.researchgate.net/publication/269339327_Demons_Maxwell's_demon_Szilard's_engine_and_Landauer's_erasure-dissipation
{"set_name": "stack_exchange", "score": 4, "question_id": 598398}