Defining an explicit $f:\mathbb{R}\to\mathbb{R}$ whose graph is “extremely scattered” across $\mathbb{R}\times\mathbb{R}$

continuitydefinitiongeneral-topologyreal-analysis

Motivation:

From this question, suppose $X\subset\mathbb{R}$ and $Y\subset\mathbb{R}$.

Definition: A function $\ f: X \to Y\ $ is hyper-discontinuous if
for every $\ x\in X,\ \ \exists\ \delta>0,\ \varepsilon>0\ $ such that
$\ y\in X \setminus \{x\},\ \vert y-x \vert < \delta,\ \implies \vert
f(x) – f(y) \vert \geq \varepsilon.$

We know from this question, hyper-discontinuous functions don't exist for uncountable $X$; however, I want to define an explicit $f:\mathbb{R}\to\mathbb{R}$ that's hyper-discontinuous for $x$ in a countably infinite $X$.


Question: In the example, does an explicit $f:\mathbb{R}\to\mathbb{R}$ exist that satisfies the motivation? If not, how do we change the definition so it does?


Example: Consider the function $f:\mathbb{R}\to\mathbb{R}$, where for a base-3 expansion of $x\in\mathbb{R}$, we take the "pseudo-random" iterations of function $\mathscr{F}:\{0,1,2\}\to\{0,1,2\}$ where for the first iteration, replace base-3 digit zero with one; one with two, and two with zero.

In mathematical terms, if $\mathscr{F}:=\left\{(0,1),(1,2),(2,0)\right\}$, such that equation:
$$\mathscr{F}^{k}=\underset{k\text{ times}}{\underbrace{\mathscr{F}(\mathscr{F}(\cdots\mathscr{F}(x)))}}$$ is the $k$-th iteration of $\mathscr{F}$, we define a function with "pseudo-random" outputs in $\mathbb{N}$. If we define $g_{\varepsilon}:\mathbb{R}\to\mathbb{R}$ where:

$$g_{\varepsilon}(x)=\begin{cases}
\quad\!\!(2\varepsilon)^{x/(2\varepsilon)} & \quad\!\! x<-\varepsilon\\
-1/x & \!-2\varepsilon\le x <0\\
\quad \! 0 & \!\!\quad x=0 \\
\quad\!{1}/{x} & \quad\!\! 0<x<\varepsilon \\
\quad\!\!\,\varepsilon^{-x/\varepsilon} & \quad\!\! x\ge \varepsilon\\
\end{cases}$$

such that $\left[\cdot\right]$ rounds to the nearest integer, then function $z_{\varepsilon}:\mathbb{R}^2\to\mathbb{R}$ or

$$z_{\varepsilon}(x,k)=\big[g_{\varepsilon}(x) k\sin(g_{\varepsilon}(x)k)\big]$$

contains "pseudo-random" outputs of $\mathbb{N}$, where furthermore:

$$\small{f_{\varepsilon}(x)=\left\{\sum\limits_{k=-\infty}^{\infty}{\text{sign}\left(\mathscr{F}^{z_{\varepsilon}(x,k)}(a)\right)\mathscr{F}^{z_{\varepsilon}(x,k)}(a)}/{3^k}:a\in\left\{0,1,2\right\},x=\sum\limits_{k=-\infty}^{\infty}a/{3^k}\right\}}$$

which is the same as:

$$\scriptsize{f_{\varepsilon}(x)=\left\{\sum\limits_{k=-\infty}^{\infty}\Big(\text{sign}(\text{mod}(z_{\varepsilon}(x,k)+a,3))\cdot\text{mod}(z_{\varepsilon}(x,k)+a,3)\Big)/{3^k}:a\in\left\{0,1,2\right\},x=\sum\limits_{k=-\infty}^{\infty}a/{3^k}\right\}}$$

