# Tent map

In mathematics, the tent map with parameter μ is the real-valued function f$_μ$ defined by
    $f_{\mu }(x):=\mu \min\{x,\,1-x\},$
the name being due to the tent-like shape of the graph of f$_μ$. For the values of the parameter μ within 0 and 2, f$_μ$ maps the unit interval [0, 1] into itself, thus defining a discrete-time dynamical system on it (equivalently, a recurrence relation). In particular, iterating a point x$_0$ in [0, 1] gives rise to a sequence $x_{n}$:
    $x_{n+1}=f_{\mu }(x_{n})={\begin{cases}\mu x_{n}&\mathrm {for} ~~x_{n}<{\frac {1}{2}}\\\mu (1-x_{n})&\mathrm {for} ~~{\frac {1}{2}}\leq x_{n}\end{cases}}$
where μ is a positive real constant. Choosing for instance the parameter μ = 2, the effect of the function f$_μ$ may be viewed as the result of the operation of folding the unit interval in two, then stretching the resulting interval [0, 1/2] to get again the interval [0, 1]. Iterating the procedure, any point x$_0$ of the interval assumes new subsequent positions as described above, generating a sequence x$_n$ in [0, 1].
The $\mu =2$ case of the tent map is a non-linear transformation of both the bit shift map and the r = 4 case of the logistic map.

## Behaviour

The tent map with parameter μ = 2 and the logistic map with parameter r = 4 are topologically conjugate, and thus the behaviours of the two maps are in this sense identical under iteration.
Depending on the value of μ, the tent map demonstrates a range of dynamical behaviour ranging from predictable to chaotic.
* If μ is less than 1 the point x = 0 is an attractive fixed point of the system for all initial values of x i.e. the system will converge towards x = 0 from any initial value of x.
* If μ is 1 all values of x less than or equal to 1/2 are fixed points of the system.
* If μ is greater than 1 the system has two fixed points, one at 0, and the other at μ/(μ + 1). Both fixed points are unstable, i.e. a value of x close to either fixed point will move away from it, rather than towards it. For example, when μ is 1.5 there is a fixed point at x = 0.6 (since 1.5(1 − 0.6) = 0.6) but starting at x = 0.61 we get
       $0.61\to 0.585\to 0.6225\to 0.56625\to 0.650625\ldots$
* If μ is between 1 and the square root of 2 the system maps a set of intervals between μ − μ$^2$/2 and μ/2 to themselves. This set of intervals is the Julia set of the map – that is, it is the smallest invariant subset of the real line under this map. If μ is greater than the square root of 2, these intervals merge, and the Julia set is the whole interval from μ − μ$^2$/2 to μ/2 (see bifurcation diagram).
* If μ is between 1 and 2 the interval [μ − μ$^2$/2, μ/2] contains both periodic and non-periodic points, although all of the orbits are unstable (i.e. nearby points move away from the orbits rather than towards them). Orbits with longer lengths appear as μ increases. For example:
       ${\frac {\mu }{\mu ^{2}+1}}\to {\frac {\mu ^{2}}{\mu ^{2}+1}}\to {\frac {\mu }{\mu ^{2}+1}}{\mbox{ appears at }}\mu =1$
       ${\frac {\mu }{\mu ^{3}+1}}\to {\frac {\mu ^{2}}{\mu ^{3}+1}}\to {\frac {\mu ^{3}}{\mu ^{3}+1}}\to {\frac {\mu }{\mu ^{3}+1}}{\mbox{ appears at }}\mu ={\frac {1+{\sqrt {5}}}{2}}$
       ${\frac {\mu }{\mu ^{4}+1}}\to {\frac {\mu ^{2}}{\mu ^{4}+1}}\to {\frac {\mu ^{3}}{\mu ^{4}+1}}\to {\frac {\mu ^{4}}{\mu ^{4}+1}}\to {\frac {\mu }{\mu ^{4}+1}}{\mbox{ appears at }}\mu \approx 1.8393$
* If μ equals 2 the system maps the interval [0, 1] onto itself. There are now periodic points with every orbit length within this interval, as well as non-periodic points. The periodic points are dense in [0, 1], so the map has become chaotic. In fact, the dynamics will be non-periodic if and only if $x_{0}$ is irrational. This can be seen by noting what the map does when $x_{n}$ is expressed in binary notation: It shifts the binary point one place to the right; then, if what appears to the left of the binary point is a "one" it changes all ones to zeroes and vice versa (with the exception of the final bit "one" in the case of a finite binary expansion); starting from an irrational number, this process goes on forever without repeating itself. The invariant measure for x is the uniform density over the unit interval. The autocorrelation function for a sufficiently long sequence {$x_{n}$} will show zero autocorrelation at all non-zero lags. Thus $x_{n}$ cannot be distinguished from white noise using the autocorrelation function. Note that the r = 4 case of the logistic map and the $\mu =2$ case of the tent map are homeomorphic to each other: Denoting the logistically evolving variable as $y_{n}$, the homeomorphism is
       $x_{n}={\tfrac {2}{\pi }}\sin ^{-1}(y_{n}^{1/2}).$
* If μ is greater than 2 the map's Julia set becomes disconnected, and breaks up into a Cantor set within the interval [0, 1]. The Julia set still contains an infinite number of both non-periodic and periodic points (including orbits for any orbit length) but almost every point within [0, 1] will now eventually diverge towards infinity. The canonical Cantor set (obtained by successively deleting middle thirds from subsets of the unit line) is the Julia set of the tent map for μ = 3.

### Numerical errors
## Magnifying the orbit diagram

* A closer look at the orbit diagram shows that there are 4 separated regions at μ ≈ 1. For further magnification, 2 reference lines (red) are drawn from the tip to suitable x at certain μ (e.g., 1.10) as shown.
* With distance measured from the corresponding reference lines, further detail appears in the upper and lower part of the map. (total 8 separated regions at some μ)

## Asymmetric tent map

The asymmetric tent map is essentially a distorted, but still piecewise linear, version of the $\mu =2$ case of the tent map. It is defined by
    $v_{n+1}={\begin{cases}v_{n}/a&\mathrm {for} ~~v_{n}\in [0,a]\\(1-v_{n})/(1-a)&\mathrm {for} ~~v_{n}\in [a,1]\end{cases}}$
for parameter $a\in [0,1]$. The $\mu =2$ case of the tent map is the present case of $a={\tfrac {1}{2}}$. A sequence {$v_{n}$} will have the same autocorrelation function as will data from the first-order autoregressive process $w_{n+1}=(2a-1)w_{n}+u_{n+1}$ with {$u_{n}$} independently and identically distributed. Thus data from an asymmetric tent map cannot be distinguished, using the autocorrelation function, from data generated by a first-order autoregressive process.

## Applications

The tent map has found applications in social cognitive optimization, chaos in economics, image encryption, on risk and market sentiments for pricing, etc.