## Frequent Links

# Logistic map

The **logistic map** is a polynomial mapping (equivalently, recurrence relation) of degree 2, often cited as an archetypal example of how complex, chaotic behaviour can arise from very simple non-linear dynamical equations. The map was popularized in a seminal 1976 paper by the biologist Robert May,^{[1]} in part as a discrete-time demographic model analogous to the logistic equation first created by Pierre François Verhulst.^{[2]}
Mathematically, the logistic map is written

- <math> (1)\qquad x_{n+1} = r x_n (1-x_n) </math>

where:

- <math>x_n</math> is a number between zero and one that represents the ratio of existing population to the maximum possible population

This nonlinear difference equation is intended to capture two effects.

- reproduction where the population will increase at a rate proportional to the current population when the population size is small.
- starvation (density-dependent mortality) where the growth rate will decrease at a rate proportional to the value obtained by taking the theoretical "carrying capacity" of the environment less the current population.

However, as a demographic model the logistic map has the pathological problem that some initial conditions and parameter values lead to negative population sizes. This problem does not appear in the older Ricker model, which also exhibits chaotic dynamics.

The <math>r=4</math> case of the logistic map is a nonlinear transformation of both the bit-shift map and the <math>\mu =2</math> case of the tent map.

## Contents

## Behavior dependent on *r*

The image below shows the amplitude and frequency content of some logistic map iterates for parameter values ranging from 2 to 4. File:Logistic map animation.gif

By varying the parameter *r*, the following behavior is observed:

- With
*r*between 0 and 1, the population will eventually die, independent of the initial population. - With
*r*between 1 and 2, the population will quickly approach the value <math>\frac{r-1}{r}</math>, independent of the initial population. - With
*r*between 2 and 3, the population will also eventually approach the same value <math>\frac{r-1}{r}</math>, but first will fluctuate around that value for some time. The rate of convergence is linear, except for*r*=3, when it is dramatically slow, less than linear. - With
*r*between 3 and <math>1+\sqrt{6}</math> (approximately 3.44949), from almost all initial conditions the population will approach permanent oscillations between two values. These two values are dependent on*r*. - With
*r*between 3.44949 and 3.54409 (approximately), from almost all initial conditions the population will approach permanent oscillations among four values. The latter number is a root of a 12th degree polynomial (sequence A086181 in OEIS). - With
*r*increasing beyond 3.54409, from almost all initial conditions the population will approach oscillations among 8 values, then 16, 32, etc. The lengths of the parameter intervals that yield oscillations of a given length decrease rapidly; the ratio between the lengths of two successive such bifurcation intervals approaches the Feigenbaum constant δ = 4.66920<math>\dots</math>. This behavior is an example of a period-doubling cascade. - At
*r*approximately 3.56995 (sequence A098587 in OEIS) is the onset of chaos, at the end of the period-doubling cascade. From almost all initial conditions, we no longer see oscillations of finite period. Slight variations in the initial population yield dramatically different results over time, a prime characteristic of chaos. - Most values beyond 3.56995 exhibit chaotic behaviour, but there are still certain isolated ranges of
*r*that show non-chaotic behavior; these are sometimes called*islands of stability*. For instance, beginning at <math>1+\sqrt{8}</math> (approximately 3.82843) there is a range of parameters*r*that show oscillation among three values, and for slightly higher values of*r*oscillation among 6 values, then 12 etc. - The development of the chaotic behavior of the logistic sequence as the parameter
*r*varies from approximately 3.56995 to approximately 3.82843 is sometimes called the Pomeau–Manneville scenario, characterized by a periodic (laminar) phase interrupted by bursts of aperiodic behavior. Such a scenario has an application in semiconductor devices.^{[3]}There are other ranges that yield oscillation among 5 values etc.; all oscillation periods occur for some values of*r*. A**period-doubling window**with parameter*c*is a range of*r*-values consisting of a succession of sub-ranges. The*k*^{th}sub-range contains the values of*r*for which there is a stable cycle (a cycle that attracts a set of initial points of unit measure) of period <math>c2^{k}.</math> This sequence of sub-ranges is called a**cascade of harmonics**.^{[4]}In a sub-range with a stable cycle of period <math>c2^{k^{*}},</math> there are unstable cycles of period <math>c2^{k}</math> for all <math>k<k^{*}.</math> The*r*value at the end of the infinite sequence of sub-ranges is called the**point of accumulation**of the cascade of harmonics. As*r*rises there is a succession of new windows with different*c*values. The first one is for*c*= 1; all subsequent windows involving odd*c*occur in decreasing order of*c*starting with arbitrarily large*c*.^{[4]}^{[5]} - Beyond
*r*= 4, almost all initial values eventually leave the interval [0,1] and diverge.

