## Abstract

A Brownian ratchet is a one-dimensional diffusion process that drifts towards a minimum of a periodic asymmetric sawtooth potential. A flashing Brownian ratchet is a process that alternates between two regimes, a one-dimensional Brownian motion and a Brownian ratchet, producing directed motion. These processes have been of interest to physicists and biologists for nearly 25 years. The flashing Brownian ratchet is the process that motivated Parrondo’s paradox, in which two fair games of chance, when alternated, produce a winning game. Parrondo’s games are relatively simple, being discrete in time and space. The flashing Brownian ratchet is rather more complicated. We show how one can study the latter process numerically using a random walk approximation.

## 1. Introduction

The flashing Brownian ratchet was introduced by Ajdari & Prost [1]; see also Magnasco [2]. It is a stochastic process that alternates between two regimes, a one-dimensional Brownian motion and a Brownian ratchet, the latter being a one-dimensional diffusion process that drifts towards a minimum of a periodic asymmetric sawtooth potential. The result is directed motion, as explained in figure 1 (from Harmer *et al.* [3]) and figure 2 (from Parrondo & Dinís [4]). Earlier versions of these figures appeared in Rousselet *et al.* [5] and Faucheux *et al.* [6]. For another version, see Amengual [7, fig. 2.3].

The flashing Brownian ratchet is of interest not just to physicists but also to biologists in connection with so-called molecular motors (e.g. Bressloff [8, ch. 4]). The flashing Brownian ratchet is the process that motivated Parrondo’s paradox [9,10], in which two fair games of chance, when alternated, produce a winning game.

Our aim here is to show, via a precise mathematical formulation of the flashing Brownian ratchet, how one can study the process numerically using a random walk approximation. In §2, we provide a general formulation of Parrondo’s paradox motivated by the flashing Brownian ratchet. These Parrondo games are then modified in §3 so as to yield our random walk approximation. We determine, in §§4 and 5, whether the conceptual figures 1 and 2 accurately represent the behaviour of the flashing Brownian ratchet.

Alternatively, one could numerically solve a partial differential equation, specifically the Fokker–Planck equation, to obtain similar results, but we believe that our method is simpler. Discretization of the Fokker–Planck equation for the Brownian ratchet, and the relationship to Parrondo’s games, has been explored by Allison & Abbott [11] and Toral *et al.* [12,13].

Using the notation of figure 1, it is clear how to formulate the model. First, the asymmetric sawtooth potential *V* is given by the formula
*L*) to all of **R**. Here 0<*α*<1 and *L*>0, and asymmetry requires only that *α* is a shape parameter and *L* is a scale factor; the latter is not important and some authors take *L*=1.) The *Brownian ratchet* is a one-dimensional diffusion process with diffusion coefficient 1 and drift coefficient *μ* proportional to −*V* ′, that is, for some *γ*>0,
*L*) to all of **R**. Such a process *X*_{t} is governed by the stochastic differential equation (SDE):
*B*_{t} is a standard Brownian motion. This diffusion process drifts to the left on [*nL*,(*n*+*α*)*L*) and drifts to the right on [(*n*+*α*)*L*,(*n*+1)*L*), for each *n*∈**Z**. In other words, it drifts towards a minimum of the sawtooth potential *V* .

Given *τ*_{1},*τ*_{2}>0, the *flashing Brownian ratchet* is a time-inhomogeneous one-dimensional diffusion process that evolves as a Brownian motion on [0,*τ*_{1}] (potential ‘off’), then as a Brownian ratchet on [*τ*_{1},*τ*_{1}+*τ*_{2}] (potential ‘on’), then as a Brownian motion on [*τ*_{1}+*τ*_{2},2*τ*_{1}+*τ*_{2}] (potential ‘off’), then as a Brownian ratchet on [2*τ*_{1}+*τ*_{2},2*τ*_{1}+2*τ*_{2}] (potential ‘on’) and so on. Such a process *Y* _{t} is governed by the SDE:
^{1}
*α* and *L*) are specified, the flashing Brownian ratchet is specified by three parameters, *γ*, *τ*_{1} and *τ*_{2}. (Alternatively, we could let the diffusion coefficients of the Brownian motion and the Brownian ratchet be *σ*^{2} instead of 1, and then take *τ*_{1}=1 and *τ*_{2}>0.) Our formulation is equivalent to that of Dinís [14, eqn (1.78)], though parametrized differently.

