{'fraction_non_alphanumeric': 0.039619384446970655, 'fraction_numerical': 0.015830912382636522, 'mean_word_length': 4.308895842646401, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Maxwell's Refrigerator: An Exactly Solvable Model

We describe a simple and solvable model of a device that -- like the"neat-fingered being"in Maxwell's famous thought experiment -- transfers energy from a cold system to a hot system by rectifying thermal fluctuations. In order to accomplish this task, our device requires a memory register to which it can write information: the increase in the Shannon entropy of the memory compensates the decrease in the thermodynamic entropy arising from the flow of heat against a thermal gradient. We construct the nonequilibrium phase diagram for this device, and find that it can alternatively act as an eraser of information. We discuss our model in the context of the second law of thermodynamics.

In this Letter we propose a simple, solvable model of a physical device that accomplishes the same result as Maxwell's intelligent and observant creature: it creates a flow of energy against a thermal gradient, without the input of external work. Our device is a classical two-state system that interacts with a pair of thermal reservoirs and a memory register, which we model as a stream of bits ( Fig. 1(a)). The dynamics consist of stochastic transitions, by means of which the device exchanges energy with the reservoirs and modifies the states of the bits. For appropriate values of the model parameters, these dynamics produce a steady state in which there is a continual flow of energy from the cold reservoir to the hot reservoir, and a record of the system's microscopic evolution is continually written to the stream of bits. Our device is fully autonomous, requiring no intervention by an external agent. Its ability to control the flow of energy between the reservoirs emerges entirely from the microscopic equations of motion.
The term "Maxwell's demon" has come to refer not only to the original setting described by Maxwell, but more generally to any situation in which a rectification of microscopic fluctuations produces a decrease of thermodynamic entropy [2,3]. A consensus has emerged that a physical device could achieve such a result, without violating the second law, if it were simultaneously to write information to a memory register [4][5][6][7][8]. In this view, the act of writing increases the information entropy of the memory register, thereby compensating the decrease of thermodynamic entropy produced by the device. If the information is later erased from the memory register, then by Landauer's principle [4,9] there must be an increase in thermodynamic entropy elsewhere. This tidy accounting places the Shannon entropy of a sequence of bits on the same thermodynamic footing as the Clausius entropy, defined in terms of heat and temperature. As long as the sum of these entropies never decreases, the second law remains satisfied. See, however, Refs. [10][11][12][13] for dissenting perspectives, which suggest that this consensus is at best an appealing narrative based on the presupposition of the second law, rather than an independent explanation.
Maxwell's demon has recently enjoyed increased attention in a broad range of settings, including artificial molecular machines [14], single photon cooling of atoms [15], biomolecular signal transduction [16], quantum information theory [17] and the feedback control of microscopic fluctuations [18][19][20][21][22][23][24][25][26][27][28][29][30][31][32][33]. Maxwell's nineteenthcentury thought experiment has become a touchstone for discussing the thermodynamic implications of information processing by physical systems [34][35][36][37]. While the consensus described above has identified and clarified these implications, far less effort has been devoted to uncovering precisely how a physical device, acting on its own, might accomplish the same result as Maxwell's hypothetical being [38][39][40][41][42][43]. To the best of our knowledge, the autonomous model we introduce below is the first to generate a flow of energy against a thermal gradient, effectively acting as a refrigerator without a power supply -just as in the setup considered by Maxwell, but with the intelligent creature replaced by a dumb device. This contrasts with an earlier model of a device that acts as an engine, supplying work by extracting heat from a single thermal reservoir [40]. Our autonomous framework also differs from that of Refs. [18][19][20][21][22][23][24][25][26][27][28][29][30][31][32][33] 1: (a) The device, or "demon", interacts with a sequence of bits, one at a time, while exchanging energy with two thermal reservoirs. (b) The demon makes intrinsic transitions mediated by the hot reservoir (vertical arrows), and the demon and nearest bit make cooperative transitions 0d ↔ 1u mediated by the cold reservoir (diagonal arrows).
experimental realization reported in Ref. [26]), in which external intervention in the form of measurement and feedback is a key element.
In what follows we describe our model and analyze its dynamics. We obtain a nonequilibrium phase diagram for the steady state behavior (Fig. 2), which reveals that our device can act either as a refrigerator, transferring energy from a cold to a hot reservoir, or as an eraser, decreasing the information content of the memory register. Finally, we briefly discuss our model in the context of the second law of thermodynamics.
Our model consists of four components, sketched in Fig. 1(a): a memory register, two thermal reservoirs at temperatures T c and T h > T c , and a device that plays the role of Maxwell's demon. The memory register is a sequence of bits (two-state systems) spaced at equal intervals along a tape that slides frictionlessly past the demon. The demon interacts with the nearest bit and with the reservoirs, as we describe in detail in the following paragraphs.
The demon itself is a two-state system, with states u and d characterized by an energy difference ∆E = E u − E d > 0. It can make random transitions between these two states by exchanging energy with the hot reservoir, as illustrated by the vertical arrows in Fig. 1(b). We will refer to these as intrinsic transitions, to emphasize that they involve the demon but not the bits. The corresponding transition rates satisfy the requirement of detailed balance [1], where β h = 1/kT h and k is Boltzmann's constant. We parametrize these rates as (2) where γ > 0 sets a characteristic rate for these transitions, and 0 < σ < 1.
Each bit has two states, 0 and 1, with equal energies. We assume there are no intrinsic transitions between these two states. That is, the state of the bit can change only via interaction with the demon, as we now discuss.
At any instant in time, the demon interacts only with nearest bit. As a result, it interacts sequentially with the bits as they pass by. The duration of interaction with each bit is τ = l/v, where l is the spacing between bits and v is the constant speed of the tape. During one such interaction interval, the demon and the nearest bit can make cooperative transitions: if the bit is in state 0 and the demon is in state d, then they can simultaneously flip to states 1 and u, and vice-versa ( Fig. 1(b), diagonal arrows). We will use the notation 0d ↔ 1u to denote these transitions, which are accompanied by an exchange of energy with the cold reservoir. The corresponding transition rates again satisfy detailed balance, R 0d→1u /R 0d←1u = e −βc∆E , where β c = 1/kT c , and we will parametrize them as follows [45] whose value, 0 < < 1, quantifies the temperature difference between the two reservoirs. Finally, we assume that the incoming bit stream contains a mixture of 0's and 1's, with probabilities p 0 and p 1 , respectively, with no correlations between bits. Let denote the proportional excess of 0's among incoming bits. We thus have the following dynamics. When a fresh bit arrives to interact with the demon, its state is 0 or 1. The demon and bit subsequently interact for a time τ , making the transitions shown in Fig. 1(b), thereby exchanging energy with the reservoirs. The state of the bit at the end of the interaction interval is then preserved as the bit joins the outgoing stream, and the next bit in the sequence moves in to have its turn with the demon. The parameters γ, σ and ω define the intrinsic and cooperative transition rates (Eqs. 2, 3), τ gives the duration of interaction with each bit, and δ specifies the statistics of the incoming bits. Under these dynamics, the demon evolves to a periodic steady state, in which its behavior is statistically the same from one interaction interval to the next.
Before proceeding to the solution of these dynamics, we discuss heuristically how our model can achieve the systematic transfer of heat from the cold to the hot reservoir. For this purpose let us assume that each incoming bit is in state 0, hence δ = 1. At the start of a particular interaction interval, the joint state of the demon and newly arrived bit is either 0u or 0d. The demon and bit then evolve together for a time τ , according to the transitions shown in Fig. 1(b). If the joint state at the end of the interaction interval is 0u or 0d, then it must be the case that every transition 0d → 1u was balanced by a transition 0d ← 1u, hence no net energy was absorbed from the cold reservoir. If the final state is 1u or 1d, then we can infer that there was one net transition from 0d to 1u, and a quantity of energy ∆E was absorbed from the cold reservoir. This amounts to thermal rectification: over the course of one interaction interval, energy can be withdrawn from the cold reservoir but not delivered to it. Moreover, a record of this process is imprinted in the bit stream, as every outgoing bit in state 1 indicates the absorption of energy ∆E from the cold reservoir. Since the demon also exchanges energy with the hot reservoir, and since energy cannot accumulate indefinitely within the demon, in the long run we get a net flux of energy from the cold to the hot reservoir, proportional to the rate at which 1's appear in the outgoing bit stream.
More generally, if the incoming bit stream contains a mixture of 0's and 1's, then an excess of 0's (that is, δ > 0) produces a statistical bias that favors the flow of heat from the cold to the hot reservoir, while an excess of 1's (δ < 0) produces the opposite bias. This bias either competes with or enhances the normal thermodynamic bias due to the temperature difference between the two reservoirs. The demon thus affects the flow of energy between the reservoirs, and modifies the states of the bits in the memory register. We now investigate quantitatively the interplay between these two effects.
Once the demon has reached its periodic steady state, let p 0 and p 1 denote the fractions of 0's and 1's in the outgoing bit stream, and let δ = p 0 −p 1 denote the excess of outgoing 0's. Then represents the average production of 1's per interaction interval in the outgoing bit stream, relative to the incoming bit stream. Since each transition 0 → 1 is accompanied by the absorption of energy ∆E from the cold reservoir ( Fig. 1(b)), the average transfer of energy from the cold to the hot reservoir, per interaction interval, is given by A positive value of Q c→h indicates that our device pumps energy against a thermal gradient, like the creature imagined by Maxwell.
To quantify the information-processing capability of the demon, let (8) denote the information content, per bit, of the incoming bit stream, and define S(δ ) by the same equation, for the outgoing bit stream. Then provides a measure of the extent to which the demon increases the information content of the memory register. We will interpret a positive value of ∆S B to indicate that the demon writes information to the bit stream, while a negative value indicates erasure. (More precisely, since S(δ ) neglects the small correlations that arise between the outgoing bits, ∆S B reflects the change in the Shannon information of the marginal probability distribution of each outgoing bit.) From Eqs. 7 and 9 we see that Φ determines both Q c→h and ∆S B . In the Supplemental Material, we show that under the dynamics we have described, the demon reaches a periodic steady state, determined by the model parameters Λ ≡ (δ, σ, γ, ω, τ ), in which and Eq. 11 is a strict inequality when δ = . An explicit expression for η(Λ) is given in the Supplemental Material, but for our present purposes the crucial point is that the sign of Φ is the same as that of δ − . We can think of two effective forces: the bias induced by the incoming bit stream, which favors Φ > 0 when δ > 0 (as discussed above), and the temperature gradient, quantified by , which favors Φ < 0 (Eq. 7). When these compete, the winner is determined by the difference δ − . Eq. 10 is obtained by solving for the periodic steady state of the demon, using a linear-algebraic approach. Eq. 11 is obtained by constructing a Lyapunov function for the demon and interacting bit. The details of these derivations are provided in the Supplemental Material. Here, we instead use these results to investigate the behavior of our model in the periodic steady state. To that end, we fix γ and ω and construct a phase diagram that illustrates the dependence on δ and , for various values of τ , shown in Fig. 2. Let us consider the different regions of this diagram, working our way from right to left.
From Eqs. 7 and 10 it follows that Q c→h > 0 when δ > , shown as the most darkly shaded region in Fig. 2.
Here, a surplus of incoming 0's prevails over the temperature difference and our demon generates a flow of energy from the cold to the hot reservoir. Moreover, Eq. 11 reveals that ∆S B > 0 in this region (since β h < β c ). This agrees with the consensus described earlier: in order for a physical device to act in the manner of Maxwell's demon, it must write information to a physical memory register. In this sense, a bit stream with a low information content can be viewed as a thermodynamic resource, which can be expended (by writing to the available memory) in order to achieve refrigeration. Now consider the region > δ > 0, in which the surplus of 0's in the incoming bit stream is not sufficient to overcome the temperature gradient, and energy flows from the hot to the cold reservoir. Since Φ < 0 we get δ > δ > 0 (Eq. 6). This in turn implies ∆S B < 0, as S(δ) is a concave function with a maximum at δ = 0. In this region the demon acts as an eraser, lowering the information content of the bit stream, but the price paid for this erasure is the passage of heat from the hot to the cold reservoir.
In the region δ < 0, energy flows from the hot to the cold reservoir (Eqs. 7, 10), but the value of ∆S B depends on all the model parameters. In Fig. 2, for four different values of τ , we show the line corresponding to ∆S B = 0. To the right of this line we have ∆S B < 0 and to the left we have ∆S B > 0. In the limit τ → ∞, the boundary between these two behaviors approaches the line = −δ.
Examining the phase diagram as a whole, we see that in the shaded regions our model reaches a steady state in which one thermodynamic resource is replenished at the expense of another. Either energy is pumped against a thermal gradient at the cost of writing information to memory (the refrigerator regime), or else memory is made available, by erasure, at the expense of allowing energy to flow from the hot to the cold reservoir (the eraser regime). The boundary between these two behaviors is the line δ = . In the unshaded region at the far left, both resources are consumed, as energy flows down the thermal gradient and information is written to the bit stream.
Finally, to place our model within the context of the second law of thermodynamics, note that the first term on the left side of Eq. 11 is the steady-state change in thermodynamic entropy due to the flow of heat, and the second term is the change in information entropy, per interaction interval. Eq. 11 can be viewed as a modified Clausius inequality, in which the information entropy of a random sequence of data is explicitly assigned the same thermodynamic status as the physical entropy associated with the transfer of heat. (More precisely, Eq. 11 is a weak version of this inequality, as we neglect correlations among the outgoing bits; see Supplemental Material.) Thus our model provides support for the consensus mentioned earlier [4][5][6], and Eq. 11 is consistent with Landauer's principle [4], which states that a thermodynamic cost must be paid for the erasure of memory. However, in Ref. [4] this cost appears as the dissipation of energy into a single thermal reservoir, whereas in our model it is the transfer of energy from a hot to a cold reservoir.
In summary, we have constructed a simple, solvable model of an autonomous physical system that mimics the behavior of the "neat-fingered being" in Maxwell's thought experiment, generating a systematic flow of energy against a thermal gradient without the input of external work. While Maxwell's creature accomplishes this with intelligence, our inanimate device requires only a memory register to which information can be written. Alternatively, it can harness the flow of energy from hot to cold in order to erase information from the register.
We thank Andy Ballard, Shaon Chakrabarti, Sebastian Deffner, and Zhiyue Lu for useful discussions, and gratefully acknowledge financial support from the National Science Foundation (USA) under grants DMR-0906601, ECCS-0925365, and DMR-1206971, the University of Maryland, College Park, and Peking University. Solving for Φ involves first solving for the periodic steady state of the demon, then using that solution to determine the distribution of the outgoing bits, from which Φ follows by Eq. 6 of the main text. We will use the notation p D = (p u , p d ) T (where the superscript T indicates transpose) to denote the statistical state of the demon, p B = (p 0 , p 1 ) T for that of the interacting bit, and p = (p u0 , p d0 , p u1 , p d1 ) T to denote their joint probability distribution.
Let T denote the 2 × 2 transition matrix whose element T µν (µ, ν ∈ {u, d}) gives the probability for the demon to be in state µ at the end of an interaction interval, given that it was in state ν at the start of the interval. As explained below, this matrix can be written as the product where Here R is the transition rate matrix for the demon and the interacting bit. Its off-diagonal elements are given by Eqs. 2 and 3 of the main text, and its diagonal elements are determined by the requirement that the elements in each column sum to zero [1]. To understand Eq. 12, let p D 0 denote the distribution of the demon at the start of a given interaction interval. Then p 0 = Mp D 0 gives the initial joint distribution of the demon and the incoming bit.
From this initial, uncorrelated state the joint distribution evolves under the master equation dp/dt = Rp, therefore p τ = exp (Rτ )Mp D 0 gives the joint distribution at the end of the interaction interval. The matrix P D then projects out the state of the bit, thus p D τ = P D exp (Rτ )Mp D 0 = T p D 0 gives the final marginal distribution of the demon. The evolution of the demon over many intervals is given by repeated application of the matrix T . Because T is a positive transition matrix [2], the demon evolves to a periodic steady state, defined uniquely by Therefore, to solve for Φ, we first compute the elements of T using Eq. 12, then find its right eigenstate p D,ps 0 (Eq. 15), then determine p B,ps τ = (p 0 , p 1 ) T using Eq. 16. Φ then follows directly from Eq. 6 in the main text: We performed these calculations using Mathematica [3], and then simplified the results substantially by hand, finally obtaining If the demon's intrinsic transitions occur rapidly in comparison with the cooperative transitions, γ → ∞, then the analysis simplifies substantially: the demon remains in equilibrium with the hot reservoir at all times, and the interacting bit obeys the master equation d dt is the probability to find the bit in state j ∈ {0, 1} at time t during the interaction interval. Integrating Eq. 18 over one interaction interval, 0 ≤ t ≤ τ , then setting p 1 = p B 1 (0) and p 1 = p B 1 (τ ) in Eq. 6 of the main text, we obtain As a consistency check, we note that this result also follows from our general solution, Eq. 17, with the expression for η(Λ) evaluated in the limit γ → ∞. Our general expression for η(δ, σ, γ, ω, τ ), while exact, is sufficiently complex that we are unable to derive the inequality η > 0 (which was crucial in our interpretation of the phase diagram in the main text) directly from Eq. 17. Instead we will show in Appendix that this inequality follows from the modified Clausius inequality, Eq. 11 of the main text, which we now derive. the start of the interaction interval, hence I 0 (D; B) = 0. In the periodic steady state we have S D τ = S D 0 , because the demon starts and ends in the same distribution. Hence the difference S τ − S 0 in Eq. 27 can be replaced by ∆S B − I τ (D; B). We also have p D 0 = p D τ in the periodic steady state, so the first sum appearing in Eq. 27 vanishes. Once the period steady state has been reached, the bit distributions p B 0 and p B τ correspond to the statistics of the incoming and outgoing bit streams, defined in the main text: Collecting these results, we get which then combines with Eq. 26 to give us An alternative derivation of this result can be constructed using the integral fluctuation theorem for total entropy production [5]. The first inequality in Eq. 32 is stronger than the modified Clausius statement, Eq. 25. This underscores the fact that Eq. 25 is a weak statement of the second law of thermodynamics (as it applies to our model), since it neglects correlations in the outgoing bits: the quantity ∆S B is defined in terms of the marginal distribution of each bit. In reality the bits do develop correlations via their interactions with the demon, as the state of the demon at the end of one interaction interval is also its initial state at the beginning of the next interval. (Explicit numerical simulations indicate that these correlations are small, but not zero.) If these correlations were to be taken into account, then the net change in the Shannon entropy per bit would have a value slightly lower than ∆S B , and Eq. 25 would be replaced by a somewhat stronger bound. These considerations are reflected, somewhat indirectly, by the term I τ (D; B) in Eq. 32.
Finally, note that using Eqs. 21 and 22b, and the definitions of and σ. Thus, when δ = , the incoming bits arrive in the stationary distribution p. In this case, no relaxation occurs during the interaction interval; the equality holds in Eqs. 24 and 26; the outgoing bits depart with the same distribution; and Φ = 0. When δ = , Eqs. 24 and 26 are both strict inequalities, and therefore so is the modified Clausius inequality (Eq. 25 / Eq. 11).
By construction, d 2 f /dδ 2 < 0. Setting df /dδ = 0, the unique maximum of f (δ) is easily shown to occur at δ = , as illustrated in Fig. 3(a) for = 1/3. Now let δ 1 and δ 2 denote two values of δ that correspond to the same value of f , with δ 2 < < δ 1 , as shown in Fig. 3(b). Let δ 1 describe the surplus of 0's in the outgoing bit stream, when the incoming stream is characterized by δ 1 . Because the maximum of f (δ) occurs at δ = , Eq. 34 implies that δ 2 < δ 1 < δ 1 ; see Fig. 3(b). If we instead consider incoming and outgoing bit streams described by δ 2 and δ 2 , then the same argument gives us δ 2 < δ 2 < δ 1 . We therefore conclude that the incoming and outgoing bit streams necessarily satisfy in other words δ lies on the same side as with respect to δ. Since we must have η(Λ) > 0.