For any value of *r* there is at most one stable cycle. In this case, it is a globally stable cycle, which attracts almost all points.^{[6]}^{:13} For an *r* with a stable cycle of some period, there can be infinitely many unstable cycles of various periods.

A bifurcation diagram summarizes this. The horizontal axis shows the values of the parameter *r* while the vertical axis shows the possible long-term values of *x*.

The bifurcation diagram is a self-similar: if you zoom in on the above-mentioned value *r* = 3.82843 and focus on one arm of the three, the situation nearby looks like a shrunk and slightly distorted version of the whole diagram. The same is true for all other non-chaotic points. This is an example of the deep and ubiquitous connection between chaos and fractals.

## Chaos and the logistic map

The relative simplicity of the logistic map makes it an excellent point of entry into a consideration of the concept of chaos. A rough description of chaos is that chaotic systems exhibit a great sensitivity to initial conditions—a property of the logistic map for most values of *r* between about 3.57 and 4 (as noted above). A common source of such sensitivity to initial conditions is that the map represents a repeated folding and stretching of the space on which it is defined. In the case of the logistic map, the quadratic difference equation (1) describing it may be thought of as a stretching-and-folding operation on the interval (0,1).^{[7]}

The following figure illustrates the stretching and folding over a sequence of iterates of the map. Figure (a), left, shows a two-dimensional Poincaré plot of the logistic map's state space for *r*=4, and clearly shows the quadratic curve of the difference equation (1). However, we can embed the same sequence in a three-dimensional state space, in order to investigate the deeper structure of the map. Figure (b), right, demonstrates this, showing how initially nearby points begin to diverge, particularly in those regions of *X*_{t} corresponding to the steeper sections of the plot.

This stretching-and-folding does not just produce a gradual divergence of the sequences of iterates, but an exponential divergence (see Lyapunov exponents), evidenced also by the complexity and unpredictability of the chaotic logistic map. In fact, exponential divergence of sequences of iterates explains the connection between chaos and unpredictability: a small error in the supposed initial state of the system will tend to correspond to a large error later in its evolution. Hence, predictions about future states become progressively (indeed, exponentially) worse when there are even very small errors in our knowledge of the initial state. This quality of unpredictability and apparent randomness led the logistic map equation to be used as a Pseudo-random number generator in early computers.^{[7]}

Since the map is confined to an interval on the real number line, its dimension is less than or equal to unity. Numerical estimates yield a correlation dimension of 0.500 ± 0.005 (Grassberger, 1983), a Hausdorff dimension of about 0.538 (Grassberger 1981), and an information dimension of 0.5170976... (Grassberger 1983) for r=3.5699456... (onset of chaos). Note: It can be shown that the correlation dimension is certainly between 0.4926 and 0.5024.

It is often possible, however, to make precise and accurate statements about the *likelihood* of a future state in a chaotic system. If a (possibly chaotic) dynamical system has an attractor, then there exists a probability measure that gives the long-run proportion of time spent by the system in the various regions of the attractor. In the case of the logistic map with parameter *r* = 4 and an initial state in (0,1), the attractor is also the interval (0,1) and the probability measure corresponds to the beta distribution with parameters *a* = 0.5 and *b* = 0.5. Specifically,^{[8]} the invariant measure is <math>\pi ^{-1}x^{-1/2}(1-x)^{-1/2}</math>. Unpredictability is not randomness, but in some circumstances looks very much like it. Hence, and fortunately, even if we know very little about the initial state of the logistic map (or some other chaotic system), we can still say something about the distribution of states a long time into the future, and use this knowledge to inform decisions based on the state of the system.

## Solution in some cases

The special case of *r* = 4 can in fact be solved exactly, as can the case with *r* = 2;^{[9]} however the general case can only be predicted statistically.^{[10]}
The solution when *r* = 4 is,^{[9]}^{[11]}

- <math>x_{n}=\sin^{2}(2^{n} \theta \pi)</math>