Occasionally, we may want to wrap these processes (the Brownian ratchet and the flashing Brownian ratchet) around the circle of circumference *L*. Because they are spatially periodic with period *L*, the wrapped processes remain Markovian. For example, we could define the wrapped Brownian ratchet *L*)-valued process
*L*) are identified, effectively making it a circle of circumference *L*. The same procedure applies to the flashing Brownian ratchet, yielding

## 2. Parrondo games from Brownian ratchets

We first consider the periodic drift coefficient *μ* described above in the case in which *L*=3. We want to discretize space and time. We replace each interval [*j*,*j*+1) by its midpoint *j*. In terms of *μ*, we define the discrete drift by *μ*_{j}=*μ*_{0}<0 if mod(*j*,3)=0 and *μ*_{j}=*μ*_{1}>0 if mod(*j*,3)=1 or 2 (figure 3). This discretizes space, now interpreted as profit in a game of chance instead of displacement. When the potential is off, we replace the Brownian motion by a simple symmetric random walk on **Z** and call this game *A*, a fair coin-tossing game. When the potential is on, we replace the Brownian ratchet by an asymmetric random walk on **Z** whose periodic state-dependent transition probabilities are determined by the discrete drift and call this game *B*.

We find that the asymmetric random walk on **Z** has periodic state-dependent transition probabilities of the form
*P*(*j*,*j*−1)=1−*P*(*j*,*j*+1), where *μ*_{j}=*μ*_{0}<0 if mod(*j*,3)=0 and *μ*_{j}=*μ*_{1}>0 if mod(*j*,3)=1 or 2. Because of the periodic transition probabilities, the unique reversible invariant measure *π* must be periodic (i.e. *π*(*j*)=*π*(*j*+3)) for the random walk to be recurrent. We can check that the detailed balance conditions
*p*_{1} in terms of *p*_{0}, we find that
*ρ*, the requirements that *ρ*<1, and
*ρ*, the reversible invariant measure restricted to {0,1,2} has, via (2.2), the form
*π*(0)(2*p*_{0}−1)+(*π*(1)+*π*(2))(2*p*_{1}−1)=0, so game *B* is also fair (asymptotically). Nevertheless, the random mixture *cA*+(1−*c*)*B* (0<*c*<1) is winning, as is the non-random periodic pattern *A*^{r}*B*^{s} for each *r*,*s*≥1 except *r*=*s*=1. This is the original form of *Parrondo’s paradox*. The special case in which

There are several proofs available for these results, including Pyke [16], based on mod *m* random walks; Key *et al.* [17], based on random walks in periodic environments; Ethier & Lee [15], based on the strong-mixing central limit theorem; and Rémillard & Vaillancourt [18], based on Oseledec’s multiplicative ergodic theorem.

It should be mentioned that Pyke [16] found an elegant way to derive Parrondo’s games (2.1) from a one-dimensional diffusion process that can be interpreted as a Brownian ratchet but with the sawtooth potential having a shape different from (1.1).

The above formulation with *L*=3 can be generalized. Let 0<*α*<1 and assume that *α* is rational, so that there exist relatively prime positive integers *l* and *L* with *α*=*l*/*L*. Game *A* is as before, whereas game *B* is described by an asymmetric random walk on **Z** with periodic state-dependent transition probabilities of the form
*P*(*j*,*j*−1)=1−*P*(*j*,*j*+1), where *π* must be periodic (i.e. *π*(*j*)=*π*(*j*+*L*)) for the random walk to be recurrent. We can check that the detailed balance conditions
*p*_{1} in terms of *p*_{0}, we find that
*α*/(1−*α*)th power in the denominator by *ρ*, the requirements that *ρ*<1, and

Further, in terms of *ρ*, the reversible invariant measure restricted to {0,1,…,*L*−1} has, via (2.5), the form
*C* is chosen so that *π*(0)+*π*(1)+⋯+*π*(*L*−1)=1, resulting in a mean profit of
*B* is also fair (asymptotically).

As a function of *p*_{0} the function in (2.6) is strictly convex on *cA*+(1−*c*)*B* (0<*c*<1) has positive mean profit so that the Parrondo effect is present. The function in (2.6) is strictly concave on

Thus, game *A* and (the generalized) game *B* lead to a more general form of Parrondo’s paradox. In the conventional formulation, *α* is the reciprocal of an integer.

## 3. Approximating the Brownian ratchet

As in §2, let 0<*α*<1 and assume that *α* is rational, so that there exist relatively prime positive integers *l* and *L* with *α*=*l*/*L*. Consider a sequence of asymmetric random walks on **Z** with periodic state-dependent transition probabilities as follows. Given *n*≥1, we let
*P*_{n}(*j*,*j*−1)=1−*P*_{n}(*j*,*j*+1), where
*n*=1 is precisely (2.4).

We want to let *n*^{2} jumps per unit of time, and finally we rescale space to {*i*/*n*:*i*∈**Z**} by dividing by *n*. The result in the limit as

