# Dyadic transformation

The dyadic transformation (also known as the dyadic map, bit shift map, 2x mod 1 map, Bernoulli map, doubling map or sawtooth map) is the mapping (i.e., recurrence relation)
    $T:[0,1)\to [0,1)^{\infty }$
    $x\mapsto (x_{0},x_{1},x_{2},\ldots )$
(where $[0,1)^{\infty }$ is the set of sequences from $[0,1)$) produced by the rule
    $x_{0}=x$
    ${\text{for all }}n\geq 0,\ x_{n+1}=(2x_{n}){\bmod {1}}$.
Equivalently, the dyadic transformation can also be defined as the iterated function map of the piecewise linear function
    $T(x)={\begin{cases}2x&0\leq x<{\frac {1}{2}}\\2x-1&{\frac {1}{2}}\leq x<1.\end{cases}}$
The name bit shift map arises because, if the value of an iterate is written in binary notation, the next iterate is obtained by shifting the binary point one bit to the right, and if the bit to the left of the new binary point is a "one", replacing it with a zero.
The dyadic transformation provides an example of how a simple 1-dimensional map can give rise to chaos. This map readily generalizes to several others. An important one is the beta transformation, defined as $T_{\beta }(x)=\beta x{\bmod {1}}$. This map has been extensively studied by many authors. It was introduced by Alfréd Rényi in 1957, and an invariant measure for it was given by Alexander Gelfond in 1959 and again independently by Bill Parry in 1960.

## Relation to the Bernoulli process

[[Image:Exampleergodicmap.svg|thumb|The map T : [0, 1) → [0, 1), $x\mapsto 2x{\bmod {1}}$ preserves the Lebesgue measure.]]
The map can be obtained as a homomorphism on the Bernoulli process. Let $\Omega =\{H,T\}^{\mathbb {N} }$ be the set of all semi-infinite strings of the letters $H$ and $T$. These can be understood to be the flips of a coin, coming up heads or tails. Equivalently, one can write $\Omega =\{0,1\}^{\mathbb {N} }$ the space of all (semi-)infinite strings of binary bits. The word "infinite" is qualified with "semi-", as one can also define a different space $\{0,1\}^{\mathbb {Z} }$ consisting of all doubly-infinite (double-ended) strings; this will lead to the Baker's map. The qualification "semi-" is dropped below.
This space has a natural shift operation, given by
    $T(b_{0},b_{1},b_{2},\dots )=(b_{1},b_{2},\dots )$
where $(b_{0},b_{1},\dots )$ is an infinite string of binary digits. Given such a string, write
    $x=\sum _{n=0}^{\infty }{\frac {b_{n}}{2^{n+1}}}.$
The resulting $x$ is a real number in the unit interval $0\leq x\leq 1.$ The shift $T$ induces a homomorphism, also called $T$, on the unit interval. Since $T(b_{0},b_{1},b_{2},\dots )=(b_{1},b_{2},\dots ),$ one can easily see that $T(x)=2x{\bmod {1}}.$ For the doubly-infinite sequence of bits $\Omega =2^{\mathbb {Z} },$ the induced homomorphism is the Baker's map.
The dyadic sequence is then just the sequence
    $(x,T(x),T^{2}(x),T^{3}(x),\dots )$
That is, $x_{n}=T^{n}(x).$

### The Cantor set

Note that the sum
    $y=\sum _{n=0}^{\infty }{\frac {b_{n}}{3^{n+1}}}$
gives the Cantor function, as conventionally defined. This is one reason why the set $\{H,T\}^{\mathbb {N} }$ is sometimes called the Cantor set.

## Rate of information loss and sensitive dependence on initial conditions

One hallmark of chaotic dynamics is the loss of information as simulation occurs. If we start with information on the first s bits of the initial iterate, then after m simulated iterations (m < s) we only have s − m bits of information remaining. Thus we lose information at the exponential rate of one bit per iteration. After s iterations, our simulation has reached the fixed point zero, regardless of the true iterate values; thus we have suffered a complete loss of information. This illustrates sensitive dependence on initial conditions—the mapping from the truncated initial condition has deviated exponentially from the mapping from the true initial condition. And since our simulation has reached a fixed point, for almost all initial conditions it will not describe the dynamics in the qualitatively correct way as chaotic.
Equivalent to the concept of information loss is the concept of information gain. In practice some real-world process may generate a sequence of values (x$_n$) over time, but we may only be able to observe these values in truncated form. Suppose for example that x$_0$ = 0.1001101, but we only observe the truncated value 0.1001. Our prediction for x$_1$ is 0.001. If we wait until the real-world process has generated the true x$_1$ value 0.001101, we will be able to observe the truncated value 0.0011, which is more accurate than our predicted value 0.001. So we have received an information gain of one bit.

