{'fraction_non_alphanumeric': 0.0443200436919716, 'fraction_numerical': 0.009912616056799562, 'mean_word_length': 4.014514583048062, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Feynman's ratchet and pawl: an exactly solvable model

We introduce a simple, discrete model of Feynman's ratchet and pawl, operating between two heat reservoirs. We solve exactly for the steady-state directed motion and heat flows produced, first in the absence and then in the presence of an external load. We show that the model can act both as a heat engine and as a refrigerator. We finally investigate the behavior of the system near equilibrium, and use our model to confirm general predictions based on linear response theory.


INTRODUCTION
Feynman's ratchet and pawl system [1] is a well known (but not the earliest! [2]) example of a proposed "mechanical Maxwell's demon", a device whose purpose is to convert into useful work the thermal motions present in a heat reservoir. The idea is beautifully simple: set up a ratchet and pawl so that a wheel is allowed to turn only in one direction, then attach that wheel to a windmill whose vanes are surrounded by a gas at a finite temperature; see Fig.46-1 of Ref. [1]. Every so often, an accumulation of collisions of the gas molecules against the vanes will cause the wheel to rotate by one notch in the allowed direction, but presumably never in the forbidden direction. Such rectification of thermal noise could be harnessed to perform useful work (such as lifting a flea against gravity), in direct violation of the Second Law. Of course, in order for statistical fluctuations to cause rotation at a perceptible rate, the ratchet and pawl must be microscopic, and this points to the resolution of the paradox. If thermal motions of the gas molecules are sufficient to cause the wheel to rotate a notch, then the thermal motion of the pawl itself will occasionally cause it to disengage from the ratchet, at which point the wheel could move in the "forbidden" direction. Feynman compared the rates of the two processes -rotation in the allowed and the forbidden directions -and found them to be equal when the system is maintained at a single temperature. Thus no net rotation arises, and the Second Law is saved.
Since the failure of the ratchet and pawl system to perform work arises from thermal fluctuations of the pawl, a natural solution to the problem is to reduce these fluctuations by externally cooling the pawl to a temperature below that of the gas. In this case the device does indeed operate as designed, but this no longer constitutes a violation of the Second Law: the ratchet and pawl is now effectively a microscopic heat engine, capitalizing on a temperature difference to extract useful work from thermal motions.
Our purpose in this paper is to introduce an exactly solvable model of Feynman's microscopic heat engine. This model is discrete rather than continuous 1 , but it captures two essential features of the original example: (1) a periodic but asymmetric interaction potential between the ratchet and the pawl (corresponding to the sawtooth shape for the ratchet's teeth), and (2) two "modes" of interaction (corresponding to the pawl being either engaged or disengaged from the ratchet). These features are sufficient for the model to reproduce the behavior discussed by Feynman. Related discrete models of noise-induced transport have appeared in the literature [16][17][18]; however, we believe ours to be the first exactly solvable model in which (as in Feynman's example) the transport is explicitly driven by a temperature difference between two reservoirs.
In Section I, we will introduce our model -a system in contact with two heat reservoirs -and consider it in the absence of an external load. We will solve for the net rate at which the device produces directed motion, in terms of the reservoir temperatures T A and T B (Eq.14). We will also solve for the net rates of heat flow from reservoir A to the system, and from the system to reservoir B; see Fig.3. For zero external load, these rates,Q A andQ B , must be equal, as we will indeed find them to be. We will finally use these results to solve for the entropy production rate.
In Section II, we will allow the device to perform work against an external load, f . We will again solve exactly for the directed motion and heat flows, in terms of x ≡ (f, T A , T B ). In this situation, the heat flowsQ A andQ B are not necessarily equal; the difference between them is the power,Ẇ , which the device delivers against the load f . WhenẆ > 0, the system operates as a heat engine. Conversely, one can imagine that for some parameter values, the system will operate as a refrigerator, creating a net flow of heat from the colder to the hotter reservoir. In Section III we will use our analytical results to show that our model indeed exhibits both these behaviors (heat engine and refrigerator). Finally, in Section IV we will consider the near-equilibrium regime of small load and temperature difference. We will show that our model confirms general predictions based on linear response theory.

I. ZERO EXTERNAL LOAD
Consider a particle which jumps between neighboring sites along a one-dimensional regular lattice, where d is the lattice spacing. We assume that the particle is coupled to a heat reservoir at temperature T B , and that its jumps are thermal in nature. That is, the probability (per unit time) of making a jump to site i + 1, starting from site i, is related to the probability rate of the inverse process by the usual detailed balance relation: is the instantaneous change in the particle's potential energy, associated with the jump from i to i + 1. We use the notation U (m) i to denote the potential energy of the particle at site i; the superscript m denotes the "mode" of the potential, to be explained momentarily. The integer index i runs from −∞ to +∞, and we are using units in which Boltzmann's constant k B = 1.
Next, we assume that the potential energy function U (m) i has two possible modes, m = 1, 2, and that it changes stochastically between these two. In the first mode, the energy of each site is zero: U (1) i = 0. In the second mode, the energy is periodic: U , where α is a positive constant with units of energy. As shown in Fig.1, the second mode is a discrete version of an asymmetric sawtooth potential. We assume that the stochastic process governing the changes between modes is also a thermal process, driven by a heat reservoir at temperature T A . Thus, the probability rate of a change to mode 2, starting from mode 1, relative to the probability rate of the reverse mode change, is given by the detailed balance factor exp(−∆E/T A ), where ∆E = U is now the (site-dependent) change in particle energy due to an instantaneous change from mode 1 to mode 2.
We now describe more precisely these two stochastic processes, governing the jumps of the particle, and the change between modes. We assume the processes are independent, and each is a Poisson process occurring at a rate Γ. That is, during every infinitesimal time interval δt, there is a probability Γδt that the particle will attempt a jump to a neighboring site. An "attempt" looks as follows. First, the particle decides (randomly, with equal probability) whether to try jumping to the left (−d) or to the right (+d). Then the Metropolis algorithm [23] is used to satisfy detailed balance: if the value of ∆E associated with the jump is zero or negative, then the jump takes place; if ∆E > 0, then the jump occurs with probability exp(−∆E/T B ). Similarly, during every infinitesimal time interval δt, there is a probability Γδt that the mode will attempt to change, and the attempt is accepted or rejected according to the Metropolis algorithm (at temperature T A ).
We have introduced three parameters which we will view as being "internal" to the system: d, α, and Γ; these essentially set the relevant length (d), energy (α), and time (Γ −1 ) scales. The two remaining parameters T A and T B , we will view as "external".
The analogy between our model and Feynman's ratchet and pawl runs as follows. First, the position of our particle corresponds to an angle variable, θ, specifying the orientation of the ratchet wheel. When the particle accomplishes a net displacement of three lattice sites, to the right or to the left, this is equivalent to the ratchet being displaced by one notch, or tooth 2 ; see Fig.1. Since we want to keep track of the wheel over long intervals of time, possibly including many full rotations, θ varies from −∞ to +∞, rather than being a periodic variable from 0 to 2π.
When a ratchet and pawl are "engaged" -that is, when the pawl actually presses against the teeth of the ratchet -then there exists an interaction energy, arising from the compression of the spring which holds the pawl against the ratchet, which has the form of a periodic sawtooth potential in the variable θ. In our model, the analogue of this interaction energy is the discrete sawtooth potential U (2) i ; mode 2 thus corresponds to the situation in which the ratchet presses against the pawl. By contrast, mode 1 corresponds to the ratchet and pawl begin "disengaged", as will occur every so often as a result of thermal fluctuations of the pawl. Of course, in Feynman's system, the potential energy of the disengaged mode is always greater than that of the engaged mode (due to the spring compression needed to actually place the pawl out of reach of the ratchet's teeth), whereas in our model this is not the case: U (1) i = 0. This, however, does not change the problem in any qualitatively significant way.
As mentioned, the motion of the particle from site to site is a thermal process occurring at temperature T B , while the stochastic "flashing" between modes occurs at temperature T A . Thus, in the context of the analogy with the physical ratchet and pawl, T B denotes the temperature of the gas surrounding the panes connected to the ratchet wheel, and T A is the temperature at which the pawl is maintained.
To analyse the model, we first note that it maps nicely onto the problem of a spin-1/2 particle, A, coupled to a spin-1 particle, B, with the following energy function: where S A = ±1/2 and S B = 0, ±1. Here, spin A represents the mode (pawl), spin B represents the particle (ratchet). When spin A is "down" (S A = −1/2), the energy of the system is independent of the state of spin B, as with mode 1; when spin A is "up", the energy is −α, 0, or +α, depending on the state of spin B, as with mode 2. Thus, changes in the state of spin A correspond to changes in the mode, whereas changes in the state of spin B correspond to the particle making a jump. If S B changes from -1 to 0, or from 0 to +1, or from +1 to -1, then this amounts to the particle jumping to the right; the reverse processes (0 to -1, etc.) correspond to jumps to the left. We now couple spin A to a reservoir at temperature T A , spin B to a reservoir at temperature T B , with the stochastic dynamics as outlined above (two independent Poisson processes), and solve for the net drift of the particle. This system can be visualized as shown in Fig.2. Spin A flips between up and down; spin B performs sudden "rotations" by ±120 • . A clockwise rotation corresponds to a jump to the right (+d) by the particle; counterclockwise ones translate into jumps to the left. Table 1.
Our system has six possible states, listed in Table 1. The dynamics of the particle is described by a Markov process, for which we can write a set of rate equations. Let p n (t) denote the probability that the system is found in state n at time t. Then Here, Γ · P (n → n ′ ) is the probability rate at which the system, when its state is n, makes a transition to state n ′ . If the transition n → n ′ involves only a flip of spin A, then P (n → n ′ ) is the probability that such an attempt will be accepted, under the Metropolis rule. If the transition involves just a rotation of spin B (by ±120 • ), then P (n → n ′ ) is the probability of generating this move, given an attempt to change S B . If the transition involves changes in the states of both spins, then P (n → n ′ ) = 0. Examples of these rules are: The factors of one-half come from the fact that, when the system attempts to rotate spin B, there are two possible states for which it can aim. Our rate equations can be expressed as: dp/dt = ΓRp, where p = (p 1 , · · · , p 6 ) T , and we have introduced the constants Note that µ and ν are monotonically increasing functions of T A and T B , and the temperature range 0 < T A (T B ) < ∞ translates to 0 < µ (ν) < 1. We thus think of µ and ν is "rescaled" temperatures. The long-time behavior of our system is governed by the steady-state distribution of probabilities,p, which is the null eigenvector of R (i.e. Rp = 0). Determiningp is an exercise in Jordan elimination, and leads to the following result:p = x/N, where and N(µ, ν) = 6 i=1 x i is a normalization factor. When both temperatures go to zero, µ, ν → 0, we getp T = (0, 0, 0, 1, 0, 0). This makes sense: in that limit, the system freezes to the state of lowest energy, n = 4.
We now address the question of net drift. We first define a net current, J ≡ J + − J − , where J + is the rate at which spin B is observed to change from state 0 to state +1, and J − is the rate of the reverse transitions, from +1 to 0. This can be interpreted by imagining an observer placed at 2 o'clock on the clock face depicting spin B in Fig.2; J + (J − ) is then the rate at which the hand of the clock passes that observer in the clockwise (counterclockwise) direction; by "rate", we mean number of passes per unit time, averaged over an infinitely long interval of time. 3 The current J represents the net average rate of clockwise revolutions of spin B. Since each revolution corresponds to 3 steps of the particle to the right, this translates into a particle drift: where v denotes the (steady-state) average velocity of the particle. Explicit expression for the quantities J ± are given by: (Since ΓR mn is the transition rate to state m, given that the system is found in state n, p n ΓR mn is the net rate at which transitions from n to m are observed to occur in the steady state.) Using our results forp, we get, after some algebra: There are a number of things to note about this result. First, it implies that if T A > T B (i.e. µ > ν), then there is a net flow of the particle to the left; if T B > T A , the particle drifts to the right. If T A = T B , then there is no drift, in agreement with Feynman's analysis (as well as the Second Law!).
Next, notice that v → 0 as T B → ∞ (ν → 1). In that limit, the change in energy arising from a jump to the left or to the right becomes negligible in comparison to the temperature of the reservoir which drives those jumps; thus, from any lattice site, the particle is as likely to jump to the left as to the right, resulting in no net drift.
Finally, in the limit This is the limit in which changes between the modes occur independently of location of the particle: every attempt to change the mode is accepted. This is analogous to the situation studied by Astumian and Bier [5], where the "flashing" between the two modes of the potential is a Poisson process independent of the particle position. We can also compute the average rates at which heat is transferred between the two reservoirs and our system. Whenever the system makes a transition from state 1 to state 4, or from state 6 to state 3, its energy drops by α; this energy is released into the reservoir at temperature T A . Conversely, during the transitions 4 → 1 and 3 → 6, the system absorbs energy α from reservoir A. The net rate at which the system absorbs energy from reservoir A is then:Q We can similarly write down an expression for the rate at which heat flows from our system to reservoir B: Fig.3 illustrates the sign convention which we choose in definingQ A andQ B . Plugging in the values for the components ofp and R, we find thatQ A =Q B , as we could have predicted, since in the steady state there is no net absorption of heat by the system, nor is any of the heat delivered as work against an external load. Thus, the particle drift is driven by a net passage of heat from A to B, by way of the system. The explicit expression for this heat flow is:Q where P (µ, ν) = 4 + 14µ + 15ν + 4µν + 5ν 2 > 0. The ratio v/Q A→B then gives us the average displacement of the particle, per unit of heat passed (via the system) from reservoir A to reservoir B: Here, ∆x and ∆Q are the net particle displacement, and the net heat transferred from A to B, over a time interval τ . The factor (µ − ν) in Eq.18 guarantees that the direction of the heat flow is from the hotter to the cooler reservoir. We can also compute the rate at which entropy is produced during this process. The rate of entropy production associated with the flow of heat from reservoir A to the system is:Ṡ A = −Q A /T A ; and for reservoir B:Ṡ B =Q B /T B . The net entropy production rate is thus:Ṡ Figs.4 and 5 illustrate the results obtained in this section. Fig.4 is a contour plot of the drift v, as a function of the rescaled reservoir temperatures µ and ν. The contour v = 0 runs along the diagonal, µ = ν, as well as along ν = 1 (T B → ∞). The appearance of positive contours (v > 0) to the left of the diagonal, and negative ones to the right, illustrates the point that the drift is rightward when T B > T A and leftward when T A > T B .
In Fig.5 we have fixed the value of T A by setting µ = 1/2, and have plotted v,Q A→B , andṠ as functions of ν. All three quantities hit zero at ν = 1/2, where T A = T B : nothing interesting happens when the system is maintained at a single temperature. Note also that v andQ A→B are opposite in sign (in agreement with Eq.19), whileṠ is always nonnegative (in agreement with the Second Law). Finally, note that v → 0 as ν → 1 (T B → ∞).
In plotting these two figures, we set all the internal parameters to unity: α = d = Γ = 1.

