7

Is there a bijective function $f:[0,1] \to [0,1]$ such that the graph of $f$ in $\mathbb{R}^2$ is a dense subset of $[0,1] \times [0,1]$? (Exact same as title).

I think the question is not affected much if we ask the same question but for a function $f:(0,1) \to [0,1]$ or $f:[0,1) \to (0,1]$ etc, as opposed to $f:[0,1] \to [0,1]$, which was in the original question. All that really matters is that the domain and range are bounded, connected subsets of $\mathbb{R}^2$.

I suspect the answer to the question is yes, but I don't know how to construct such a function.

The first thing to note is that, if such a function exists it must be nowhere continuous, else the graph of f would not be dense throughout all of $[0,1] \times [0,1]$. However, it is not clear if the graph of our function would be a totally disconnected subset of $[0,1] \times [0,1]$.

Can a nowhere continuous function have a connected graph?

I have actually not read the answers to the above question in any detail, and anyway, it may not be relevant to answer the question here (although it might).


My attempt:

Let $f_{ Conway_{(0,1)} }:(0,1) \to \mathbb{R} $ be the Conway base-13 function, but with domain restricted to $(0,1)$. Now define $f_{Conway_{(0,1)}bounded}(x) = \frac{1}{\pi} \arctan(f_{ Conway_{(0,1)} }(x)) + \frac{1}{2}$ with domain $(0,1)$ and range $(0,1)$. Then the function is well-defined, and the graph of $f_{Conway_{(0,1)}bounded}:(0,1) \to (0,1)$ is a dense subset of $[0,1] \times [0,1]$. Now we can easily modify our function $f_{Conway_{(0,1)}bounded}$ so that it has domain $[0,1]$ and range $[0,1]$, and I will assume the reader can do this and leave the details for brevity. But the point is, these missing two points in the domain, $0$ and $1$, are not a problem.

The problem is that our function is not injective.

Note that we cannot answer the question by only removing points from the graph of $f_{Conway_{(0,1)}bounded}$, for then you would be removing lots of points from the domain, and so this would not be a function with domain $(0,1)$. So maybe doing something clever to $f_{Conway_{(0,1)}bounded}$, or perhaps coming up with an entirely different way to construct a function to answer the question is necessary.

Adam Rubinson
  • 24,300
  • 1
    Just an idea: if you could write $[0,1]$ as a countable disjoint union of dense subsets, $[0,1]=\bigcup_k^\cdot A_k$, then you could take an enumeration $q_k$ of the rationals and define bijections $f_k:A_k\to A_k$ such that the image of every neighborhood of $q_k$ under $f_k$ is dense in $[0,1]$. Then define $f(x):=f_k(x)$ if $x\in A_k$' I'm not entirely sure that this is possible, but it might be worth checking it out. – Vercassivelaunos Aug 17 '20 at 17:41
  • That is basically what the two answers say. – Adam Rubinson Aug 18 '20 at 20:15

3 Answers3

3

Yes, what you can do is construct an injective function $f:\mathbb Q \cap [0,1] \rightarrow \mathbb [0,1]$ whose graph is dense in $[0,1] \times [0,1]$ and then extend the domain of $f$ to $\mathbb [0,1]$ in a way that makes $f$ a bijection (this is doable since there are $|\mathbb R | $ points in $[0,1]$ not already in the image of $f$).

For example, On $\mathbb Q \cap [0,1]$ you could let $$f \left ( \frac{a}{b} \right ) = \frac{\pi a^2}{b} \mod 1$$

cha21
  • 917
  • You can extend it to a bijection using the Axiom of Choice, whether it be $[0,1]$ or $(0,1)$. – Stephen Montgomery-Smith Aug 17 '20 at 20:03
  • I think, thanks to zhw.'s answer, that I understand this answer now. I can kind of see how the graph of the function $f \left ( \frac{a}{b} \right ) = \frac{\pi a^2}{b} \mod 1$ could be dense in $[0,1] \times [0,1]$, but does someone have an actual proof?. Can someone please explain it to me. – Adam Rubinson Aug 18 '20 at 20:33