## Relation to tent map and logistic map

The dyadic transformation is topologically semi-conjugate to the unit-height tent map. Recall that the unit-height tent map is given by
    $x_{n+1}=f_{1}(x_{n})={\begin{cases}x_{n}&\mathrm {for} ~~x_{n}\leq 1/2\\1-x_{n}&\mathrm {for} ~~x_{n}\geq 1/2\end{cases}}$
The conjugacy is explicitly given by
    $S(x)=\sin \pi x$
so that
    $f_{1}=S^{-1}\circ T\circ S$
That is, $f_{1}(x)=S^{-1}(T(S(x))).$ This is stable under iteration, as
    $f_{1}^{n}=f_{1}\circ \cdots \circ f_{1}=S^{-1}\circ T\circ S\circ S^{-1}\circ \cdots \circ T\circ S=S^{-1}\circ T^{n}\circ S$
It is also conjugate to the chaotic r = 4 case of the logistic map.
The r = 4 case of the logistic map is $z_{n+1}=4z_{n}(1-z_{n})$; this is related to the bit shift map in variable x by
    $z_{n}=\sin ^{2}(2\pi x_{n}).$
There is also a semi-conjugacy between the dyadic transformation (here named angle doubling map) and the quadratic polynomial. Here, the map doubles angles measured in turns. That is, the map is given by
    $\theta \mapsto 2\theta {\bmod {2}}\pi .$

## Periodicity and non-periodicity

Because of the simple nature of the dynamics when the iterates are viewed in binary notation, it is easy to categorize the dynamics based on the initial condition:
If the initial condition is irrational (as almost all points in the unit interval are), then the dynamics are non-periodic—this follows directly from the definition of an irrational number as one with a non-repeating binary expansion. This is the chaotic case.
If x$_0$ is rational the image of x$_0$ contains a finite number of distinct values within [0, 1) and the forward orbit of x$_0$ is eventually periodic, with period equal to the period of the binary expansion of x$_0$. Specifically, if the initial condition is a rational number with a finite binary expansion of k bits, then after k iterations the iterates reach the fixed point 0; if the initial condition is a rational number with a k-bit transient (k ≥ 0) followed by a q-bit sequence (q > 1) that repeats itself infinitely, then after k iterations the iterates reach a cycle of length q. Thus cycles of all lengths are possible.
For example, the forward orbit of 11/24 is:
    ${\frac {11}{24}}\mapsto {\frac {11}{12}}\mapsto {\frac {5}{6}}\mapsto {\frac {2}{3}}\mapsto {\frac {1}{3}}\mapsto {\frac {2}{3}}\mapsto {\frac {1}{3}}\mapsto \cdots ,$
which has reached a cycle of period 2. Within any subinterval of [0, 1), no matter how small, there are therefore an infinite number of points whose orbits are eventually periodic, and an infinite number of points whose orbits are never periodic. This sensitive dependence on initial conditions is a characteristic of chaotic maps.

### Periodicity via bit shifts

The periodic and non-periodic orbits can be more easily understood not by working with the map $T(x)=2x{\bmod {1}}$ directly, but rather with the bit shift map $T(b_{0},b_{1},b_{2},\dots )=(b_{1},b_{2},\dots )$ defined on the Cantor space $\Omega =\{0,1\}^{\mathbb {N} }$.
That is, the homomorphism
    $x=\sum _{n=0}^{\infty }{\frac {b_{n}}{2^{n+1}}}$
is basically a statement that the Cantor set can be mapped into the reals. It is a surjection: every dyadic rational has not one, but two distinct representations in the Cantor set. For example,
    $0.1000000\dots =0.011111\dots$
This is just the binary-string version of the famous 0.999... = 1 problem. The doubled representations hold in general: for any given finite-length initial sequence $b_{0},b_{1},b_{2},\dots ,b_{k-1}$ of length $k$, one has
    $b_{0},b_{1},b_{2},\dots ,b_{k-1},1,0,0,0,\dots =b_{0},b_{1},b_{2},\dots ,b_{k-1},0,1,1,1,\dots$
