Monday, June 10, 2019

calculus - Read Binary and Write Ternary



Working with cantor set I came up with the function $f : [0,1] \longrightarrow \Bbb{R}$ defined as follows: Let $0.a_1a_2a_3\cdots$ be the binary expansion of $x \in [0,1]$ any define $f(x) := 0.a_1a_2a_3\cdots$ (considered in base 3) i.e., $f(x) = \sum_{n=1}^\infty \frac{a_n}{3^n}$. And note that for $f$ to be well-defined we never consider expansions ending with infinitely many $1$'s. Some interesting questions about $f$ would be as follows:




  1. Determination of the set of points which $f$ is differentiable at them.


  2. Evaluation of $\int_0^1 f(x)dx$. (Since $f$ is monotone, it is integrable)



Answer




$2.$ Let,



$$\underline{\int}_0^1 f(x)dx,\quad\quad\bar{\int}_0^1 f(x)dx,$$



be the lower and upper Riemann integrals of $f$ over $[0,1]$, respectively (for formal definitions see, for example, the beginning of the chapter on the Riemann integral in Principles of Mathematical Analysis by Rudin -- I think it was chapter $6$). Pick any natural number $n$. Consider partitioning $[0,1]$ into intervals of length $1/2^n$, ($[0,1/2^n]$, $[1/2^n,1/2^{n-1}]$, etc.). Because $f$ is increasing on $[0,1]$,



$$L_n:=\sum_{i=1}^{2^n}f\left(\frac{i-1}{2^n}\right)\frac{1}{2^n}\leq \underline{\int}_0^1 f(x)dx \leq \bar{\int}_0^1 f(x)dx \leq \sum_{i=1}^{2^n}f\left(\frac{i}{2^n}\right)\frac{1}{2^n}=:U_n.$$



Letting $n$ tend to infinity we have that




$$L_\infty:=\lim_{n\to\infty}\sum_{i=1}^{2^n}f\left(\frac{i-1}{2^n}\right)\frac{1}{2^n}\leq \underline{\int}_0^1 f(x)dx \leq \bar{\int}_0^1 f(x)dx \leq \lim_{n\to\infty}\sum_{i=1}^{2^n}f\left(\frac{i}{2^n}\right)\frac{1}{2^n}=:U_\infty.$$



Let's try to compute $L_\infty$. To trick to doing so is to note that any $1\leq i\leq 2^n$, $f\left(\frac{i-1}{2^n}\right)$ is a finite sum of terms of the form $1/3^k$ where $1\leq k \leq n$. Thus, we can re-write $L_n$ as



$$L_n=\frac{1}{2^n}\sum_{i=1}^{n}\frac{1}{3^i}N_n\left(\frac{1}{3^i}\right).$$



where $N_n(1/3^i)$ denotes the total number of times the term $\frac{1}{3^i}$ appears in the sum $L_n$. Each number $(i-1)/2^n$ contributes a $\frac{1}{3^k}$ to the sum if and only if it has a $1$ in the $k^{th}$ place of its binary expansions. Thus, $N_n(1/3^k)$ is simply the total amount of numbers of the form $(i-1)/2^n$, with $1\leq i\leq 2^n$, that have a $1$ in the $k^{th}$ place of their binary expansions. Since the numbers of said form are exactly those whose binary expansions terminate after $n$ places, $N_n(1/3^i)$ is simply the number of sequences of zeros and ones of length $n-1$ (which is $2^{n-1}$). Thus,



$$\sum_{i=1}^{n}\frac{1}{3^i}N_n\left(\frac{1}{3^i}\right)=\sum_{i=1}^{n}\frac{1}{3^i}2^{n-1}=2^{n-1}\sum_{i=1}^{n}\frac{1}{3^i} =2^{n-2}\left(1-\frac{1}{3^n}\right).$$




So,



$$L_\infty=\lim_{n\to\infty}\frac{1}{4}\left(1-\frac{1}{3^n}\right)=\frac{1}{4}.$$



Since, for any $n$, $U_n=L_n-f(0)/2^n+f(1)/2^n=L_n+1/2^n$, we have that $L_\infty=U_\infty$. Thus, $f$ is Riemann integrable with integral of $1/4$.






In case it helps with $1$, here's a set on which $f$ is not even continuous (and hence, neither differentiable). Let $A$ denote the set of all numbers with finite binary representations (the dyadic fractions contained in $[0,1]$). That is,




$$A:=\{0.a_1a_2a_3\dots\in[0,1]:a_m=1,\quad n>m\Rightarrow a_n=0\text{ for some }m\}.$$



Let $a=0.a_1a_2a_3\dots\in A$ and let $m$ denote the last member of the expansion of $a$ that is a one. To show that $f$ is discontinuous at $a$ it is enough to show that for any $N>m$ we can find a number $b=0.b_1b_2b_3\dots$ such that



$$|a-b|\leq\frac{1}{2^N},\quad f(a)-f(b)\geq\frac{1}{2\cdot3^{m}}.$$



To do this set $b_n=a_n$ for all $n

$$a-b=\sum_{n=1}^m\frac{a_n}{2^n}-\left(\sum_{n=1}^{m-1}\frac{a_n}{2^n}+\sum_{n=m+1}^N\frac{1}{2^n}\right)=\frac{1}{2^m}-2\left(\frac{1}{2^{m+1}}-\frac{1}{2^{N+1}}\right)=\frac{1}{2^N}.$$




But,



$$f(a)-f(b)=\sum_{n=1}^m\frac{a_n}{3^n}-\left(\sum_{n=1}^{m-1}\frac{a_n}{3^n}+\sum_{n=m+1}^N\frac{1}{3^n}\right)=\frac{1}{3^m}-\frac{3}{2}\left(\frac{1}{3^{m+1}}-\frac{1}{3^{N+1}}\right)$$



$$=\frac{1}{2\cdot3^{m}}+\frac{1}{2\cdot3^N}\geq \frac{1}{2\cdot3^{m}}.$$



This is as far as I got, here are some final remarks:




  • $A$ is dense in $[0,1]$ but has a measure of $0$.


  • There is a theorem that states that a monotone function is differentiable almost everywhere (see Theorem 1.6.25 in here). Hence, there is at most a set of measure zero disjoint from $A$ on which $f$ is not differentiable. I suspect that $A$ is indeed the set of points on which $f$ is not differentiable, but this is nothing more than a hunch (do let me know if you ever figure it out!).


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...