2

For simplicity I'll work in $[0,1]\times [0,1].$ The word "countable" below will mean "countably infinite".

Lemma: There exists a pairwise disjoint collection $\{D_n:n\in \mathbb N\}$ of subsets of $(0,1)$ such that each $D_n$ is countable and dense in $(0,1).$

Proof: Let $p_1,p_2,\dots$ be the prime numbers. For each $n,$ define $D_n$ to be the set of ratios $j/p_n^k,$ where $k\in \mathbb N,$ $1\le j < p_n^k,$ and $j,p_n$ are relatively prime. I'll stop here, but ask questions if you like.

Now define a doubly indexed collection of open intervals $$I_{mk}=(\frac{k-1}{m},\frac{k}{m}),$$ where $m\in \mathbb N, 1\le k\le m.$ We can linearly order these intervals as $I_{11}, I_{21},I_{22},I_{31}, I_{32},I_{33},\dots$ In this order let's simply denote the intervals as $J_1,J_2,\dots.$

For each $n,$ the set $D_n\cap J_n$ is a countable dense subset of $J_n.$ Note that the collection $\{D_n\cap J_n)\}$ is pairwise disjoint.

Now for $n=1,\dots,$ define $f:[0,1]\to [0,1]$ by defining $f:J_n\cap D_n \to D_n$ to be any bijection you like. To get the full bijection, note that $[0,1]\setminus (\cup J_n\cap D_n)$ is $[0,1]$ minus a countable set. So is $[0,1]\setminus (\cup D_n).$ These sets therefore have the cardinality of $[0,1],$ hence there is a bijection between them. Let $f$ be this bijection between these sets. Now $f$ is a full bijection from $[0,1]$ to $[0,1].$

To show density, let $(a,b)\times (c,d)\subset (0,1)\times (0,1).$ Then for some large $n$ (now fixed), $J_n\cap D_n\subset (a,b).$ And since $f(J_n\cap D_n)=D_n,$ a dense subset of $(0,1),$ there exists $x\in J_n\cap D_n$ such that $f(x)\in (c,d).$ Thus $(x,f(x))\in (a,b)\times (c,d).$ This shows the graph of $f$ is dense in $[0,1]\times [0,1].$

zhw.
  • 107,943
  • Ah, so this is basically the same as cha21's answer, which I now understand. You gave a nice function. But the main thing is that cha21's answer finally 'clicked' for me, and I understand it now (thanks to your answer). Although it's not easy to see if the graph of his function is actually dense in $[0,1] \times [0,1]$, whereas your the graph of your function being dense is clear. – Adam Rubinson Aug 18 '20 at 20:37
  • If the function zhw defined is $f(x)$, then to get a bijection from $\mathbb{R} \to \mathbb{R}$ such that the graph of $f$ is dense in $\mathbb{R^2}$, we simply map each point $(x,f(x))$ in the graph of $f$ to $( \quad \tan(\pi(x-1/2)), f(\ \tan(\pi(x-1/2))\ ) \quad )$. – Adam Rubinson Aug 18 '20 at 20:58
1

Let S(x,n)=(2x+1)/(2^(2n+1)).
Let R(x,n) to be floor(x/(2^n))+(2^n)(x mod 2^n) (informally, swap the two halves of the binary expansion of x).
Let f(b)=S(R(x,n),n) if there is some x, n (which, fairly trivially, must be unique) such that S(x, n) =b, and b otherwise.
Consider any "binary grid cell", [a*2^-n,(a+1)*2^-n] x [b*2^-n,(b+1)*2^-n]. (S(a*2^n+b,n),f(S(a*2^n+b,n))=S(b*2^n+a,n)) is in this grid cell.