The initial sequence $b_{0},b_{1},b_{2},\dots ,b_{k-1}$ corresponds to the non-periodic part of the orbit, after which iteration settles down to all zeros (equivalently, all-ones).
Expressed as bit strings, the periodic orbits of the map can be seen to the rationals. That is, after an initial "chaotic" sequence of $b_{0},b_{1},b_{2},\dots ,b_{k-1}$, a periodic orbit settles down into a repeating string $b_{k},b_{k+1},b_{k+2},\dots ,b_{k+m-1}$ of length $m$. It is not hard to see that such repeating sequences correspond to rational numbers. Writing
    $y=\sum _{j=0}^{m-1}b_{k+j}2^{-j-1}$
one then clearly has
    $\sum _{j=0}^{\infty }b_{k+j}2^{-j-1}=y\sum _{j=0}^{\infty }2^{-jm}={\frac {y}{1-2^{-m}}}$
Tacking on the initial non-repeating sequence, one clearly has a rational number. In fact, every rational number can be expressed in this way: an initial "random" sequence, followed by a cycling repeat. That is, the periodic orbits of the map are in one-to-one correspondence with the rationals.
This phenomenon is note-worthy, because something similar happens in many chaotic systems. For example, geodesics on compact manifolds can have periodic orbits that behave in this way.
Keep in mind, however, that the rationals are a set of measure zero in the reals. Almost all orbits are not periodic! The aperiodic orbits correspond to the irrational numbers. This property also holds true in a more general setting. An open question is to what degree the behavior of the periodic orbits constrain the behavior of the system as a whole. Phenomena such as Arnold diffusion suggest that the general answer is "not very much".

## Density formulation

Instead of looking at the orbits of individual points under the action of the map, it is equally worthwhile to explore how the map affects densities on the unit interval. That is, imagine sprinkling some dust on the unit interval; it is denser in some places than in others. What happens to this density as one iterates?
Write $\rho :[0,1]\to \mathbb {R}$ as this density, so that $x\mapsto \rho (x)$. To obtain the action of $T$ on this density, one needs to find all points $y=T^{-1}(x)$ and write
    $\rho (x)\mapsto \sum _{y=T^{-1}(x)}{\frac {\rho (y)}{|T^{\prime }(y)|}}$
The denominator in the above is the Jacobian determinant of the transformation, here it is just the derivative of $T$ and so $T^{\prime }(y)=2$. Also, there are obviously only two points in the preimage of $T^{-1}(x)$, these are $y=x/2$ and $y=(x+1)/2.$ Putting it all together, one gets
    $\rho (x)\mapsto {\frac {1}{2}}\rho \!\left({\frac {x}{2}}\right)+{\frac {1}{2}}\rho \!\left({\frac {x+1}{2}}\right)$
By convention, such maps are denoted by ${\mathcal {L}}$ so that in this case, write
    $\left[{\mathcal {L}}_{T}\rho \right](x)={\frac {1}{2}}\rho \!\left({\frac {x}{2}}\right)+{\frac {1}{2}}\rho \!\left({\frac {x+1}{2}}\right)$
The map ${\mathcal {L}}_{T}$ is a linear operator, as one easily sees that ${\mathcal {L}}_{T}(f+g)={\mathcal {L}}_{T}(f)+{\mathcal {L}}_{T}(g)$ and ${\mathcal {L}}_{T}(af)=a{\mathcal {L}}_{T}(f)$ for all functions $f,g$ on the unit interval, and all constants $a$.
Viewed as a linear operator, the most obvious and pressing question is: what is its spectrum? One eigenvalue is obvious: if $\rho (x)=1$ for all $x$ then one obviously has ${\mathcal {L}}_{T}\rho =\rho$ so the uniform density is invariant under the transformation. This is in fact the largest eigenvalue of the operator ${\mathcal {L}}_{T}$, it is the Frobenius–Perron eigenvalue. The uniform density is, in fact, nothing other than the invariant measure of the dyadic transformation.
To explore the spectrum of ${\mathcal {L}}_{T}$ in greater detail, one must first limit oneself to a suitable space of functions (on the unit interval) to work with. This might be the space of Lebesgue measurable functions, or perhaps the space of square integrable functions, or perhaps even just polynomials. Working with any of these spaces is surprisingly difficult, although a spectrum can be obtained.