Let

### Theorem 3.1

*For n*=1,2,… (*and n*>λ), *let* {*X*_{n}(*k*), *k*=0,1,…} *denote the random walk on* *Z**defined by* (3.1*)–(*3.3), *and let X*_{t} *denote the Brownian ratchet with γ*=λ(1−*α*)/2. *If X*_{n}(0)/*n converges in distribution to X*_{0} *as* *then* {*X*_{n}(⌊*n*^{2}*t*⌋)/*n, t*≥0} *converges in distribution in* *to* {*X*_{t}, *t*≥0} *as*

### Proof.

The generator of the diffusion process satisfying the SDE (1.2) is
**R** with compact support, where
*μ* is extended periodically (with period *L*) to all of **R**. Then, by virtue of the Girsanov transformation, the martingale problem for

If {*μ*_{n}} is a sequence of real numbers converging to *μ*, then
*x* with *nx*∈**Z**, provided *μ*=−λ(1−*α*)/(2*α*), and with
*μ*=λ/2. This suffices to complete the proof. (We leave it to the reader to check that the compact containment condition is satisfied.) ▪

We assume now that the time parameters *τ*_{1}>0 and *τ*_{2}>0 of the flashing Brownian ratchet are rational. Let *m* be the smallest positive integer such that *m*^{2}*τ*_{1} and *m*^{2}*τ*_{2} are integers.

### Theorem 3.2

*For n*=*m*,2*m*,3*m*,… (*and n*>λ), *let* {*Y* _{n}(*k*), *k*=0,1,…} *denote the time-inhomogeneous random walk on* *Z**that evolves as the simple symmetric random walk for n*^{2}*τ*_{1} *steps, then as the random walk of theorem* 3.1 *for n*^{2}*τ*_{2} *steps, then as the simple symmetric random walk for n*^{2}*τ*_{1} *steps, then as the random walk of theorem* 3.1 *for n*^{2}*τ*_{2} *steps, and so on. Let Y* _{t} *denote the flashing Brownian ratchet with parameters γ*=λ(1−*α*)/2, *τ*_{1}>0 *and τ*_{2}>0. *If Y* _{n}(0)/*n converges in distribution to Y* _{0} *as* *then* {*Y* _{n}(⌊*n*^{2}*t*⌋)/*n, t*≥0} *converges in distribution in* *to* {*Y* _{t}, *t*≥0} *as* *Here* *through multiples of m.*)

### Proof.

The assumption about *m* ensures that the times *n*^{2}*τ*_{1} and *n*^{2}*τ*_{2} are integers. By Donsker’s theorem applied to the simple symmetric random walk, {*Y* _{n}(⌊*n*^{2}*t*⌋)/*n*, 0≤*t*≤*τ*_{1}} converges in distribution in *D*_{R}[0,*τ*_{1}] to {*Y* _{t}, 0≤*t*≤*τ*_{1}}. Then, by theorem 3.1, {*Y* _{n}(⌊*n*^{2}*t*⌋)/*n*, *τ*_{1}≤*t*≤*τ*_{1}+*τ*_{2}} converges in distribution in *D*_{R}[*τ*_{1},*τ*_{1}+*τ*_{2}] to {*Y* _{t}, *τ*_{1}≤*t*≤*τ*_{1}+*τ*_{2}}. Alternating in this way leads to the stated conclusion. ▪

## 4. Density of the flashing Brownian ratchet at time *τ*_{1}+*τ*_{2}, starting at 0

To model figure 1 accurately, some measurements are needed. We begin with a cropped `.pdf` version of the figure and enlarge it on the computer screen to 800% of normal. It appears that the figure is rasterized, so our precision is limited. We measure that *L*=206 *mm* and *αL*=52 *mm*. Thus, we imagine that *L*=4. We measure the respective heights to be 99.5 mm, 81 mm and 15 mm. Theoretically, the three heights are (2*πt*)^{−1/2}, (2*πt*)^{−1/2} *e*^{−1/(2t)}, and (2*πt*)^{−1/2} *e*^{−9/(2t)}. Therefore, we need to find *t* such that
*t*=2.43062 and *t*=2.37830, respectively. Because of the crudeness of our measurements, we round off to *t*=2.4.

We conclude that the flashing Brownian ratchet described in figure 1 evolves as a Brownian motion (starting at 0) for time *τ*_{1}=2.4. Then the Brownian ratchet with *L*=4 and *γ* to be specified runs (starting from where the Brownian motion ended) for time *τ*_{2} to be specified. There is no good way to estimate *γ* and *τ*_{2} from figure 1. We take *τ*_{2}=*τ*_{1}=2.4 for convenience and let *γ*=λ(1−*α*)/2=3λ/8 for several choices of λ (λ=1,2,3,4,5). Then the Brownian motion runs (starting from where the Brownian ratchet ended) for time *τ*_{1}=2.4, then the Brownian ratchet runs for time *τ*_{2}=2.4, and so on. We are interested in the distribution of the process at time *τ*_{1}+*τ*_{2}=4.8, which we can compare with the third panel in figure 1.

There is no known analytical formula for the density of the flashing Brownian ratchet at time *τ*_{1}+*τ*_{2} (however, see Zadourian *et al.* [21]). But we can approximate it numerically as suggested in theorem 3.2. The positive integer *m* of that theorem is 5. In each case, we take *n*=100, meaning that at time *τ*_{1}+*τ*_{2}=4.8, the approximating random walk has made 4.8*n*^{2}=48 000 steps. We compute its distribution recursively after 1 step, 2 steps, … , 48 000 steps, using the simple symmetric random walk for the first 24 000 steps, then the asymmetric random walk for the next 24 000 steps. Note that the distribution of the random walk after 2*k* steps is concentrated on {−2*k*,−2(*k*−1),…,0,…,2(*k*−1),2*k*}, whereas the distribution after 2*k*+1 steps is concentrated on {−2*k*−1,−2*k*+1,…,−1,1,…,2*k*−1,2*k*+1}. We save the distribution after 48 000 steps, plot the histogram, and interpolate linearly. The results are displayed in figure 4.

There are several notable differences between the figures of figure 4 and the third panel of figure 1. First, the three peaks of the density are pointed, unlike a normal density, so figure 2 is more accurate in this regard. Second, they are asymmetric, with more mass to the left than to the right of −4, 0 and 4. Presumably, the explanation for this is that, for example, the drift to the left on [0,1) is stronger than the drift to the right on [−3,0). Another distinction is that the ratio of the height of the highest peak to that of the second highest is at least 3 in figure 4 (table 1) but is less than 1.5 in figure 1. While this is true for each λ=1,2,3,4,5, it may be partly a consequence of our arbitrary choice of *τ*_{2}.

Consider the case λ=5. The areas under the three peaks of the density are, respectively, 0.0330104, 0.731102 and 0.235888. (These numbers are exact, not for the flashing Brownian ratchet, but for our random walk approximation to it, with *n*=100.) If the peaks were symmetric, the mean displacement would be (−4)(0.0330104)+(0)(0.731102)+(4)(0.235888)=0.811510, but in fact the mean displacement is 0.678364 (again, an approximation) because of the asymmetry of each peak.

Table 1 shows the effect of varying λ on several statistics of interest.

We might ask whether, as suggested in figures 1 and 2, the areas of the three peaks are equal to the corresponding areas under the normal curve. The latter areas are

We return to the case λ=5. To get a sense of the rate of convergence in theorem 3.2, we provide in table 2 computed values of several statistics as functions of *n* (*n*=10,20,30,…,200).

## 5. Density of the flashing Brownian ratchet at time *τ*_{1}+*τ*_{2}, starting at stationarity

By properties of diffusion processes with constant diffusion and gradient drift, the Brownian ratchet has a reversible invariant measure *π* of the form
*π* is a periodic function (with period *L*) whose maxima occur at the minima of the sawtooth potential.

### Theorem 5.1

*The Brownian ratchet with parameters α, L and γ has a reversible invariant measure π of the form (5.1). The wrapped Brownian ratchet with the same parameters has a reversible invariant measure of the same form, restricted to [0,L).*

### Proof.

We use a different characterization of the Brownian ratchet. We take *C*^{1} functions *f* on **R** with limits at *f*′ is absolutely continuous and has a right derivative, denoted by *f*′′, with **R** with limits at *f*′′ must be compatible with those of the drift coefficient *μ*. Thus,
*n*∈**Z**. Mandl [22, p. 25] and Theorem II.1 showed that *V* (*nL*)=0 for all *n*∈**Z** and the fifth uses a telescoping sum and the compact support assumption. The right side of (5.2) is symmetric in *f* and *g*, so the left side must be too, and we have

For the second assertion, we take *C*^{1} functions *f* on the circle [0,*L*) such that *f*′ is absolutely continuous and has a right derivative, denoted by *f*′′, with *L*). Thus, *f*(0)=*f*(*L*−), *f*′(0)=*f*′(*L*−),
*n* replaced by their *n*=0 terms. ▪

For both reversible invariant measures (unrestricted and restricted), we expect there is a uniqueness result but we currently lack a proof. Note that the mean drift, with respect to the reversible invariant probability measure, is equal to
*V* (*L*)=*V* (0)=0. Thus, the mean drift is 0 at equilibrium (of the wrapped Brownian ratchet).

Denote the flashing Brownian ratchet at time *t*, starting from *x*∈**R** at time 0, by *t*, starting from *x*∈[0,*L*) at time 0, by *L*) are identified. Nevertheless, no analytical formula is known, and uniqueness is expected but unproved.) The mean displacement *τ*_{1}+*τ*_{2}], starting from the stationary distribution *L*) and the convention that we do not distinguish notationally between **R**, it becomes unimodal instead of U-shaped.

We propose to approximate *x*, not 0. The stationary distribution *nL*) random walk used to approximate the wrapped flashing Brownian ratchet. A small technical issue, if *nL* is even, is that this Markov chain fails to be irreducible if *n*^{2}(*τ*_{1}+*τ*_{2}) is even, in which case we replace the latter quantity by *n*^{2}(*τ*_{1}+*τ*_{2})+1. Then the chain becomes irreducible and there is a unique stationary distribution. The black curve of the first panel of figure 5 is an approximation to the density of *τ*_{1} and *τ*_{1}+*τ*_{2}, respectively. Figure 5 can be regarded as a more accurate version of figures 1 and 2. Computations show that

## 6. Conclusion and future work

A Brownian ratchet is a one-dimensional diffusion process that drifts towards a minimum of a periodic asymmetric sawtooth potential. A flashing Brownian ratchet is a time-inhomogeneous one-dimensional diffusion process that alternates between a Brownian motion and a Brownian ratchet. We propose a random walk approximation to the Brownian ratchet and the flashing Brownian ratchet. This provides an efficient method of numerically studying these continuous processes, and furthermore it is more accurate than a simulation, based on a random number generator, would be. By using the random walk approximation, we find the approximate density of the flashing Brownian ratchet after one time period, starting at 0. We also find the approximate density of the flashing Brownian ratchet after the same time period, but now starting from a stationary distribution associated with the so-called wrapped flashing Brownian ratchet, and we approximate the mean displacement of the flashing Brownian ratchet over that time period. The goal was to determine how accurate the conceptual figures 1 and 2 are. We began by deriving a general class of capital-dependent Parrondo games motivated by the Brownian ratchet with shape parameter *α*. It has been conventional to assume that *α* is the reciprocal of an integer, but we allow it to be an arbitrary rational number in (0,1). These Parrondo games, in turn, motivated our random walk approximation.

As for future work, we are currently trying to apply these ideas to what might be called a tilted flashing Brownian ratchet, that is, a flashing Brownian ratchet in the presence of a macroscopic gradient that reduces the directed motion effect. See fig. 6, (d)–(f), of Harmer & Abbott [9].

Another problem that we hope to address in the near future is to establish a strong law of large numbers for flashing Brownian ratchet increments, perhaps analogous to our earlier strong law of large numbers [15] for the sequence of Parrondo-game profits.

Finally, because the evaluation in (5.4) is computationally intensive, it would be a challenging numerical optimization problem to determine the values of *τ*_{1} and *τ*_{2} that maximize the long-term mean displacement per unit time, *α*, *L* and *γ*.

## Ethics

A preliminary version of the manuscript was posted at https://arxiv.org/abs/1710.05295.

## Data accessibility

The *Mathematica* code used to generate tables 1 and 2 as well as figures 4 and 5 is stored at https://doi.org/10.5061/dryad.623hq [23].

## Authors' contributions

Both authors contributed substantively to the content of the paper and to drafting and revising the manuscript, and both have read and approved the final version.

## Competing interests

The authors have no competing interests.

## Funding

The work of S.N.E. was partially supported by a grant from the Simons Foundation (429675). The work of J.L. was supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science, ICT & Future Planning (NRF-2017R1A2B1007089).

## Acknowledgements

We thank the reviewers for their comments, which helped to improve the paper.

## Footnotes

↵1 By definition, mod(

*t*,*τ*) is the remainder (in [0,*τ*)) when*t*is divided by*τ*.

- Received October 27, 2017.
- Accepted December 14, 2017.

- © 2018 The Authors.

Published by the Royal Society under the terms of the Creative Commons Attribution License http://creativecommons.org/licenses/by/4.0/, which permits unrestricted use, provided the original author and source are credited.