7
$\begingroup$

I read about Conway's base 13 function and felt encouraged to procrastinate on my homework and play around with functions that involve binary expansions. This one function $K$ I came across caught my attention.

Let $t \in (0,1)$. Taking the binary expansion, we can write $t= \sum_{n=1}^\infty \frac{a_n}{2^n}$, where $a_n \in \{0,1\}$ and $(a_n)$ cannot have an endless tail of 1's (i.e. for any $N \in \mathbb{N}$ with $a_N=1$, there exists some $n \geq N$ with $a_n =0$). This makes the binary expansion unique for any $x \in (0,1)$.

We can create 2 numbers from this: $x= \sum_{n=1}^\infty \frac{a_{2n-1}}{2^n}$ and $y= \sum_{n=1}^\infty \frac{a_{2n}}{2^n}$. We say $K(t)=(x,y)$.

In other words, we convert $t$ to binary format (e.g. $0.3141... \rightarrow 0.0101...$), and put all the odd-indexed digits in the binary expansion of $x$, and even-indexed digits in the binary expansion of $y$. Then you convert $x,y$ back to decimal format. Plotting the path, we have:

K function

This looks like a space-filling curve! Neat. It oddly looks similar to the Hilbert Curve. My question is if this function is continuous, since it zig-zags so much about the rational numbers.

Just for funzies, when I add $x$ and $y$, I can create a new function $k(x):=x+y$. Doing so, I get this neat looking graph:

k function

$\endgroup$
  • 1
    $\begingroup$ I'm happy to share my code if anyone wants it. $\endgroup$ – Spencer Kraisler Nov 20 '19 at 7:48
5
$\begingroup$

This function is not continuous: its value at $t=\frac12$ is $(\frac12,0)$, but its value at numbers just less than $\frac12$ is very close to $(\frac12,1)$. Analogous discontinuities occur at every value $t=\frac a{2^k}$.

For the record, this function is "space-filling", in that its range is $[0,1]\times[0,1] \setminus \{(1,1)\}$. (Just pick the desired target coordinates and interleave their bits to find the input $t$ that gets mapped to the desired point. The fact that $(1,1)$ is omitted is because we need to use $1=0.111\dots$ to achieve that coordinate, and we can arrange for this to happen for either coordinate but not for both separately.)

$\endgroup$
  • $\begingroup$ So it’s discontinuous on the dyadics. I wonder if it’s continuous everywhere else. $\endgroup$ – Spencer Kraisler Nov 20 '19 at 8:13
  • 1
    $\begingroup$ It is discontinuous on every terminating decimals of base 2, and continuous elsewhere, since every infinite decimals of base 2 can only be approximated by decimals with identical first $n$th decimal place. But terminating fractions like $0.1$ can be approximated by $0.011111...$. $\endgroup$ – Local Kleinian Manifold Nov 20 '19 at 8:44
  • $\begingroup$ That makes sense. Great deduction. How did you figure thag out? Any other cool info you have about this? $\endgroup$ – Spencer Kraisler Nov 20 '19 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.