II. NON-ZERO EXTERNAL LOAD
In this section we add an external load to our model. In Feynman's example, this load is a flea, attached by a thread to the ratchet wheel: when the wheel rotates in the appropriate direction, the creature is lifted against gravity. In our model, we add a slope to the discrete potential: where f is a real constant (and i is the lattice site); see Fig.6. Effectively, f is a constant external force which pulls the particle leftward if f > 0, rightward if f < 0. The presence of an external load allows the system to perform work. If, in the steady state achieved for fixed x = (f, T A , T B ), the particle experiences a drift v(x), then the power delivered against the external load is:Ẇ By conservation of energy, this must be balanced by heat lost by the reservoirs: Our approach to solving for the steady-state behavior is the same as in Section I, except that the presence of the term if d in the potential changes the elements of R, and therefore the steady-state probabilitiesp.
Because the acceptance probability of an attempted move in the Metropolis scheme has the form Prob. = min{1, exp −∆E/T }, each matrix element R ij is piecewise analytic in f . A little thought reveals that the f -axis can be divided into four ranges of values, over each of which the elements of R can be written as analytic functions of α, d, f , T A , and T B . These ranges are: In the two extreme ranges, (a) and (d), stretching to −∞ and +∞, the slope is so steep that the potential energy function no longer has a sawtooth shape in mode 2. We will ignore these ranges and focus instead on the ones for which U (2) i does look like a discrete sawtooth. For range (b), i.e. −α/d < f < 0, the potential slopes downward with increasing i, and an explicit expression for R is: where For range (c), 0 ≤ f < 2α/d, the potential slopes upward with i, and we have Note that both R b and R c reduce to the matrix R of Section I, when σ = 1, i.e. f = 0. As in Section I, the first order of business is to solve forp, using Jordan elimination, only now the process is considerably more tedious: terms do not cancel as nicely as when f = 0. The final results for the steady state probability vectorsp b andp c (corresponding to the two ranges of f values) are of the form where the P j n 's are finite polynomials in the variables µ, ν, and σ, and N j = 6 n=1 P j n is a normalization factor. Explicit expression for the polynomials P j n are given in the Appendix.
We can now obtain v(x),Q A (x), andQ B (x) fromp, as in Section I. The results for the two ranges of f values, j = b, c, are: where X j (µ, ν, σ) and Y j (µ, ν, σ) are polynomials for which explicit expressions are presented in the Appendix. Note that the steady-state behavior described by Eq.30 clearly satisfies energy conservation (see Eqs.23 and 24):Q Eq.30 is the central result of this paper (and reduces to the results of Section I when f = 0). In Section III, we use Eq.30 to show that our model can act both as a heat engine and as a refrigerator. In Section IV, we consider the behavior of our system near equilibrium, and we use Eq.30 to confirm predictions based on a general, linear response analysis.