### Borel space

A vast amount of simplification results if one instead works with the Cantor space $\Omega =\{0,1\}^{\mathbb {N} }$, and functions $\rho :\Omega \to \mathbb {R} .$ Some caution is advised, as the map $T(x)=2x{\bmod {1}}$ is defined on the unit interval of the real number line, assuming the natural topology on the reals. By contrast, the map $T(b_{0},b_{1},b_{2},\dots )=(b_{1},b_{2},\dots )$ is defined on the Cantor space $\Omega =\{0,1\}^{\mathbb {N} }$, which by convention is given a very different topology, the product topology. There is a potential clash of topologies; some care must be taken. However, as presented above, there is a homomorphism from the Cantor set into the reals; fortunately, it maps open sets into open sets, and thus preserves notions of continuity.
To work with the Cantor set $\Omega =\{0,1\}^{\mathbb {N} }$, one must provide a topology for it; by convention, this is the product topology. By adjoining set-complements, it can be extended to a Borel space, that is, a sigma algebra. The topology is that of cylinder sets. A cylinder set has the generic form
    $(*,*,*,\dots ,*,b_{k},b_{k+1},*,\dots ,*,b_{m},*,\dots )$
where the $*$ are arbitrary bit values (not necessarily all the same), and the $b_{k},b_{m},\dots$ are a finite number of specific bit-values scattered in the infinite bit-string. These are the open sets of the topology. The canonical measure on this space is the Bernoulli measure for the fair coin-toss. If there is just one bit specified in the string of arbitrary positions, the measure is 1/2. If there are two bits specified, the measure is 1/4, and so on. One can get fancier: given a real number $0<p<1$ one can define a measure
    $\mu _{p}(*,\dots ,*,b_{k},*,\dots )=p^{n}(1-p)^{m}$
if there are $n$ heads and $m$ tails in the sequence. The measure with $p=1/2$ is preferred, since it is preserved by the map
    $(b_{0},b_{1},b_{2},\dots )\mapsto x=\sum _{n=0}^{\infty }{\frac {b_{n}}{2^{n+1}}}.$
So, for example, $(0,*,\cdots )$ maps to the interval $[0,1/2]$ and $(1,*,\dots )$ maps to the interval $[1/2,1]$ and both of these intervals have a measure of 1/2. Similarly, $(*,0,*,\dots )$ maps to the interval $[0,1/4]\cup [1/2,3/4]$ which still has the measure 1/2. That is, the embedding above preserves the measure.
An alternative is to write
    $(b_{0},b_{1},b_{2},\dots )\mapsto x=\sum _{n=0}^{\infty }\left[b_{n}p^{n+1}+(1-b_{n})(1-p)^{n+1}\right]$
which preserves the measure $\mu _{p}.$ That is, it maps such that the measure on the unit interval is again the Lebesgue measure.

### Frobenius–Perron operator

Denote the collection of all open sets on the Cantor set by ${\mathcal {B}}$ and consider the set ${\mathcal {F}}$ of all arbitrary functions $f:{\mathcal {B}}\to \mathbb {R} .$ The shift $T$ induces a pushforward
    $f\circ T^{-1}$
defined by $\left(f\circ T^{-1}\right)\!(x)=f(T^{-1}(x)).$ This is again some function ${\mathcal {B}}\to \mathbb {R} .$ In this way, the map $T$ induces another map ${\mathcal {L}}_{T}$ on the space of all functions ${\mathcal {B}}\to \mathbb {R} .$ That is, given some $f:{\mathcal {B}}\to \mathbb {R}$, one defines
    ${\mathcal {L}}_{T}f=f\circ T^{-1}$
This linear operator is called the transfer operator or the Ruelle–Frobenius–Perron operator. The largest eigenvalue is the Frobenius–Perron eigenvalue, and in this case, it is 1. The associated eigenvector is the invariant measure: in this case, it is the Bernoulli measure. Again, ${\mathcal {L}}_{T}(\rho )=\rho$ when $\rho (x)=1.$

### Spectrum

To obtain the spectrum of ${\mathcal {L}}_{T}$, one must provide a suitable set of basis functions for the space ${\mathcal {F}}.$ One such choice is to restrict ${\mathcal {F}}$ to the set of all polynomials. In this case, the operator has a discrete spectrum, and the eigenfunctions are (curiously) the Bernoulli polynomials! (This coincidence of naming was presumably not known to Bernoulli.)
Indeed, one can easily verify that
    ${\mathcal {L}}_{T}B_{n}=2^{-n}B_{n}$
