Minkowski's question-mark function
Template:Short description Template:Use dmy dates Template:More footnotes Template:Dark mode invert Template:Dark mode invert
In mathematics, Minkowski's question-mark function, denoted Template:Math, is a function with unusual fractal properties, defined by Hermann Minkowski in 1904.Template:Sfnp It maps quadratic irrational numbers to rational numbers on the unit interval, via an expression relating the continued fraction expansions of the quadratics to the binary expansions of the rationals, given by Arnaud Denjoy in 1938.Template:Sfnp It also maps rational numbers to dyadic rationals, as can be seen by a recursive definition closely related to the Stern–Brocot tree.
Definition and intuitionEdit
One way to define the question-mark function involves the correspondence between two different ways of representing fractional numbers using finite or infinite binary sequences. Most familiarly, a string of 0s and 1s with a single point mark ".", like "11.0010010000111111..." can be interpreted as the binary representation of a number. In this case this number is <math display=block>2+1+\frac18+\frac1{64}+\cdots=\pi.</math> There is a different way of interpreting the same sequence, however, using continued fractions. Interpreting the fractional part "0.00100100001111110..." as a binary number in the same way, replace each consecutive block of 0's or 1's by its run length (or, for the first block of zeroes, its run length plus one), in this case generating the sequence <math>[3;3,1,2,1,4,6,\dots]</math>. Then, use this sequence as the coefficients of a continued fraction:Template:SfnpTemplate:Sfnp <math display=block>3+\frac{1}{\displaystyle 3+\frac{1}{\displaystyle 1+\frac{1}{\displaystyle 2+\frac{1}{\displaystyle 1+\frac{1}{\displaystyle 4+\frac{1}{\displaystyle 6+\dots}}}}}}\approx 3.2676</math>
The question-mark function reverses this process: it translates the continued-fraction of a given real number into a run-length encoded binary sequence, and then reinterprets that sequence as a binary number.Template:SfnpTemplate:Sfnp For instance, for the example above, <math>\operatorname{?}(3.2676)\approx\pi</math>. To define this formally, if an irrational number <math>x</math> has the (non-terminating) continued-fraction representation <math display=block>x=a_0+\frac{1}{\displaystyle a_1+\frac{1}{\displaystyle a_2+\cdots}}=[a_0;a_1,a_2,\dots]</math> then the value of the question-mark function on <math>x</math> is defined as the value of the infinite series <math display=block>\operatorname{?}(x) = a_0 + 2 \sum_{n=1}^\infty \frac{\left(-1\right)^{n+1}}{2^{a_1 + \cdots + a_n}}.</math> A rational number <math>x</math> has a terminating continued-fraction representation <math>[a_0;a_1,a_2,\dots,a_m]</math>, so the value of the question-mark function on <math>x</math> reduces to the dyadic rational defined by a finite sum, <math display=block>\operatorname{?}(x) = a_0 + 2 \sum_{n=1}^m \frac{\left(-1\right)^{n+1}}{2^{a_1 + \cdots + a_n}}.</math> A quadratic irrational number <math>x</math> is represented by a periodic continued fraction, so the value of the question-mark function on <math>x</math> is a periodic binary fraction and thus a non-dyadic rational number.
Self-symmetryEdit
The question mark is clearly visually self-similar. A monoid of self-similarities may be generated by two operators Template:Mvar and Template:Mvar acting on the unit square and defined as follows: <math display=block>\begin{align}
S(x, y) &= \left( \frac x {x+1}, \frac y 2 \right), \\[5px] R(x, y) &= (1 - x, 1 - y).
\end{align}</math>
Visually, Template:Mvar shrinks the unit square to its bottom-left quarter, while Template:Mvar performs a point reflection through its center.
A point on the graph of Template:Math has coordinates Template:Math for some Template:Mvar in the unit interval. Such a point is transformed by Template:Mvar and Template:Mvar into another point of the graph, because Template:Math satisfies the following identities for all Template:Math: <math display=block>\begin{align}
\operatorname{?}\left(\frac{x}{x+1}\right) &= \frac{\operatorname{?}(x)}{2}, \\[5px] \operatorname{?}(1 - x) &= 1 - \operatorname{?}(x). \end{align}</math>
These two operators may be repeatedly combined, forming a monoid. A general element of the monoid is then <math display=block>S^{a_1} R S^{a_2} R S^{a_3} \cdots</math>
for positive integers Template:Math. Each such element describes a self-similarity of the question-mark function. This monoid is sometimes called the period-doubling monoid, and all period-doubling fractal curves have a self-symmetry described by it (the de Rham curve, of which the question mark is a special case, is a category of such curves). The elements of the monoid are in correspondence with the rationals, by means of the identification of Template:Math with the continued fraction Template:Math. Since both <math display=block>S : x \mapsto \frac{x}{x+1}</math> and <math display=block>T : x \mapsto 1 - x</math> are linear fractional transformations with integer coefficients, the monoid may be regarded as a subset of the modular group Template:Math.
Quadratic irrationalsEdit
The question mark function provides a one-to-one mapping from the non-dyadic rationals to the quadratic irrationals, thus allowing an explicit proof of countability of the latter. These can, in fact, be understood to correspond to the periodic orbits for the dyadic transformation. This can be explicitly demonstrated in just a few steps.
Dyadic symmetryEdit
Define two moves: a left move and a right move, valid on the unit interval <math>0\le x\le 1</math> as <math display=block>L_D(x) = \frac{x}{2}</math> and <math>L_C(x) = \frac{x}{1+x}</math> and <math display=block>R_D(x) = \frac{1+x}{2}</math> and <math>R_C(x) = \frac{1}{2-x}</math> The question mark function then obeys a left-move symmetry <math display=block>L_D \circ \text{?} = \text{?} \circ L_C</math> and a right-move symmetry <math display=block>R_D \circ \text{?} = \text{?} \circ R_C</math> where <math>\circ</math> denotes function composition. These can be arbitrarily concatenated. Consider, for example, the sequence of left-right moves <math>LRLLR.</math> Adding the subscripts C and D, and, for clarity, dropping the composition operator <math>\circ</math> in all but a few places, one has: <math display=block>L_D R_D L_D L_D R_D \circ \text{?} = \text{?} \circ L_C R_C L_C L_C R_C</math> Arbitrary finite-length strings in the letters L and R correspond to the dyadic rationals, in that every dyadic rational can be written as both <math>y=n/2^m</math> for integer n and m and as finite length of bits <math>y=0.b_1b_2b_3\cdots b_m</math> with <math>b_k\in \{0,1\}.</math> Thus, every dyadic rational is in one-to-one correspondence with some self-symmetry of the question mark function.
Some notational rearrangements can make the above slightly easier to express. Let <math>g_0</math> and <math>g_1</math> stand for L and R. Function composition extends this to a monoid, in that one can write <math>g_{010}=g_0g_1g_0</math> and generally, <math>g_Ag_B=g_{AB}</math> for some binary strings of digits A, B, where AB is just the ordinary concatenation of such strings. The dyadic monoid M is then the monoid of all such finite-length left-right moves. Writing <math>\gamma\in M</math> as a general element of the monoid, there is a corresponding self-symmetry of the question mark function: <math display=block>\gamma_D\circ \text{?} = \text{?}\circ \gamma_C</math>
IsomorphismEdit
An explicit mapping between the rationals and the dyadic rationals can be obtained providing a reflection operator <math display=block>r(x)=1-x</math> and noting that both <math display=block>r\circ R_D\circ r = L_D</math> and <math>r\circ R_C\circ r = L_C</math> Since <math>r^2=1</math> is the identity, an arbitrary string of left-right moves can be re-written as a string of left moves only, followed by a reflection, followed by more left moves, a reflection, and so on, that is, as <math>L^{a_1}rL^{a_2}rL^{a_3}\cdots</math> which is clearly isomorphic to <math>S^{a_1}TS^{a_2}TS^{a_3}\cdots</math> from above. Evaluating some explicit sequence of <math>L_D,R_D</math> at the function argument <math>x=1</math> gives a dyadic rational; explicitly, it is equal to <math>y=0.b_1b_2b_3\cdots b_m</math> where each <math>b_k\in\{0,1\}</math> is a binary bit, zero corresponding to a left move and one corresponding to a right move. The equivalent sequence of <math>L_C,R_C</math> moves, evaluated at <math>x=1</math> gives a rational number <math>p/q.</math> It is explicitly the one provided by the continued fraction <math>p/q=[a_1,a_2,a_3,\ldots,a_j]</math> keeping in mind that it is a rational because the sequence <math>(a_1,a_2,a_3,\ldots,a_j)</math> was of finite length. This establishes a one-to-one correspondence between the dyadic rationals and the rationals.
Periodic orbits of the dyadic transformEdit
Consider now the periodic orbits of the dyadic transformation. These correspond to bit-sequences consisting of a finite initial "chaotic" sequence of bits <math>b_0,b_1,b_2,\ldots, b_{k-1}</math>, followed by a repeating string <math>b_k,b_{k+1},b_{k+2},\ldots, b_{k+m-1}</math> of length <math>m</math>. Such repeating strings correspond to a rational number. This is easily made explicit. Write <math display=block>y=\sum_{j=0}^{m-1} b_{k+j}2^{-j-1}</math> one then clearly has <math display=block>\sum_{j=0}^\infty b_{k+j}2^{-j-1} = y\sum_{j=0}^\infty 2^{-jm} = \frac{y}{1-2^m}</math> 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.
Periodic orbits as continued fractionsEdit
Such periodic orbits have an equivalent periodic continued fraction, per the isomorphism established above. There is an initial "chaotic" orbit, of some finite length, followed by a repeating sequence. The repeating sequence generates a periodic continued fraction satisfying <math>x=[a_n,a_{n+1},a_{n+2},\ldots,a_{n+r},x].</math> This continued fraction has the formTemplate:Sfnp <math display=block>x = \frac{\alpha x+\beta}{\gamma x+\delta}</math> with the <math>\alpha,\beta,\gamma,\delta</math> being integers, and satisfying <math>\alpha \delta-\beta \gamma=\pm 1.</math> Explicit values can be obtained by writing <math display=block>S\mapsto \begin{pmatrix} 1 & 0\\ 1 & 1\end{pmatrix}</math> for the shift, so that <math display=block>S^n\mapsto \begin{pmatrix} 1 & 0\\ n & 1\end{pmatrix}</math> while the reflection is given by <math display=block>T\mapsto \begin{pmatrix} -1 & 1\\ 0 & 1\end{pmatrix}</math> so that <math>T^2=I</math>. Both of these matrices are unimodular, arbitrary products remain unimodular, and result in a matrix of the form <math display=block>S^{a_n}TS^{a_{n+1}}T\cdots TS^{a_{n+r}} = \begin{pmatrix} \alpha & \beta\\ \gamma & \delta\end{pmatrix}</math> giving the precise value of the continued fraction. As all of the matrix entries are integers, this matrix belongs to the projective modular group <math>PSL(2,\mathbb{Z}).</math>
Solving explicitly, one has that <math>\gamma x^2 + (\delta-\alpha)x-\beta=0.</math> It is not hard to verify that the solutions to this meet the definition of quadratic irrationals. In fact, every quadratic irrational can be expressed in this way. Thus the quadratic irrationals are in one-to-one correspondence with the periodic orbits of the dyadic transform, which are in one-to-one correspondence with the (non-dyadic) rationals, which are in one-to-one correspondence with the dyadic rationals. The question mark function provides the correspondence in each case.
Properties of Template:MathEdit
Template:Dark mode invert The question-mark function is a strictly increasing and continuous,Template:Sfnp but not absolutely continuous function. The derivative is defined almost everywhere, and can take on only two values, 0 (its value almost everywhere, including at all rational numbers) and <math>+\infty</math>.Template:Sfnp There are several constructions for a measure that, when integrated, yields the question-mark function. One such construction is obtained by measuring the density of the Farey numbers on the real number line. The question-mark measure is the prototypical example of what are sometimes referred to as multi-fractal measures.
The question-mark function maps rational numbers to dyadic rational numbers, meaning those whose base two representation terminates, as may be proven by induction from the recursive construction outlined above. It maps quadratic irrationals to non-dyadic rational numbers. In both cases it provides an order isomorphism between these sets,Template:Sfnp making concrete Cantor's isomorphism theorem according to which every two unbounded countable dense linear orders are order-isomorphic.Template:Sfnp It is an odd function, and satisfies the functional equation Template:Math; consequently Template:Math is an odd periodic function with period one. If Template:Math is irrational, then Template:Mvar is either algebraic of degree greater than two, or transcendental.
The question-mark function has fixed points at 0, Template:Sfrac and 1, and at least two more, symmetric about the midpoint. One is approximately 0.42037.Template:Sfnp It was conjectured by Moshchevitin that they were the only 5 fixed points.Template:Sfnp
In 1943, Raphaël Salem raised the question of whether the Fourier–Stieltjes coefficients of the question-mark function vanish at infinity.Template:Sfnp In other words, he wanted to know whether or not <math display=block>\lim_{n \to \infty}\int_0^1 e^{2\pi inx} \, \operatorname{d?}(x)=0.</math>
This was answered affirmatively by Jordan and Sahlsten, as a special case of a result on Gibbs measures.Template:Sfnp
The graph of Minkowski question mark function is a special case of fractal curves known as de Rham curves.
AlgorithmEdit
The recursive definition naturally lends itself to an algorithm for computing the function to any desired degree of accuracy for any real number, as the following C function demonstrates. The algorithm descends the Stern–Brocot tree in search of the input Template:Mvar, and sums the terms of the binary expansion of Template:Math on the way. As long as the loop invariant Template:Math remains satisfied there is no need to reduce the fraction Template:Math, since it is already in lowest terms. Another invariant is Template:Math. The for
loop in this program may be analyzed somewhat like a while
loop, with the conditional break statements in the first three lines making out the condition. The only statements in the loop that can possibly affect the invariants are in the last two lines, and these can be shown to preserve the truth of both invariants as long as the first three lines have executed successfully without breaking out of the loop. A third invariant for the body of the loop (up to floating point precision) is Template:Math, but since Template:Mvar is halved at the beginning of the loop before any conditions are tested, our conclusion is only that Template:Math at the termination of the loop.
To prove termination, it is sufficient to note that the sum q + s
increases by at least 1 with every iteration of the loop, and that the loop will terminate when this sum is too large to be represented in the primitive C data type long
. However, in practice, the conditional break when y + d == y
is what ensures the termination of the loop in a reasonable amount of time.
<syntaxhighlight lang="c"> /* Minkowski's question-mark function */ double minkowski(double x) {
long p = x; long q = 1, r = p + 1, s = 1, m, n; double d = 1, y = p; if (x < p || (p < 0) ^ (r <= 0)) return x; /* out of range ?(x) =~ x */ while (true) { /* invariants: q * r - p * s == 1 && p / q <= x && x < r / s */ d /= 2; if (y + d == y) break; /* reached max possible precision */ m = p + r; if ((m < 0) ^ (p < 0)) break; /* sum overflowed */ n = q + s; if (n < 0) break; /* sum overflowed */
if (x < (double)m / n) { r = m; s = n; } else { y += d; p = m; q = n; } } return y + d; /* final round-off */
} </syntaxhighlight>
Probability distributionEdit
Restricting the Minkowski question mark function to ?:[0,1] → [0,1], it can be used as the cumulative distribution function of a singular distribution on the unit interval. This distribution is symmetric about its midpoint, with raw moments of about m1 = 0.5, m2 = 0.290926, m3 = 0.186389 and m4 = 0.126992,Template:Sfnp and so a mean and median of 0.5, a standard deviation of about 0.2023, a skewness of 0, and an excess kurtosis about −1.147.
See alsoEdit
- Cantor function, which can be understood as reinterpreting ternary numbers as binary numbers, analogously to the way the question-mark function reinterprets continued fractions as binary numbers.
- Hermite's problem, to which one of the approaches uses generalization of Minkowski's question-mark function.<ref>Template:Citation</ref>
- Pompeiu derivative
ReferencesEdit
NotesEdit
Historical sourcesEdit
BibliographyEdit
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Citation; reprinted by Dover Publications, 1997
- Template:Citation
- Template:Citation
- Template:Citation
Further readingEdit
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Citation
- Template:Cite arXiv