III. THE SYSTEM AS HEAT ENGINE AND REFRIGERATOR
We can anticipate two different scenarios in which our system acts as a "useful" device: (1)Ẇ > 0. In this case, the system is a heat engine, causing the particle to drift up the potential energy slope, with efficiency η eng =Ẇ /Q > , whereQ > is the rate of heat flow out of the hotter reservoir.
(2)Ẇ < 0 andQ < > 0, whereQ < is the rate of heat flow out of the colder reservoir. Here the system is a refrigerator, with efficiency η ref =Q < /|Ẇ |. The particle drifts down the potential slope, and the resulting energy liberated allows for a net transfer of heat from the colder to the hotter reservoir, without violating the Second Law.
We will now use the results derived in Section II to show that our simple model indeed exhibits both these behaviors.
The system is a heat engine when v(f, T A , T B ) and f are of the same sign. Let us introduce the variables and consider the behavior of our system in (f, γ)-space, for a fixed value of β. (Note that β is the average inverse temperature of the reservoirs, and γ is the difference between inverse temperatures.) BecauseQ A ,Q B , and v are mutually dependent (Eq.31), we can generically explore a measurable fraction of the space of steady-state behaviors by varying only two independent parameters, f and γ, while holding the third, β, fixed.
In Fig.7 we plot the contour v(f, γ) = 0, having set β = 1, and α = d = Γ = 1. (The range of γ values for this choice of β is −2 < γ < 2.) To the left of this contour, we have v > 0; to the right, v < 0. The shaded region thus represents the values of (f, γ) for which v and f are of the same sign, i.e. where the system behaves as a heat engine.
We can understand the placement of the shaded region as follows. Consider a point P on the positive γ-axis: f = 0, γ > 0 (i.e. zero external load, T A > T B ). From Section I, we know that the particle then drifts leftward, v < 0, although no work is performed, since f = 0. Let us now imagine tilting the potential slightly "downward" (f < 0). For a small enough tilt, we expect that the particle will continue to drift to the left, but now this drift is uphill, and therefore work is done against the external load:Ẇ > 0. We conclude that points immediately to the left of the positive vertical axis will correspond to external parameters for which the system behaves as a heat engine, and Fig.7 confirms this. (Similar reasoning applies for the negative γ-axis, where the regionẆ > 0 appears to the right.) If we now continue to tilt the slope more and more downward (f increasingly negative), at fixed γ > 0, we expect the leftward drift to become progressively slower, until for some tilt we get v = 0. At this point the leftward "thermal force" exerted on the particle due to the temperature difference between the reservoirs, exactly balances the external load. This occurs at the boundary of the shaded region (the contour v = 0): for more negative slopes, the particle slides down the slope, and the system no longer acts as a heat engine.
Our system is a refrigerator whenQ < > 0, whereQ < is the rate at which heat leaves the colder of the two reservoirs. In Fig.8 we plot the contoursQ A (f, γ) = 0 andQ B (f, γ) = 0, again for β = 1. These two contours are tangent at the origin, and divide the plane of (f, γ)-values as follows:Q A is positive for points lying above the contour, and negative below. Similary,Q B > 0 (Q B < 0) for points lying above (below) the contourQ B = 0. Now, above the horizontal axis (γ > 0) we have T A > T B , henceQ < = −Q B . The small shaded region in the second quadrant therefore represents values of (f, γ) for which reservoir B is the colder of the two reservoirs, and it is losing heat (Q B < 0). Hence in this region our system acts as a refrigerator. Below the horizontal axis, T B > T A and thusQ < =Q A . The larger shaded region in the fourth quadrant thus also represents refrigeration, only now reservoir A is the being drained of heat.
We can understand the general shape of the shaded regions by assuming that, when the temperatures are equal (γ = 0) and the slope is very small, the quantities v,Q A , andQ B are linear functions of the slope: with c v , c A , c B = 0. (Then c v < 0, since the particle cannot slide up the slope when the reservoir temperatures are equal.) Energy conservation implies that the difference betweeṅ Thus, for equal temperatures and a sufficiently small slope, one of the reservoirs will be losing heat and the other will be gaining it. If we now slightly lower the temperature of the reservoir which is losing heat, then we have a refrigerator: heat flows out of the colder reservoir. In our model, we have c ≡ c A = c B > 0, hence for points on the γ = 0 axis immediately to the right of the origin, heat flows out of reservoir A and into reservoir B; immediately to the left of the origin the reverse holds true. This explains why, just to the right (left) of the origin, the shaded region corresponding to refrigeration hugs the horizontal axis from below (above). If we continue to the right along the line γ = 0, increasing the value of f , then the particle will drift ever more rapidly to the left as the slope becomes ever more steeply inclined. The potential energy lost as the particle slides down the incline gets dissipated into the reservoirs; for sufficiently large f , the rate of dissipation is great enough that both reservoirs become heated:Q A < 0,Q B > 0. This happens to the right of the point at which the contourQ A = 0 crosses the horizontal axis with a positive slope; for values of f beyond this point the system can no longer operate as a refrigerator. We can also understand why the two contoursQ A = 0 andQ B = 0 "kiss" at the origin. The result c A = c B means thatQ A andQ B are (to leading order) equal along the horizontal axis γ = 0, near the origin. However, they are also (exactly) equal along the vertical axis, sinceẆ = 0 when f = 0. Thus,Q A andQ B are equal, to leading order in f and γ, for a small region around the origin:Q A =Q B = cf + bγ. This implies that their contours are both tangent to the line γ = −cf /b at the origin.
Since we have expressions for v(x),Q A (x), andQ B (x), we can compute the thermal efficiency η, when it acts as either a heat engine or a refrigerator. By the Second Law, these efficiencies must never exceed the Carnot efficiencies, η C eng and η C ref (which depend only on T A and T B ). Ideally, we could use our exact results to find the maximum relative efficiency (y = η/η C ) which our model achieves, both as a heat engine and as a refrigerator. Unfortunately, the expressions for v,Q A , andQ B are sufficiently complicated that we are not able to find these maxima analytically. However, at the end of Section IV, we will present analytical results for the maximum relative efficiencies achieved when the system operates close to equilibrium.

