This is connected to this question. The main difference is criteria 4.
Main Question:
Using the Lebesgue outer measure, does there exist an explicit and bijective function $f:[0,1]\to[0,1]$ such that:
- the function $f$ is measurable in the sense of Caratheodory
- the graph of $f$ is dense in $[0,1]\times[0,1]$
- the range of $f$ is $[0,1]$
- the pre-image of each sub-interval of $[0,1]$ under $f$ (where each sub-interval has some length $\ell\in[0,1]$) has a Lebesgue measure of $\ell$
- the graph of $f$ is non-uniform (i.e. without complete spacial randomness) in $[0,1]\times[0,1]$
- using the Lebesgue measure, the expected value of $f$ is computable?
Motivation: I wanted to define an explicit and bijective function $f:[0,1]\to[0,1]$ where the graph of $f$ is somewhat but not too evenly distributed (i.e. with complete spacial randomness) in $[0,1]\times[0,1]$, such that using the uniform probability measure, we want a subset $X\subseteq[0,1]$, where (when function $f:[0,1]\to[0,1]$ is restricted to $f:X\to[0,1]$) the expected value of $f$ is undefined so we can find an unique extension of the expected value of $f$ which gives a finite value instead.
Question on motivation: If the function from the main question exists, does it satisfy the motivation?
Attempt to Solve Both Questions:
I can't prove an explicit example exists. For example, the Conway base-13 function satisfies some criteria of the main question but is defined as $f:[0,1]\to\mathbb{R}$, not computable, and surjective.
Furthermore, here is an attempt from this, this, and this post (note in the links, neither of the main questions/answers satisfy the motivation, e.g. in this answer, the function wasn't very explicit; in this answer, the function was extremely “non-uniform”; and with the main question of this post, the answer may not satisfy the motivation):
In case one wants to read here, here's the attempt:
Suppose the base-$3$ expansion of real numbers, in interval
$[0,1]$, have infinite decimals that approach $x\in[0,1]$ from the right
side so when $0\le x_1,x_2\le 1$ (and $x_1=x_2$) we get $f(x_1)=f(x_2)$.Furthermore, for $\mathbb{N}\cup\left\{0\right\}=\mathbb{N}_{0}$, if
$r\in\mathbb{N}_{0}$ and $\text{digit}_{3}:\mathbb{R}\times
\mathbb{Z}\to\left\{0,1,2\right\}$ is a function where
$\text{digit}_{3}(x,r)$ takes the digit in the $3^{r}$-th decimal fraction
of the base-$3$ expansion of $x$ (e.g.
$\text{digit}_{3}(1.789,2)=\text{digit}_{3}({1.210022{\cdot\cdot\cdot}}_{3},2)=1$), then $\left\{{g_r}^{\prime}\right\}_{r\in\mathbb{N}_{0}}$ is a
sequence of functions (and $\left[\cdot\right]$ is the nearest integer
function) such that ${g_r}^{\prime}:\mathbb{N}_0\to\mathbb{N}_0$ is
defined to be:\begin{equation}
g_r^{\prime}(x)=\left[\frac{10}{3}\sin(rx)+\frac{10}{3}\right]
\end{equation}then for some function $k:\mathbb{N}_{0}\to\mathbb{N}_{0}$, where $k$ is strictly increasing and $k(0)$ is a positive
number, we want the
the intermediate function (before $f$) or $f_{1}:[0,1]\to[0,10]$
to satisfy the main question (such that, in criteria 3. the range of $f_1$ is $[0,10]$).\begin{alignat}{2} & f_{1}(x) =
&&\left|\left(\sum\limits_{r=0}^{\infty}
g_{r+1}^{\prime}\!\left(\sum\limits_{p=r}^{r+k(r)}\text{digit}_{3}(x,p)\right)\!\!\bigg/3^{r}\right)-10\right|=
\label{eq:025} \\ & &&
\left|\left(\left(\sum\limits_{r=0}^{\infty}\left[\frac{10}{3}\sin\left(\left(r+1\right)\left(\sum\limits_{p=r}^{r+k(r)}\text{digit}_{3}(x,p)\right)\right)+\frac{10}{3}\right]\right)\!\!\bigg
/3^{r}\right)-10\right| \nonumber \end{alignat}(One example of $k(r)$ that may satisfy main question, when with criteria 3. the range of $f_1$ is $[0,10]$ instead of $[0,1]$, is $k(r)=10r+20$)
What we’re doing with $f_1$ is we are converting every digit of the base-$3$ expansion of $x$
into a pseudo-random number that is non-equally likely to be an integer,
including and in-between, $0$ and $20/3$. Furthermore, we attempt to
make the function dense in $[0,1]\times[0,10]$ by adding the
$3^{r}$-th decimal fraction with the next $3^k$-th decimal fractions; however, we also want to control the end-points of $[0,10]$, such that $f_1$
is dense in $\left[0,1\right]\times\left[0,1\right]$ by manipulating $f_1$ to get:\begin{alignat}{2} & f(x) = && 1-\frac{1}{10}f_1(x)\label{eq:109}\\
& &&
1-\left(\frac{1}{10}\right)\left|\left(\left(\sum\limits_{r=0}^{\infty}\left[\frac{10}{3}\sin\left(\left(r+1\right)\left(\sum\limits_{p=r}^{r+k(r)}\text{digit}_{3}(x,p)\right)\right)+\frac{10}{3}\right]\right)\!\!\bigg/3^{r}\right)-10\right|
\nonumber \end{alignat}(e.g. where $k(r)=10r+20$). You can use programming to visualize $f$ though I
don't know if you can graph the entire function. (The programming I
used is mathematica.)
Clear["Global`*"]
k[r_] := k[r] =
20 (* You can adjust k[r]; however, mathematica is unable to graph \
f when k[r] is steepy increasing e.g. for this function, k[r] must be \
less than 25 for the code to show a graph. Instead, it should be k[r]=10r+20 *)
g1[xr_, r_] :=
g1[xr, r] =
Round[(10/3) Sin[r xr] + (10/
3)] (*Converts the (3^r)th decimal fraction,in the base 3 \
expansion of the x-values in[x1,x2] (defined as xr or x_r not x*r) \
into a psuedo-random number that's non-equally likely to spit a \
number between,and including, 0 and 20/3 *)
f[x_] := f[x] =
N[1 - ((1)/(10)) RealAbs[
Sum[g1[Sum[
RealDigits[x, 3, k[r], -r][[1]][[z]], {z, r + 1, k[r]}],
r + 1]/(3^r), {r, 0, 8}] -
10]] (*Defines function f,I assume the larger k[r]'s values, the more \
the function appears dense in [0,1]x[0,1]*)
p = .00005 (*Incremement between the x-values in the points of the \
graph below*)
ListPlot[Table[{x, f[x]}, {x, p, 1,
p}]] (*Graphs countable points of the functions but is not a \
complete accurate graph. There are uncountably many points that need \
to be included.*)
Unfortunately, I only studied up to intro to advanced mathematics. (Without a deep undestanding of math I'm unable to prove if the function gives what I'm looking for.)
Is there a simpler example?
Best Answer
Edit: From this reddit comment, the answer to the main comment doesn't satisfy my motivation.
The function is almost completely non-uniform. Therefore, it does not satisfy my motivation.
Therefore, here is a link to the new question (note the main difference is criteria 4. where the sub-interval of $[0,1]$, intersected with the pre-image of another sub-interval of $[0,1]$ (under $f$), must equal the length of the original sub-interval times the length between the other sun-interval).