where the initial condition parameter <math>\theta</math> is given by <math>\theta = \tfrac{1}{\pi}\sin^{-1}(x_0^{1/2})</math>. For rational <math>\theta</math>, after a finite number of iterations <math>x_n</math> maps into a periodic sequence. But almost all <math>\theta</math> are irrational, and, for irrational <math>\theta</math>, <math>x_n</math> never repeats itself – it is non-periodic. This solution equation clearly demonstrates the two key features of chaos – stretching and folding: the factor 2^{n} shows the exponential growth of stretching, which results in sensitive dependence on initial conditions, while the squared sine function keeps <math>x_n</math> folded within the range [0, 1].

For *r* = 4 an equivalent solution in terms of complex numbers instead of trigonometric functions is^{[12]}

- <math>x_n=\frac{-\alpha^{2^n} -\alpha^{-2^n} +2}{4}</math>

where <math>\alpha</math> is either of the complex numbers

- <math>\alpha = \frac{-8x_0 + 4 \pm \sqrt{(-8x_0 + 4)^2 - 16}}{4}</math>

with modulus equal to 1. Just as the squared sine function in the trigonometric solution leads to neither shrinkage nor expansion of the set of points visited, in the latter solution this effect is accomplished by the unit modulus of <math>\alpha</math>.

By contrast, the solution when *r*=2 is^{[12]}

- <math>x_n = \frac{1}{2} - \frac{1}{2}(1-2x_0)^{2^{n}}</math>

for <math>x_0 \in [0,1)</math>. Since <math>(1-2x_0)\in (-1,1)</math> for any value of <math>x_0</math> other than the unstable fixed point 0, the term <math>(1-2x_0)^{2^{n}}</math> goes to 0 as *n* goes to infinity, so <math>x_n</math> goes to the stable fixed point <math>\tfrac{1}{2}.</math>

## Finding cycles of any length when *r* = 4

For the *r* = 4 case, from almost all initial conditions the iterate sequence is chaotic. Nevertheless, there exist an infinite number of initial conditions that lead to cycles, and indeed there exist cycles of length *k* for *all* integers *k* ≥ 1. We can exploit the relationship of the logistic map to the dyadic transformation (also known as the bit-shift map) to find cycles of any length. If *x* follows the logistic map <math>x_{n+1} = 4 x_n(1-x_n) \,</math> and *y* follows the dyadic transformation

- <math>y_{n+1}=\begin{cases}2y_n & 0 \le y_n < 0.5 \\2y_n -1 & 0.5 \le y_n < 1, \end{cases}</math>

then the two are related by

- <math>x_{n}=\sin^{2}(2 \pi y_{n})</math>.

The reason that the dyadic transformation is also called the bit-shift map is that when *y* is written in binary notation, the map moves the binary point one place to the right (and if the bit to the left of the binary point has become a "1", this "1" is changed to a "0"). A cycle of length 3, for example, occurs if an iterate has a 3-bit repeating sequence in its binary expansion (which is not also a one-bit repeating sequence): 001, 010, 100, 110, 101, or 011. The iterate 001001001... maps into 010010010..., which maps into 100100100..., which in turn maps into the original 001001001...; so this is a 3-cycle of the bit shift map. And the other three binary-expansion repeating sequences give the 3-cycle 110110110... → 101101101... → 011011011... → 110110110.... Either of these 3-cycles can be converted to fraction form: for example, the first-given 3-cycle can be written as 1/7 → 2/7 → 4/7 → 1/7. Using the above translation from the bit-shift map to the *r* = 4 logistic map gives the corresponding logistic cycle .611260467... → .950484434... → .188255099... → .611260467... . We could similarly translate the other bit-shift 3-cycle into its corresponding logistic cycle. Likewise, cycles of any length *k* can be found in the bit-shift map and then translated into the corresponding logistic cycles.

However, since almost all numbers in [0, 1) are irrational, almost all initial conditions of the bit-shift map lead to the non-periodicity of chaos. This is one way to see that the logistic *r* = 4 map is chaotic for almost all initial conditions.

Amount of cycles of (minimal) length *k* for logistic map with *r* = 4 (tent map with <math>\mu =2</math>) is a known integer sequence (sequence A001037 in OEIS): 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, 630, 1161 ... It tells us that logistic map with *r* = 4 has 2 fixed points, 1 cycle of length 2, 2 cycles of length 3 and so on. This sequence takes a particularly simple form for prime *k*: <math>2 (2^{k-1}-1)/k </math>. For example: <math>2 (2^{13-1}-1)/13 = 630 </math> is the number of cycles of length 13.