IV. LINEAR RESPONSE
When f = 0 and T A = T B ≡ β −1 , our system is in equilibrium, and there results no average particle drift or heat flow. In Section III we briefly considered the behavior of our system near equilibrium (see e.g. Eq.34). We now consider this case in more detail. We will present a general analysis essentially the same as that of Jülicher, Ajdari, and Prost [13], and then show that the exact results obtained for our model confirm the predictions of this analysis.
For a sufficiently small load f and inverse temperature difference γ, and a fixed value of β (characterizing the inverse temperature of the equilibrium state around which we expand), we expect to be in the linear response regime: the particle drift and heat flows depend linearly on f and γ. Let us introduce the quantity -roughly, a "heat flux" from A to B -and let us write, to leading order in f , γ: with the derivatives of v and Φ evaluated at equilibrium (f = γ = 0). As per the arguments given at the end of the previous section,Q A andQ B are equal, to leading order in f and γ, near equilibrium. The rate of entropy production is then: where M 11 = −β ∂v/∂f , M 12 = −β ∂v/∂γ, M 21 = ∂Φ/∂f , and M 22 = ∂Φ/∂γ, evaluated at equilibrium. The Second Law implies that whereas Onsager's reciprocity relation [24] predicts that Also, the diagonal elements of M must be positive: the particle must slide down the potential slope when the temperatures are equal (M 11 > 0), and there must be a flow of heat from the hotter to the colder reservoir when the slope is zero (M 22 > 0). Jülicher et al. [13] have obtained identical results for a molecular motor driven by a difference in chemical potential rather than temperature.
Using the exact results obtained in Section II, we differentiate v and Φ with respect to f and γ to evaluate the elements of the matrix M for our model 4 : where The variable ζ is akin to µ and ν: it is the "rescaled temperature" of the equilibrium state with respect to which the linear response behavior is defined. Then det M = 9(αβζdΓ) 2 (2 + 19ζ + 21ζ 2 ) (4 + 3ζ)(16 + 5ζ) [ and we see by inspection that M 11 , M 22 > 0; that M 12 = M 21 , as mandated by Onsager reciprocity (Eq.39); and that det M > 0, in agreement with the Second Law (Eq.38). It is interesting to consider the operation of our system as a heat engine and refrigerator, in the linear response regime. In this regime, the conditions for these two behaviors are: vf > 0 for a heat engine (as before), and γΦ < 0 for a refrigerator (since Φ =Q A =Q B , to leading order in f , γ). In Fig.9, the shaded regions indicate values of (f, γ) for which the system acts as a heat engine or refrigerator (compare with Fig.[2] of Ref. [13].) The two diagonal lines which form boundaries of these regions are given by v = 0 and Φ = 0. The slopes of these lines are: The Second Law, by requiring that det M ≥ 0, guarantees that these shaded regions do not overlap: |λ v=0 | ≥ |λ Φ=0 |.
The efficiency of our system, when operating as a heat engine, is given by: (again using Φ =Q A =Q B to leading order). The Carnot efficiency defined for the temperatures T A and T B is: Then we can get an explicit expression for the relative efficiency (y = η/η C ) of our system, in the linear response regime: where λ = γ/f . The relative efficiency is the same for all points along any straight line through the origin, and Eq.46 gives that relative efficiency as a function of the slope λ of the line. A similar analysis holds for the case of refrigeration: Note that y ref happens to be the inverse of y eng , although the two expressions are valid for different ranges of λ values, corresponding to the shaded regions in Fig.9.
The results of the previous two paragraphs were derived with the implicit assumption that M 12 , M 21 > 0. This happens to be true for our model, but in general these elements can be either positive or negative (or zero), so long as they are equal. If M 12 and M 21 were negative, then the shaded regions would occur in the the first and third quadrants of the (f, γ) plane, and the negative signs would not appear in Eqs.46 and 47.
The above results imply that, near equilibrium, a microscopic device operating between two reservoirs either can act both as a heat engine and as a refrigerator (if M 12 = M 21 = 0), or will exhibit neither behavior (if M 12 = M 21 = 0). For instance, in a microscopic ratchet-andpawl device, if the sawteeth on the wheel have a symmetric shape, then the system cannot behave as a heat engine: M 12 = 0, as is obvious by symmetry. What is not so immediately obvious, but follows from the condition M 12 = M 21 , is that it is equally impossible for a system with symmetric teeth to operate as a refrigerator, in the linear response regime.
Finally, for a given inverse temperature β of the equilibrium state, we can solve for the maximal relative efficiency achievable in the linear response regime, by maximizing y eng and y ref with respect to λ. It turns out that the maximal efficiencies are equal in the two cases, and depend only on a single parameter r characterizing the behavior of the system near equilibrium: The value of y MAX increases monotonically as r goes from 0 to 1. From Eq.40, we find that our model gives: which depends only on the rescaled temperature ζ = exp(−αβ) of the equilibrium state. In Fig.10 we plot r(ζ). We see that r approaches a limiting value of 1/9 as the equilibrium temperature T = β −1 goes to zero (i.e. ζ → 0), and decreases to zero as T → ∞ (i.e. ζ → 1). For the limiting value r = 1/9, our model gives a maximal relative efficiency This is the best relative efficiency which our system can achieve near equilibrium.
We have carried out a cursory numerical search -10 8 points sampled randomly in (f, µ, ν)-space -and have found, away from equilibrium, relative efficiencies as high as y ≈ 0.0432 (heat engine) and y ≈ 0.0647 (refrigerator). These are greater than the nearequilibrium value quoted in Eq.50, but still far short of unity. This suggests that the efficiency of our model is always considerably lower than the corresponding Carnot efficiency. Such a conclusion is in agreement with Parrondo and Espanol [19], and Sekimoto [20], who have argued that Feynman's analysis on the point of efficiency -in which he concluded that the ratchet and pawl would operate at Carnot efficiency -was in error. We note also that Hondou and Takagi [21], as well as Magnasco and Stolovitzky [22], have shown that, within a Langevin model for two degrees of freedom (e.g. the ratchet and pawl) coupled to two different heat reservoirs, Carnot efficiency cannot be achieved.

V. SUMMARY
Our aim in this paper has been to introduce a discrete model of Feynman's ratchet and pawl, and to solve exactly for the behavior of that model as a function of external load (f ) and reservoir temperatures (T A , T B ). The central result, Eqs.30, gives the average directed motion (v) and heat flows (Q A ,Q B ), in the steady state. We have shown that our model can act both as a heat engine and as a refrigerator, and we have investigated its behavior in the near-equilibrium, linear response regime.

VI. ACKNOWLEDGMENTS
We would like to thank Dr. Martin Bier for stimulating correspondence regarding thermal ratchets, for stressing that our model is a discrete version of Feynman's ratchet and pawl, and for his clear lecture at the 1998 Marian Smoluchowski Symposium on Statistical Physics (Zakopane, Poland), which introduced us to this interesting topic. We would also like to thank Drs. Shankar Subramaniam and Wojciech Zurek for illuminating discussions regarding thermodynamic efficiencies. This work was carried out during reciprocal visits to Warsaw and Los Alamos, made possible by financial support from the Polish-American Maria Sk lodowska-Curie Joint Fund II, under project PAA/NSF-96-253, as well as by the hospitality of the Institute for Nuclear Studies (Poland) and Los Alamos National Laboratory (USA).
FIG. 2. Our system maps onto that of a spin-1/2 particle (A) coupled to a spin-1 particle (B). The former is depicted in the usual manner (as "up" or "down"), the latter by an arrow which can point in one of three directions on the face of a clock. The thin lines denote the coupling between the two spins, as well as the coupling of each spin to a heat reservoir.
FIG. 3. A schematic representation of our system (S) in contact with two heat reservoirs (at temperatures T A and T B ). As implied by the arrows, we defineQ A to be the net flow of heat from reservoir A to the system, andQ B to be the heat flow from the system to reservoir B. Thereforė