To see this, let us first note that the only x values that need to be considered are those in 0<x<1, because by adding or subtracting whole integers to x one doesn't change which elements get rounded up and which get rounded down.
Next, we only really need to analyse x values in 0<x<1/2, because by switching x for 1-x, every element that was previously rounded up will now be rounded down and vice versa.
In our analysis we will now use the function "modulo" extensively, so, for clarity, let us define it. For two positive real numbers, a and b, the value c=a mod b is the unique real number c in the range 0≤c<b such that if you subtract it from a the result is a multiple of b, in the sense that k=(a-c)/b is an integer. This integer, k, is referred to as a div b.
We note that we can equally consider all elements in our sequence modulo 1, for this does not change their rounding properties.
Let y be 1/2 mod x, and let us divide the range (0,1), where all elements lie, to the following sub-ranges:
Consider now the elements of the sequence modulo 1. The sequence begins with exactly k0 elements in D. These are all rounded down. Then, there may or may not be an element in M. After that, there are exactly k0 elements in U, which are all rounded up. Then the cycle begins again. The only difference from cycle to cycle is whether or not there is an element inside M, and whether that element is rounded up or down. The M element is at most unique at each cycle. (However, as n approaches infinity, so does the total number of elements that fall into the M region.)
Let us divide the original sequence into two sub-sequences. The subsequence H0 will be composed of all elements in D and U, whereas the T0 subsequence will be composed of all elements in M.
For an x value in (0,1/2), in the subsequence H0, the value of d-u ranges from 0 to k0, going through the entire range before any new element is added to the T0 sequence. For an x value in (1/2,1), the values range from 0 to -k0, but, again, this entire range is covered before any new element is added to the T0 subsequence.
Let the amplitude of a sequence be the difference between its maximal and its minimal value. Given that H0 goes through its entire cycle before any element is added to T0, the amplitude of the total sequence is the amplitude of H0 (which we know to be k0) plus the amplitude of T0. Let us now, therefore, calculate this latter amplitude.
Let us subdivide the range (0,1) as follows:
Following the same logic, the next hit on M will be at an offset of 2x mod 2y, then at 3x mod 2y, etc.. In fact, if we were to re-scale M into (0,1), the sequence will be x1, 2x1,... (mod 1), where x1=x/(2y) mod 1. Notably, x1 is also an irrational.
This means that the d-u subsequence within M behaves exactly as the d-u full sequence for x1. In particular, the two have the same amplitudes.
We can now, therefore, repeat the analysis we made with x on x1, dividing its sequence to H1 and T1 subsequences. The amplitude of this sequence will be k1=1/2 div min(x1,1-x1) plus whatever is the amplitude for the subsequence T1, which, in turn, can be considered as the amplitude of the d-u values for a linear sequence based on a new irrational value, x2, etc.. In total, the amplitude of the original sequence is bounded from below by an infinite sum of kis, each of which is a positive integer, and so is, itself, infinite, from which we can conclude that |d-u| is unbounded.
As can be seen, the sequence of xis relate to each other by being residues in a continuous fraction expansion of x (or, strictly speaking, of 2x). Analysing the sequence by means of continuous fractions (which Jan Fricke did) allows us to describe the d-u sequence very well, showing how quickly it diverges and how many times it hits zero along the way. These and similar follow-up questions are left for the reader.
To the best of Jan's knowledge, the problem originated from a question that was asked on the newsgroup de.sci.mathematik some years ago.
Back to riddle
Back to main page