![]() | ||
In mathematics, the Minkowski question mark function (or the slippery devil's staircase), denoted by ?(x), is a function possessing various unusual fractal properties, defined by Hermann Minkowski (1904, pages 171–172). It maps quadratic irrationals 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. In addition, it maps rational numbers to dyadic rationals, as can be seen by a recursive definition closely related to the Stern–Brocot tree.
Contents
Definition
If
whereas:
If
Intuitive explanation
To get some intuition for the definition above, consider the different ways of interpreting an infinite string of bits beginning with 0 as a real number in [0,1]. One obvious way to interpret such a string is to place a binary point after the first 0 and read the string as a binary expansion: thus, for instance, the string 001001001001001001001001... represents the binary number 0.010010010010..., or 2/7. Another interpretation views a string as the continued fraction [0; a1, a2, … ], where the integers ai are the run lengths in a run-length encoding of the string. The same example string 001001001001001001001001... then corresponds to [0; 2, 1, 2, 1, 2, 1, …] = (√3 − 1)/2. If the string ends in an infinitely long run of the same bit, we ignore it and terminate the representation; this is suggested by the formal "identity":
[0; a1, … ,an, ∞] = [0; a1, … ,an+1/∞] = [0; a1, … ,an+0] = [0; a1, … ,an].The effect of the question mark function on [0,1] can then be understood as mapping the second interpretation of a string to the first interpretation of the same string, just as the Cantor function can be understood as mapping a triadic base 3 representation to a base 2 representation. Our example string gives the equality
Recursive definition for rational arguments
For rational numbers in the unit interval, the function may also be defined recursively; if p/q and r/s are reduced fractions such that | ps − rq | = 1 (so that they are adjacent elements of a row of the Farey sequence) then
Using the base cases
it is then possible to compute ?(x) for any rational x, starting with the Farey sequence of order 2, then 3, etc.
If
has determinant ±1. Such a matrix is an element of SL(2,Z), the group of two-by-two matrices with determinant ±1. This group is related to the modular group.
Algorithm
This 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 x, and sums the terms of the binary expansion of y = ?(x) on the way. As long as the loop invariant
To prove termination, it is sufficient to note that the sum
Self-symmetry
The question mark is clearly visually self-similar. A monoid of self-similarities may be generated by two operators S and R acting on the unit square and defined as follows:
Visually, S shrinks the unit square to its bottom-left quarter, while R performs a point reflection through its center.
A point on the graph of ? has coordinates (x, ?(x)) for some x in the unit interval. Such a point is transformed by S and R into another point of the graph, because ? satisfies the following identities for all
These two operators may be repeatedly combined, forming a monoid. A general element of the monoid is then
for positive integers
and
are linear fractional transformations with integer coefficients, the monoid may be regarded as a subset of the modular group PSL(2,Z).
Properties of ?(x)
The question mark function is a strictly increasing and continuous, but not absolutely continuous function. The derivative vanishes on the rational numbers. 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. It is an odd function, and satisfies the functional equation ?(x + 1) = ?(x) + 1; consequently x → ?(x) − x is an odd periodic function with period one. If ?(x) is irrational, then x is either algebraic of degree greater than two, or transcendental.
The question mark function has fixed points at 0, 1/2 and 1, and at least two more, symmetric about the midpoint. One is approximately 0.42037.
In 1943, Raphaël Salem raised the question of whether the Fourier-Stieltjes coefficients of the question mark function vanish at infinity. In other words, he wanted to know whether or not
This was answered affirmatively by Jordan and Sahlsten, as a special case of a result on Gibbs measures.
The graph of Minkowski question mark function is a special case of fractal curves known as de Rham curves.
Conway box function
The ? is invertible, and the inverse function has also attracted the attention of various mathematicians, in particular John Conway, who discovered it independently, and whose notation for ?−1(x) is x with a box drawn around it: x The box function can be computed as an encoding of the base two expansion of
where the term on the right is a continued fraction.