(i.e., $\mathscr{F}^{k}(a)=\text{mod}(a+k,3)$), such that for set $A\subseteq \mathbb{R}$ we want an $f:\mathbb{R}\to\mathbb{R}$ where:

\begin{equation}
\small{\forall(\varepsilon_1>0)\exists(A\subseteq\mathbb{R})\forall(\varepsilon\in A)\exists(M>0)\forall(x\in\mathbb{R})\left(0<\varepsilon\le M\Rightarrow \left|f_{\varepsilon}(x)-f(x)\right|<\varepsilon_{1}\right)}
\label{bjj}\tag{1}
\end{equation}

Note: For $g_{\varepsilon}(x)$, we have $2\varepsilon$ (rather than $\varepsilon$) to avoid symmetry in the graph of $f$, and the $\text{sign}$ function in $f_{\varepsilon}(x)$ to allow negative outputs in $f$'s graph.

For evidence, consider $f_{\varepsilon}(x)\mapsto f_{\varepsilon}(x,t)$ where:

$$\scriptsize{f_{\varepsilon}(x,t)=\left\{\sum\limits_{k=-\infty}^{t}\Big(\text{sign}(\text{mod}(z_{\varepsilon}(x,k)+a,3))\cdot \text{mod}(z_{\varepsilon}(x,k)+a,3)\Big)/{3^k}:a\in\left\{0,1,2\right\},x=\sum\limits_{k=-\infty}^{\infty}a/{3^k}\right\}}$$

and $x\in G_{r}:=\left\{c/d:c,d\in\mathbb{Z}, d\le r, -dr\le c\le dr\right\}$, such that when $x\in G_{10}$, we get the set of points $\left\{(x,f_{0.1}(x,10)):x\in G_{10}\right\}$, using Mathematica:

Clear["Global`*"]
ε = .1 ;(*We want ε->0*)
g[x_] := g[x] = 
  Piecewise[{{(2 ε)^(x/(2 ε)), 
     x < -2 \[CurlyEpsilon]}, {-1/x, -2 ε <= x < 0}, {0,
      x == 0}, {1/x, 
     0 < x < ε}, {\[CurlyEpsilon]^(-x/ε), \
ε <= x}}] (*g_ε(x)*)
z[x_, k_] := 
 z[x, k] = Round[g[x] k Sin[g[x] k]] (*z_ε(x,k)*)
f1[x_, k_] := 
 f1[x, k] = 
  RealDigits[N[x], 3, 2 k + 1, 
   k - 1](*Takes the digits of x from k's digit to the k-th digit*)
f[x_, t_] := 
 f[x, t] = 
  N[Sum[Sign[f1[x, t][[1]][[k]] + z[x, t - k + 1]] Mod[
      f1[x, t][[1]][[k]] + z[x, t - k + 1], 
      3]*3^(f1[x, t][[2]] - k + 1), {k, 1, 2 t + 1}]]
G[r_] := G[r] = 
  DeleteDuplicates[
   Flatten[Table[
     Range[-s*s, s*s]/s, {s, 1, r}]]] (*G_r: we want x=G_10 *)
ListPlot[Transpose[{G[10], 
   f @@@ Transpose@{G[10], ConstantArray[10, Length[G[10]]]}}]]

is the graph below

enter image description here

Question: If $f$ does not exist or satisfy the motivation, how do we change equation $\eqref{bjj}$ so it does?

Best Answer

If your goal is simply to define such a function for some countable subset $X$ then it is quite easy, just let $X=\mathbb{N}$ and let $f(x) = x$

Then for any $x \in \mathbb{N}$ and for any $y\in \mathbb{N}/\{x\}$,

$$ |y-x| < \frac{1}{2} \implies |f(x)-f(y)| > 1 $$

Simply because the premise of the implication is always false (assuming you are using the induced metric on $X$)

So you have found a suitable $\delta$ and $\epsilon$

Perhaps your question is if there is a function that satisfies this for any countable subset of $\mathbb{R}$?