where the $B_{n}$ are the Bernoulli polynomials. This follows because the Bernoulli polynomials obey the identity
    ${\frac {1}{2}}B_{n}\!\left({\frac {y}{2}}\right)+{\frac {1}{2}}B_{n}\!\left({\frac {y+1}{2}}\right)=2^{-n}B_{n}(y)$
Note that $B_{0}(x)=1.$
Another basis is provided by the Haar basis, and the functions spanning the space are the Haar wavelets. In this case, one finds a continuous spectrum, consisting of the unit disk on the complex plane. Given $z\in \mathbb {C}$ in the unit disk, so that $|z|<1$, the functions
    $\psi _{z,k}(x)=\sum _{n=1}^{\infty }z^{n}\exp i\pi (2k+1)2^{n}x$
obey
    ${\mathcal {L}}_{T}\psi _{z,k}=z\psi _{z,k}$
for $k\in \mathbb {Z} .$ This is a complete basis, in that every integer can be written in the form $(2k+1)2^{n}.$ The Bernoulli polynomials are recovered by setting $k=0$ and $z={\frac {1}{2}},{\frac {1}{4}},\dots$
A complete basis can be given in other ways, as well; they may be written in terms of the Hurwitz zeta function. Another complete basis is provided by the Takagi function. This is a fractal, differentiable-nowhere function. The eigenfunctions are explicitly of the form
    ${\mbox{blanc}}_{w,k}(x)=\sum _{n=0}^{\infty }w^{n}s((2k+1)2^{n}x)$
where $s(x)$ is the triangle wave. One has, again,
    ${\mathcal {L}}_{T}{\mbox{blanc}}_{w,k}=w\;{\mbox{blanc}}_{w,k}.$
All of these different bases can be expressed as linear combinations of one-another. In this sense, they are equivalent.
The fractal eigenfunctions show an explicit symmetry under the fractal groupoid of the modular group; this is developed in greater detail in the article on the Takagi function (the blancmange curve). Perhaps not a surprise; the Cantor set has exactly the same set of symmetries (as do the continued fractions.) This then leads elegantly into the theory of elliptic equations and modular forms.

## Relation to the Ising model

The Hamiltonian of the zero-field one-dimensional Ising model of $2N$ spins with periodic boundary conditions can be written as
    $H(\sigma )=g\sum _{i\in \mathbb {Z} _{2N}}\sigma _{i}\sigma _{i+1}.$
Letting $C$ be a suitably chosen normalization constant and $\beta$ be the inverse temperature for the system, the partition function for this model is given by
    $Z=\sum _{\{\sigma _{i}=\pm 1,\,i\in \mathbb {Z} _{2N}\}}\prod _{i\in \mathbb {Z} _{2N}}Ce^{-\beta g\sigma _{i}\sigma _{i+1}}.$
We can implement the renormalization group by integrating out every other spin. In so doing, one finds that $Z$ can also be equated with the partition function for a smaller system with but $N$ spins,
    $Z=\sum _{\{\sigma _{i}=\pm 1,\,i\in \mathbb {Z} _{N}\}}\prod _{i\in \mathbb {Z} _{N}}{\mathcal {R}}[C]e^{-{\mathcal {R}}[\beta g]\sigma _{i}\sigma _{i+1}},$
provided we replace $C$ and $\beta g$ with renormalized values ${\mathcal {R}}[C]$ and ${\mathcal {R}}[\beta g]$ satisfying the equations
    ${\mathcal {R}}[C]^{2}=4\cosh(2\beta g)C^{4},$
    $e^{-2{\mathcal {R}}[\beta g]}=\cosh(2\beta g).$
Suppose now that we allow $\beta g$ to be complex and that $\operatorname {Im} [2\beta g]={\frac {\pi }{2}}+\pi n$ for some $n\in \mathbb {Z}$. In that case we can introduce a parameter $t\in [0,1)$ related to $\beta g$ via the equation
    $e^{-2\beta g}=i\tan {\big\pi (t-{\frac {1}{2}}){\big )},$
and the resulting renormalization group transformation for $t$ will be precisely the dyadic map:
    ${\mathcal {R}}[t]=2t{\bmod {1}}.$