## See also

- Logistic function, the continuous version
- Lyapunov stability for iterated systems
- Malthusian growth model
- Radial basis function network This article illustrates the inverse problem for the logistic map.
- Schröder's equation
- Stiff equation

## Notes

**^**May, Robert M. 1976. "Simple mathematical models with very complicated dynamics." Nature 261(5560):459-467.**^**"Weisstein, Eric W., "Logistic Equation",*MathWorld*.**^**Carson Jeffries; Jose Perez (1982). "Observation of a Pomeau–Manneville intermittent route to chaos in a nonlinear oscillator".*Physical Review A***26**(4): 2117–2122. Bibcode:1982PhRvA..26.2117J. doi:10.1103/PhysRevA.26.2117.- ^
^{a}^{b}R.M. May (1976). "Simple mathematical models with very complicated dynamics".*Nature***261**(5560): 459–67. Bibcode:1976Natur.261..459M. PMID 934280. doi:10.1038/261459a0. **^**Baumol, William, and Benhabib, Jess, "Chaos: Significance, mechanism, and economic applications,"*Journal of Economic Perspectives*3, Winter 1989, 77-106.**^**Collet, Pierre, and Jean-Pierre Eckmann,*Iterated Maps on the Interval as Dynamical Systems*, Birkhauser, 1980.- ^
^{a}^{b}Gleick, James (1987).*Chaos: Making a New Science*. Penguin Books. **^**Jakobson, M.,"Absolutely continuous invariant measures for one-parameter families of one-dimensional maps,"*Communications in Mathematical Physics*81, 1981, 39-88.- ^
^{a}^{b}Schröder, Ernst (1870). "Über iterierte Funktionen".*Math. Ann.***3**(2): 296–322. doi:10.1007/BF01443992. **^**Little, M.; Heesch, D. (2004). "Chaotic root-finding for a small class of polynomials" (PDF).*Journal of Difference Equations and Applications***10**(11): 949–953. doi:10.1080/10236190412331285351.**^**Lorenz, Edward (1964), "The problem of deducing the climate from the governing equations,"*Tellus*16 (February): 1-11.- ^
^{a}^{b}Schröder, Ernst (1870). "Ueber iterirte Functionen".*Math. Ann.***3**(2): 296–322. doi:10.1007/BF01443992.

## References

- P. Grassberger and I. Procaccia (1983). "Measuring the strangeness of strange attractors".
*Physica D***9**(1–2): 189–208. Bibcode:1983PhyD....9..189G. doi:10.1016/0167-2789(83)90298-1. - P. Grassberger (1981). "On the Hausdorff dimension of fractal attractors".
*Journal of Statistical Physics***26**(1): 173–179. Bibcode:1981JSP....26..173G. doi:10.1007/BF01106792. - Sprott, Julien Clinton (2003).
*Chaos and Time-Series Analysis*. Oxford University Press. ISBN 0-19-850840-9. - Strogatz, Steven (2000).
*Nonlinear Dynamics and Chaos*. Perseus Publishing. ISBN 0-7382-0453-6. - Tufillaro, Nicholas; Tyler Abbott; Jeremiah Reilly (1992).
*An experimental approach to nonlinear dynamics and chaos*. Addison-Wesley New York. ISBN 0-201-55441-0.

## External links

- Logistic Map Simulation. A Java applet simulating the Logistic Map by Yuval Baror.
- Logistic Map. Contains an interactive computer simulation of the logistic map.
- The Chaos Hypertextbook. An introductory primer on chaos and fractals.
- Interactive Logistic map with iteration and bifurcation diagrams in Java.
- Interactive Logistic map showing fixed points.
- Macintosh Quadratic Map Program
- The transition to Chaos and the Feigenbaum constant- JAVA applet
- The Logistic Map and Chaos by Elmer G. Wiens
- Complexity & Chaos (audiobook) by Roger White. Chapter 5 covers the Logistic Equation.
- "History of iterated maps," in
*A New Kind of Science*by Stephen Wolfram. Champaign, IL: Wolfram Media, p. 918, 2002. - Discrete Logistic Equation by Marek Bodnar after work by Phil Ramsden, Wolfram Demonstrations Project.
- Multiplicative coupling of 2 logistic maps by C. Pellicer-Lostao and R. Lopez-Ruiz after work by Ed Pegg Jr, Wolfram Demonstrations Project.
- Using SAGE to investigate the discrete logistic equation