This is a preprint of: “Parrondo’s paradox for homeomorphisms”, Armengol Gasull, Luı́s Hernández-Corbato, Francisco R. Ruiz del Portal, Proc. Roy. Soc. Edinburgh Sect. A, vol. 152, 817–825, 2022. DOI: [10.1017/prm.2021.28] PARRONDO’S PARADOX FOR HOMEOMORPHISMS A. GASULL, L. HERNÁNDEZ-CORBATO, AND F. R. RUIZ DEL PORTAL Abstract. We construct two planar homeomorphisms f and g for which the origin is a globally asymptotically stable fixed point whereas for f ◦ g and g ◦ f the origin is a global repeller. Furthermore, the origin remains a global repeller for the iterated function system generated by f and g where each of the maps appears with a certain probability. This planar construction is also extended to any dimension greater than 2 and proves for first time the appearance of the dynamical Parrondo’s paradox in odd dimensions. Mathematics Subject Classification 2010: 37C25, 37C75, 37H05. Keywords: Fixed points, local and global asymptotic stability, dynamical Parrondo’s paradox, random dynamical systems. 1. Introduction and main results Parrondo’s paradox is a well-known paradox in game theory that affirms that a combination of losing strategies can become a winning strategy, see [9, 11]. The paradox can be used to describe many situations away from game theory. In this work, we study the stability of fixed points and we shall establish the following analogy: attracting or repelling fixed points correspond to winning or losing strategies, respectively. Then, the question is the following: a fixed point that is attracting for f and g, can it be repelling for f ◦ g? If so, we say the dynamical Parrondo’s paradox arises. Let us give a more precise definition. Firstly, a word of caution, throughout this note we use the term attracting (or attractor) and repelling (or repeller) as a synonym of asymptotically stable for a map and its inverse, respectively. For a fixed class of maps C, from Rk into itself, we will say that a pair of maps f, g ∈ C exhibit a dynamical Parrondo’s paradox if they have a common fixed point at which the maps are locally invertible and the fixed point is locally asymptotically stable for f and g but it is a repeller for the composite maps g◦f and f ◦g. Notice that, g ◦ f and f ◦ g are conjugate near the fixed point because, locally, f ◦ g = g −1 ◦ g ◦ f ◦ g. A concrete example in which the dynamical Parrondo’s paradox appears for k = 2 and C the class of polynomial maps was given in [5, Ex. 7]:  f (x, y) = − y + 2x2 + 6xy, x − 3x2 + 2xy + 3y 2 , √ √  g(x, y) = x/2 − 3y/2 − x (x2 + y 2 ), 3x/2 + y/2 − y (x2 + y 2 ) . It can be proved that the origin is a locally asymptotic stable fixed point for f and g and the origin is a repelling fixed point for g ◦ f by computing the so called Birkhoff stability constants for the three maps. Notice that the dynamics near the fixed points is of rotation type. Taking the product of these maps with themselves we trivially obtain examples for all even k. As shown in [5], the paradox does not arise when k = 1 and C is the class of analytic maps. Notice also that the paradox is also impossible for any k when C is the class of C 1 maps that are hyperbolic at a point x. Indeed, given two k×k matrices with all their eigenvalues with modulus smaller than 1, A and B, it holds that |det(A)| < 1, |det(B)| < 1 and hence |det(AB)| < 1. As a consequence, if x is asymptotically stable for f and g, then for the composite maps x is either locally asymptotically stable or of saddle type, but never repelling. Examples of saddle type points for g ◦ f, when f and g are linear maps, are given in [3] and [10, p. 8]. It is worth to mention that in [4] a different type of dynamical Parrondo’s paradox is consid- ered. The authors combine periodically two 1-dimensional maps f and g to give rise to chaos or order. 1 The main goal of this paper is to give examples of the dynamical Parrondo’s paradox when C is the class of homeomorphisms and to fill the the lack of examples in odd dimension. We prove that for all k ≥ 2 there are pairs of maps that realize the dynamical Parrondo’s paradox. While the approach of [5] is mainly analytic, our point of view is more qualitative. Moreover, the behaviour of our maps near the fixed point is not of rotation type and there does not seem to be a clear path to make them smooth or analytic. Theorem 1. For any k ≥ 2, there are pairs of homeomorphisms from Rk to itself that exhibit the dynamical Parrondo’s paradox. However, for k = 1 the paradox never arises. It is interesting to remark that Theorem 1, and in consequence, the dynamical Parrondo’s paradox is also relevant from the point of view of 2-periodic discrete dynamical systems. In particular, these systems are good models for describing the dynamics of biological systems under periodic fluctuations due either to external disturbances or effects of seasonality, see [6, 7, 8, 12, 13] and the references therein. As a byproduct of our construction of the 2-dimensional example of dynamical Parrondo’s paradox we will also prove that, almost surely, every orbit of the iterated function system generated by f and g is repelled from the origin, where f and g are essentially the maps constructed in Theorem 1 and appear with certain respective probabilities p and 1 − p. The result carries onto higher dimensions as well. To be more precise, consider the space {0, 1}N equipped with the probability measure µ defined as the product of the Bernoulli probability measures, µB , in each factor. Recall that for the Bernoulli distribution B(p), µB (1) = p and µB (0) = q = 1 − p, for some p ∈ [0, 1]. We prove: Theorem 2. For any k ≥ 2 and 0 < p < 1, there exist homeomorphisms f0 and f1 from Rk into itself such that: • The origin 0 is fixed and globally asymptotically stable for f0 and f1 . • For µ-almost all (an ) ∈ {0, 1}N every orbit {Fan ,··· ,a1 ,a0 (x) = fan ◦ · · · ◦ fa1 ◦ fa0 (x)}n≥0 starting at a point x 6= 0 is repelled from the origin. As we will see in the proof, for any 0 < p < 1, each homeomorphism f0 and f1 will have a region where the radial component of the points increases and another one where it decreases. The largest of these variations corresponds to the increasing region, which is in turn considerably bigger in size than the decreasing region. Their difference becomes larger and tends to infinity when p approaches 0 or 1. 2. Definition of f and g and proof of Theorem 1 We will split the proof in three cases: k = 1, k = 2 and k > 2. 2.1. Proof of Theorem 1 for k = 1. Let us proceed by contradiction. Suppose that f and g are homeomorphisms of R, 0 is a locally attracting fixed point for f and g and a locally repelling fixed point for f ◦ g and g ◦ f . Assume further, for simplicity, that f and g reverse orientation, the other cases are handled similarly. Then: (i) g is monotone decreasing, so if y < x < 0 then 0 < g(x) < g(y). (ii) Since 0 is locally attracting for f and g, for any y < 0 < x close to 0 we have that y < f ◦ f (y) < 0 < g ◦ g(x) < x. (iii) Since 0 is locally repelling for f ◦ g and g ◦ f , for any x, y > 0 close to 0 we have that x < f ◦ g(x) and y < g ◦ f (y). These properties put together yield a contradiction because for small positive u > 0: u < f ◦ g(u) < g ◦ f (f ◦ g(u)) = g(f ◦ f (g(u)) < g(g(u)) < u where the first two inequalities are consequence of (iii) and the last two inequalities are conse- quence (i) and (ii). 2 However, notice that it is possible to construct an example in which the origin is semistable for f ◦ g (and also for g ◦ f ) while it is asymptotically stable for f and g: ( ( ( −2x if x ≤ 0, −x/3 if x ≤ 0, x/9 if x ≤ 0, f (x) = g(x) = ⇒ f ◦ g(x) = −x/3 if x ≥ 0, −2x if x ≥ 0. 4x if x ≥ 0. 2.2. Proof of Theorem 1 for k = 2. In our example the maps f and g are conjugate. We first focus on the definition of f , expressed in polar coordinates. The first elements of a typical orbit under f will drift away from the origin (the radial coordinate increases) until it reaches a trapping sector in which the orbit remains forever and is slowly attracted to the origin (the radial coordinate steadily decreases). The dynamics of the angular coordinate is independent from the values of the radial coordinate and forces every orbit to be eventually contained in the trapping sector. Note that, globally, f looks mostly expanding because the size of this sector and the speed of convergence to the origin therein are relatively small. Let us write out the details. We use the coordinates (r, θ) in R2 \ {0}, where (er , 2πθ) are the standard polar coordinates in the plane. Thus, θ takes values in R/Z and r takes values in R and the limit r → −∞ corresponds to the origin. We use these coordinates to simplify later definitions and computations. Let I ⊂ R/Z be an interval centered at 0̄ (here 0̄ is used to denote the neutral element in R/Z) and such that I ∩ (I + 1/2) = ∅. Let f be a homeomorphism of the plane that fixes the origin and satisfies the following properties (we use the notation f (r, θ) = (r0 , θ0 )): (i) ∆r = r0 − r and ∆θ = θ0 − θ only depend on θ. (ii) ∆r = 4 if θ ∈/ I and ∆r is smaller than 4 if θ ∈ I; ∆r ∈ [−1, 0) if θ belongs to an interval J ⊂ I, 0̄ ∈ J and equals −1 if θ = 0̄, see Figure 1. (iii) ∆θ is non-negative, ∆θ ≤ dist(I, I + 1/2) and ∆θ = 0 if and only if θ = 0̄. θ0 ∆r 1̄ 4 dist(I, I + 1/2) J J I 0̄ 1/2 I 1̄ θ 0̄ −1 0̄ 1̄ θ Figure 1. Graphs of ∆r (left) and θ0 (right) as a function of θ in the definition of f. Notice that (i) implies that ∆r is uniformly bounded and, in particular, there is no issue concerning continuity of f or its inverse at the origin. Property (iii) controls the 1-dimensional dynamics in the angular coordinate: every orbit tends to θ = 0̄. By (ii) the radial coordinate decreases indefinitely once the orbit remains close to θ = 0̄. The angular interval J determines an infinite sector Jb in R2 \{0} in which the radial coordinate of a point decreases after applying f . Inside Jb we find the trapping sector that has been previously mentioned, see Figure 2. Notice also that the speed of attraction (∆r ∈ [−1, 0)) in the trapping sector is weaker than the speed of repulsion (∆r = 4) outside the sector Ib determined by I. The map g is merely a copy of f shifted in the angular coordinate. Let τ (r, θ) = (r, θ + 1/2) be the half-turn rotation in the plane and let g = τ −1 ◦ f ◦ τ = τ ◦ f ◦ τ . Being a conjugate of f , g satisfies the same properties as f if we replace θ by θ + 1/2 in the statements. The key b ∩ τ (I) observation is that by the second item in (iii), f (I) b = {0} and g(τ (I)) b ∩ Ib = {0}. This means that the radial coordinate cannote decrease under the action of f and then immediately 3 Figure 2. Action of f on a circle r = c (inner circle) represented schematically by arrows, sectors Ib (light) and Jb (dark) are shadowed, the attracting f –invariant ray (θ = 0̄) is depicted vertical. decrease under the action of g, or viceversa. In fact, by (ii) the radial coordinate increases after applying g ◦ f or f ◦ g. Let us finally prove that f and g exhibit the dynamical Parrondo’s paradox. The origin is a globally attracting fixed point for f and g. Let {(rn , θn )}n≥1 be the orbit under f of a point (r, θ). We study separately the angular coordinate {θn } because its evolution is independent from the values of the radial coordinate. If θ = 0̄ then θn = 0̄ for every n ≥ 1, otherwise the sequence {θn } is increasing and converges to the unique value θ0 which is fixed under the 1-dimensional angular dynamics, namely θ0 = 0̄. Thus, θn → 0̄ so θn ∈ J for sufficiently large n, say n ≥ n0 . This implies that rn+1 < rn for every n ≥ n0 and, additionally, that rn+1 − rn → −1 as n → +∞ because the orbit converges towards the half-ray θ = 0̄. As a consequence, rn → −∞ and the orbit tends to the origin. From the previous discussion we can deduce that the number of iterations that any orbit stays outside the sector defined by J is bounded uniformly for all the orbits. A bound can be defined by the number N of iterates needed for J to cover S 1 under the action of the dynamics in the angular coordinate. For a given r, if we denote Dr the disk of radius r centered at the origin, the set [ Ur = f n (Dr ) n≥0 is a positively invariant neighborhood of the origin that, in view of the bound ∆r ≤ 4 and the argument above, is contained inside Dr+4N . Thus, {Ur }r<0 is a basis of positively invariant neighborhoods of 0. The same conclusion holds for g because it is conjugate to f . The origin is a globally repelling fixed point for f ◦ g and g ◦ f . Recall that f ◦ g = f ◦ τ ◦ f ◦ τ is conjugate to g ◦ f = τ ◦ f ◦ τ ◦ f (notice that τ 2 = id) so it is enough to prove the statement for the latter composition. By (ii) the radial coordinate of a point outside Ib increases by 4 under the action of f . Thus, if (r0 , θ0 ) = g ◦ f (r, θ) we have that r0 − r ≥ 3 if θ ∈/ I. The b b −1 b same inequality is true in the case f (r, θ) does not belong to τ (I). Since I ∩ f (τ (I)) = {0} we conclude that the radial coordinate of every point increases at least by 3 after applying g ◦ f . Evidently, the origin is a global repeller for g ◦ f and the proof of Theorem 1 follows for k = 2. 2.3. Proof of Theorem 1 for k > 2. First, let us modify slightly the planar dynamics in- troduced in the previous subsection in order to make it symmetric with respect to the vertical axis. Define h(r, θ) = f (r, 2θ) if θ ∈ [0̄, 1/2] and h(r, θ) = f (r, 1 − 2θ) if θ ∈ [1/2, 1̄]. There are now two invariant rays for h, θ = 0̄, which acts as a repeller in the dynamics in the angular coordinate, and θ = 1/2, which acts as an attractor. The dynamics of h within each half-plane reproduces the dynamics of f except from the fact that both h-invariant rays correspond to the unique invariant ray {θ = 0̄} for f . Now, it is straightforward to move into higher dimensions. Consider spherical coordinates (r, θ, ϕ1 , . . . , ϕk−2 ) in Rk and define a map hk : Rk → Rk by the transformation that applies 4 h to the radial and polar coordinate, (r0 , θ0 ) = h(r, θ), and leaves the azimuthal coordinates unchanged, (ϕ01 , . . . , ϕ0k−2 ) = (ϕ1 , . . . , ϕk−2 ). The dynamics of hk leaves invariant the two rays that form the vertical axis (north-south direction, suppose that north corresponds to θ = 0̄). Points are attracted to the origin in those rays. Moreover, the radial coordinate of any point increases significantly after applying hk unless the point belongs to a thin double cone C around the axis (whose size can be traced back to the size of I). Nevertheless, since every orbit either belongs to the ray pointing to the north or eventually enters the cone around the ray that points to the south and remains in it, we conclude that the origin is a globally attracting fixed point for hk . The stability of 0 can be addressed in the same fashion as in the case k = 2. An analogous construction for the second map as in the case k = 2 works here as well. Let τk be a 90o -degree rotation in Rk and define jk = τk−1 ◦ hk ◦ τk . Note that (?) hk (C) ∩ τk (C) = {0} and jk (τk (C)) ∩ C = {0} It is straightforward to check that the origin is a globally attracting fixed point for jk (again by conjugation) and that the radial coordinate of every point increases under the action of jk ◦ hk and hk ◦ jk (by (?)) and the origin is a globally repelling fixed point for the composite maps. 3. Iterated function system: proof of Theorem 2 The idea is to take as f0 and f1 a slight modification of the maps f and g defined in the proof of Theorem 1. For the sake of clarity, we only discuss the case k = 2, the proof for k > 2 is a straightforward generalization of the argument using the maps hk and jk . Let us start with the proof of Theorem 2 for k = 2. We need to slightly modify the definition of f and g in Subsection 2.2 in order to increase the rate of radial repulsion far from the invariant rays to account for the effect of the probability p. The only change in the definition of the new f , which we shall denote in the following by f0 , is that we replace property (ii) by (ii)0 ∆r = a − 1, for some fixed a > 4 to be determined later, if θ ∈ / I, and is smaller than a − 1 if θ ∈ I; ∆r ∈ [−1, 0) if θ belongs to an interval J ⊂ I, 0̄ ∈ J and ∆r = −1 if θ = 0̄. Then, the new g, which shall be henceforth denoted f1 , is constructed from the new f as in the previous section, f1 = τ −1 ◦ f0 ◦ τ . Notice that the original f and g considered in Subsection 2.2 correspond to a = 5. The value a will be fixed later, in terms of p. Take an arbitrary point x in the plane, different from the origin, and apply f0 and f1 randomly as in the statement, that is, apply f0 with probability p and f1 with probability q = 1 − p. We claim that the orbit of x is repelled from the origin almost surely, that is, with probability 1. Take a random sequence (an ) ∈ {0, 1}N with respect to the probability µ, that is, an takes the value 0 with probability p and 1 with probabiliy q = 1 − p. Then, consider the planar dynamics defined by applying sequentially the maps fan , n ≥ 0. We claim that for µ-almost all (an ) the change in the radial coordinate in every orbit except from 0 is positive and, as a consequence, every orbit is repelled from the origin. The proof of the claim follows from two remarks. The first one concerns the four maps f0 ◦ f0 , f0 ◦ f1 , f1 ◦ f0 , f1 ◦ f1 . Their radial coordinate change is bounded by: ∆fr0 ◦f0 ≥ −2, ∆fr0 ◦f1 ≥ a − 2, ∆rf1 ◦f0 ≥ a − 2 and ∆fr1 ◦f1 ≥ −2. Moreover, the map f0 ◦ f0 appears with probability p2 , the map f1 ◦ f1 with probability q 2 , while each of the maps f0 ◦ f1 and f1 ◦ f0 appears with probability pq. Let us start giving conditions on a that imply that the expected value of the change in radial coordinate is positive. More precisely, if Rn : {0, 1}n → R denotes the random variable that measures the minimum of the variation of the radial coordinate between a point (different from the origin) and its image under Fan ,··· ,a1 ,a0 , i.e. Rn (a0 , a1 , . . . , an ) = min{rn − r0 : (rn , θn ) = Fa0 ,...,an (r0 , θ0 )}, 5 we have that E[R2m+2 ] ≥ E[R2m ] + p2 min ∆rf0 ◦f0 + pq min ∆rf0 ◦f1 + pq min ∆rf1 ◦f0 + q 2 min ∆fr1 ◦f1  ≥ E[R2m ] + 2(a − 2)pq − 2(p2 + q 2 ) = E[R2m ] + 2 ap(1 − p) − 1 . Hence, if we take any a such that ap(1 − p) − 1 > 0 we have that E[R2m+2 ] ≥ E[R2m ] + K, for K = 2 ap(1 − p) − 1 > 0, and as a consequence we conclude that E[R2m ] ≥ 2Km, that is, the expected value of Rn grows linearly with n. This computation shows that in average random iteration repels points from the origin by increasing (linearly!) its radial coordinate. We need to extend this conclusion  to a subset of binary sequences of full probability. Notice incidentally that a > 1/ p(1 − p) ≥ 4. Given a binary sequence (an ) we can bound the value of R2m in the following fashion fa1 ◦fa0 fa3 ◦fa2 fa2m ◦fa2m−1 R2m ≥ min ∆r +min ∆r +. . .+min ∆r ≥ (a−2)km −2(m−km ) = akm −2m, where kn denotes the number of maps among fa1 ◦ fa0 , fa3 ◦ fa2 , . . . , fa2n ◦ fa2n−1 that are equal to f1 ◦ f0 or f0 ◦ f1 . Notice that kn is the sum of n independent Bernoulli distributions B(2pq), because 2pq is the probability of appearance of f1 ◦ f0 or f0 ◦ f1 . Thus, if lim inf n→+∞ kn /n = ` > 2/a, the asymptotic growth of R2n is bounded from below by (` − 2/a)n. In particular, R2n → +∞ so every point is repelled from the origin by the iterated action of the maps fan , n ≥ 0. It only remains to prove that the subset of (an ) such that lim inf kn /n > 2/a has full proba- bility. In fact, the Strong Law of Large Numbers ([1, 2]) gives much more: for a full probability set, the previous lim inf is indeed a limit and it coincides with the expected value of the random variable B(2pq), that is 2pq. Hence, for µ-almost all binary sequences, kn kn ` = lim inf = lim = 2pq = 2p(1 − p). n→+∞ n n→+∞ n For those sequences we have that,  2 2 2 ap(1 − p) − 1 ` − = 2p(1 − p) − = > 0, a a a as we wanted to prove, and the theorem follows. Acknowledgements. The authors thank the anonymous referee for her/his valuable com- ments. This work has received funding from the Ministerio de Ciencia e Innovación (PGC2018- 098321-B-I00 and PID2019-104658GB-I00 grants), the Agència de Gestió d’Ajuts Universitaris i de Recerca (2017 SGR 1617 grant). References [1] R. B. Ash. Real analysis and probability. Probability and Mathematical Statistics, No. 11. Academic Press, New York-London, 1972. [2] P. Billingsley. Probability and measure. Third edition. Wiley Series in Probability and Mathematical Sta- tistics. A Wiley-Interscience Publication. John Wiley & Sons, Inc., New York, 1995. [3] V. D. Blondel, J. Theys, J. N. Tsitsiklis.When is a pair of matrices stable?. In: V. D. Blondel, A. Megretski (eds.). Unsolved problems in Mathematical Systems and Control Theory. Princeton Univ. Press, NJ 2004. [4] J. S. Cánovas, A. Linero, D. Peralta-Salas. Dynamic Parrondo’s paradox. Physica D 218 (2006) 177–184. [5] A. Cima, A. Gasull, V. Mañosa. Parrondo’s dynamic paradox for the stability of non-hyperbolic fixed points. Discrete Contin. Dyn. Syst. 38 (2018), 889–904. [6] S. Elaydi, R. J. Sacker. Global stability of periodic orbits of non-autonomous difference equations and population biology. J. Differential Equations 208 (2005), 258–273. [7] S. Elaydi, R. J. Sacker. Periodic difference equations, population biology and the Cushing-Henson conjec- tures. Math. Biosci. 201 (2006), 195–207. [8] J. E. Franke, J. F. Selgrade. Attractors for discrete periodic dynamical systems. J. Math. Anal. Appl. 286 (2003), 64–79. [9] G. P. Harmer and D. Abbott. Losing strategies can win by Parrondo’s paradox. Nature (London), Vol. 402, No. 6764 (1999) p. 864. [10] R. Jungers. The Joint Spectral Radius. Spinger, Berlin 2009. 6 [11] J. M. R. Parrondo. How to cheat a bad mathematician. in EEC HC&M Network on Complexity and Chaos (#ERBCHRX-CT940546), ISI, Torino, Italy (1996), Unpublished. [12] J. F. Selgrade, J. H. Roberds. On the structure of attractors for discrete, periodically forced systems with applications to population models. Physica D 158 (2001), 69–82. [13] J. F. Selgrade, J. H. Roberds. Global attractors for a discrete selection model with periodic immigration. J. Difference Equations and Appl. 13 (2007), 275–287. Departament de Matemàtiques, Edifici Cc, Universitat Autònoma de Barcelona, 08193 Cer- danyola del Vallès (Barcelona), Spain, Centre de Recerca Matemàtica, Edifici Cc, Campus de Bellaterra, 08193 Cerdanyola del Vallès (Barcelona), Spain. E-mail address: gasull@mat.uab.cat Departamento de Álgebra, Geometrı́a y Topologı́a, Universidad Complutense de Madrid and Instituto de Ciencias Matematicas CSIC–UAM–UCM–UC3M, Madrid, Spain. E-mail address: luishcorbato@mat.ucm.es Departamento de Álgebra, Geometrı́a y Topologı́a, Universidad Complutense de Madrid, 28040 Madrid, Spain. E-mail address: rrportal@ucm.es 7