Visualizing an "As Discontinuous As Possible" Function

  • MHB
  • Thread starter castor28
  • Start date
  • Tags
    Function
In summary, the conversation discusses the need to exhibit a function from $\mathbb{R}$ to $\mathbb{R}$ such that the image of any open interval is the whole of $\mathbb{R}$, and how this function is "as discontinuous as possible". The solution starts by considering the equivalent problem over rational numbers, and defines a function $f:\mathbb{Q} \to \mathbb{Q}$ that meets the given criteria. Then, using this function as a starting point, a function $f:\mathbb{R} \to \mathbb{R}$ is constructed by choosing an element in each coset $x + \mathbb{Q}$ in the additive group $\mathbb
  • #1
castor28
Gold Member
MHB
255
0
Exhibit a function from $\mathbb{R}$ to $\mathbb{R}$ such that the image of any open interval is the whole of $\mathbb{R}$. (In some sense, such a function is "as discontinuous as possible").
 
Mathematics news on Phys.org
  • #2
castor28 said:
Exhibit a function from $\mathbb{R}$ to $\mathbb{R}$ such that the image of any open interval is the whole of $\mathbb{R}$. (In some sense, such a function is "as discontinuous as possible").
Laborious attempt at a solution:

[sp]Start with the equivalent problem over the rationals, namely to exhibit a function from $\mathbb{Q}$ to $\mathbb{Q}$ such that the image of any open interval is the whole of $\mathbb{Q}$.

For this, let $p_n\ (n\geqslant1)$ be the $n$th prime number. For each integer $s\geqslant2$, let $\theta(s)$ be the smallest $n$ for which $p_n$ divides $s$.

Let $\{r_n\}_{n\geqslant1}$ be an enumeration of the rational numbers.

For a rational number $q$, define $f(q) = 0$ if $q$ is an integer. If $q$ is not an integer then $q = \dfrac rs$ (where $r,s$ are coprime integers and $s>0$). In that case, define $f(q) = r_{\theta(s)}$.

Then $f:\mathbb{Q} \to \mathbb{Q}$ has the required property. In fact, if $J$ is an open interval and $n$ is a positive integer, choose $k$ so that $\dfrac1{p_n^k}$ is less than half the length of $J$. Then $J$ will contain a rational number of the form $q = \dfrac t{p_n^k}$ (where $t$ is an integer not divisible by $p_n$). It follows that $f(q) = r_n$. Thus $f(J)$ contains $r_n$ for every $n$.

Now, having completed the result for rational numbers, what about real numbers?

For that, choose an element $x_\alpha$ in each coset $x+ \mathbb{Q}$ in the additive group $\mathbb{R}$. Extend the above definition of the function $f$ from $\mathbb{Q}$ to $\mathbb{R}$ by $f(x_\alpha + q) = x_\alpha + f(q)$.

Each interval $J$ in $\mathbb{R}$ contains a representative $x_\alpha + q$ of the coset containing $x_\alpha$. The above argument for the rational case shows that $f(J)$ contains $x_\alpha + r_n$ for every $n$. In other words, $f(J)$ contains the whole coset. Since that holds for every $\alpha$, it follows that $f(J)$ is the whole of $\mathbb{R}$, as required.

Note: The Axiom of Choice is needed to choose the numbers $x_\alpha$. Is it possible to answer the question without using the Axiom of Choice?
[/sp]
 
  • #3
Opalg said:
Laborious attempt at a solution:

[sp]Start with the equivalent problem over the rationals, namely to exhibit a function from $\mathbb{Q}$ to $\mathbb{Q}$ such that the image of any open interval is the whole of $\mathbb{Q}$.

For this, let $p_n\ (n\geqslant1)$ be the $n$th prime number. For each integer $s\geqslant2$, let $\theta(s)$ be the smallest $n$ for which $p_n$ divides $s$.

Let $\{r_n\}_{n\geqslant1}$ be an enumeration of the rational numbers.

For a rational number $q$, define $f(q) = 0$ if $q$ is an integer. If $q$ is not an integer then $q = \dfrac rs$ (where $r,s$ are coprime integers and $s>0$). In that case, define $f(q) = r_{\theta(s)}$.

Then $f:\mathbb{Q} \to \mathbb{Q}$ has the required property. In fact, if $J$ is an open interval and $n$ is a positive integer, choose $k$ so that $\dfrac1{p_n^k}$ is less than half the length of $J$. Then $J$ will contain a rational number of the form $q = \dfrac t{p_n^k}$ (where $t$ is an integer not divisible by $p_n$). It follows that $f(q) = r_n$. Thus $f(J)$ contains $r_n$ for every $n$.

Now, having completed the result for rational numbers, what about real numbers?

For that, choose an element $x_\alpha$ in each coset $x+ \mathbb{Q}$ in the additive group $\mathbb{R}$. Extend the above definition of the function $f$ from $\mathbb{Q}$ to $\mathbb{R}$ by $f(x_\alpha + q) = x_\alpha + f(q)$.

Each interval $J$ in $\mathbb{R}$ contains a representative $x_\alpha + q$ of the coset containing $x_\alpha$. The above argument for the rational case shows that $f(J)$ contains $x_\alpha + r_n$ for every $n$. In other words, $f(J)$ contains the whole coset. Since that holds for every $\alpha$, it follows that $f(J)$ is the whole of $\mathbb{R}$, as required.

Note: The Axiom of Choice is needed to choose the numbers $x_\alpha$. Is it possible to answer the question without using the Axiom of Choice?
[/sp]
Dear Lord! I was actually able to understand that! :)

-Dan
 
  • #4
topsquark said:
Dear Lord! I was actually able to understand that! :)

-Dan

I didn't. I got to about half before I lost track. (Worried)
It is mighty impressive though, so perhaps I'll try again.

-ILSe
 
  • #5
Opalg said:
Laborious attempt at a solution:

[sp]Start with the equivalent problem over the rationals, namely to exhibit a function from $\mathbb{Q}$ to $\mathbb{Q}$ such that the image of any open interval is the whole of $\mathbb{Q}$.

For this, let $p_n\ (n\geqslant1)$ be the $n$th prime number. For each integer $s\geqslant2$, let $\theta(s)$ be the smallest $n$ for which $p_n$ divides $s$.

Let $\{r_n\}_{n\geqslant1}$ be an enumeration of the rational numbers.

For a rational number $q$, define $f(q) = 0$ if $q$ is an integer. If $q$ is not an integer then $q = \dfrac rs$ (where $r,s$ are coprime integers and $s>0$). In that case, define $f(q) = r_{\theta(s)}$.

Then $f:\mathbb{Q} \to \mathbb{Q}$ has the required property. In fact, if $J$ is an open interval and $n$ is a positive integer, choose $k$ so that $\dfrac1{p_n^k}$ is less than half the length of $J$. Then $J$ will contain a rational number of the form $q = \dfrac t{p_n^k}$ (where $t$ is an integer not divisible by $p_n$). It follows that $f(q) = r_n$. Thus $f(J)$ contains $r_n$ for every $n$.

Now, having completed the result for rational numbers, what about real numbers?

For that, choose an element $x_\alpha$ in each coset $x+ \mathbb{Q}$ in the additive group $\mathbb{R}$. Extend the above definition of the function $f$ from $\mathbb{Q}$ to $\mathbb{R}$ by $f(x_\alpha + q) = x_\alpha + f(q)$.

Each interval $J$ in $\mathbb{R}$ contains a representative $x_\alpha + q$ of the coset containing $x_\alpha$. The above argument for the rational case shows that $f(J)$ contains $x_\alpha + r_n$ for every $n$. In other words, $f(J)$ contains the whole coset. Since that holds for every $\alpha$, it follows that $f(J)$ is the whole of $\mathbb{R}$, as required.

Note: The Axiom of Choice is needed to choose the numbers $x_\alpha$. Is it possible to answer the question without using the Axiom of Choice?
[/sp]

That looks correct, congratulations.

Concerning your last question, the answer is yes, but you probably need a different approach.
 
  • #6
My attempt, which is admittedly a bit lame, but if I'm not mistaken it does satisfy the conditions of the problem.
The function given by
$$f(x)=\text{random}(x)$$
Where the $\text{random}$ function assigns a given $x$ to a random real number.
 
  • #7
I like Serena said:
My attempt, which is admittedly a bit lame, but if I'm not mistaken it does satisfy the conditions of the problem.
The function given by
$$f(x)=\text{random}(x)$$
Where the $\text{random}$ function assigns a given $x$ to a random real number.
[sp]Nice try! I think that the objection to it is that it does not satisfy the definition of a function because it is not reproducible. If you want to find, for example, $f(0.5)$, it will give you a value. But if you then ask for $f(0.5)$ again, it will almost surely give you a different value.

The definition of a function requires that for every $x$ in the domain of the function there should exist a unique $f(x)$.

[/sp]
 
  • #8
Opalg said:
[sp]Nice try! I think that the objection to it is that it does not satisfy the definition of a function because it is not reproducible. If you want to find, for example, $f(0.5)$, it will give you a value. But if you then ask for $f(0.5)$ again, it will almost surely give you a different value.

The definition of a function requires that for every $x$ in the domain of the function there should exist a unique $f(x)$.

[/sp]

The random function I'm proposing is a one-shot random function.
I should have made that clearer.
Say:
$$f(x)=\begin{cases}\text{random real number} &\text{if this is the first time $f(x)$ is evaluated} \\
\text{previous value of }f(x)&\text{otherwise}\end{cases}
$$
 
  • #9
Here's another attempt.

I found that the Weierstrass function is continuous everywhere and differentiable nowhere.
So I propose a variant:
$$f(x)=\sum_{n=0}^\infty 2^n\cos(3^n\pi x)$$
It gets as positive and negative as you want on any open interval however small.
 
  • #10
I like Serena said:
Here's another attempt.

I found that the Weierstrass function is continuous everywhere and differentiable nowhere.
So I propose a variant:
$$f(x)=\sum_{n=0}^\infty 2^n\cos(3^n\pi x)$$
It gets as positive and negative as you want on any open interval however small.
[sp]
The Weierstrass function is continuous everywhere. That means that, given $\varepsilon>0$, you can find an interval of width $2\delta$ whose image is contained in an interval of width $2\varepsilon$. That contradicts the fact that the image of any interval must be $\mathbb{R}$. This is what I meant by "as discontinuous as possible".
[/sp]
 
  • #11
castor28 said:
[sp]
The Weierstrass function is continuous everywhere. That means that, given $\varepsilon>0$, you can find an interval of width $2\delta$ whose image is contained in an interval of width $2\varepsilon$. That contradicts the fact that the image of any interval must be $\mathbb{R}$. This is what I meant by "as discontinuous as possible".
[/sp]
That's why I picked a variant with $a>1$ while the Weierstrass function requires $0<a<1$.
The Weierstrass form makes the function squeeze to continuity, while my choice makes it explode so that it's not even defined everywhere (for instance not for $x=0$).
Erm... I'm just realizing that with my choice I think the function is not defined anywhere. (Lipssealed)
 
  • #12
Opalg said:
Laborious attempt at a solution:

[sp]Start with the equivalent problem over the rationals, namely to exhibit a function from $\mathbb{Q}$ to $\mathbb{Q}$ such that the image of any open interval is the whole of $\mathbb{Q}$.

For this, let $p_n\ (n\geqslant1)$ be the $n$th prime number. For each integer $s\geqslant2$, let $\theta(s)$ be the smallest $n$ for which $p_n$ divides $s$.

Let $\{r_n\}_{n\geqslant1}$ be an enumeration of the rational numbers.

For a rational number $q$, define $f(q) = 0$ if $q$ is an integer. If $q$ is not an integer then $q = \dfrac rs$ (where $r,s$ are coprime integers and $s>0$). In that case, define $f(q) = r_{\theta(s)}$.

Then $f:\mathbb{Q} \to \mathbb{Q}$ has the required property. In fact, if $J$ is an open interval and $n$ is a positive integer, choose $k$ so that $\dfrac1{p_n^k}$ is less than half the length of $J$. Then $J$ will contain a rational number of the form $q = \dfrac t{p_n^k}$ (where $t$ is an integer not divisible by $p_n$). It follows that $f(q) = r_n$. Thus $f(J)$ contains $r_n$ for every $n$.

Now, having completed the result for rational numbers, what about real numbers?

For that, choose an element $x_\alpha$ in each coset $x+ \mathbb{Q}$ in the additive group $\mathbb{R}$. Extend the above definition of the function $f$ from $\mathbb{Q}$ to $\mathbb{R}$ by $f(x_\alpha + q) = x_\alpha + f(q)$.

Each interval $J$ in $\mathbb{R}$ contains a representative $x_\alpha + q$ of the coset containing $x_\alpha$. The above argument for the rational case shows that $f(J)$ contains $x_\alpha + r_n$ for every $n$. In other words, $f(J)$ contains the whole coset. Since that holds for every $\alpha$, it follows that $f(J)$ is the whole of $\mathbb{R}$, as required.

Note: The Axiom of Choice is needed to choose the numbers $x_\alpha$. Is it possible to answer the question without using the Axiom of Choice?
[/sp]
This is a thing of beauty!
 
  • #13
Here is a solution that does not use the Axiom of Choice.

[sp]
Since the interval $(0,1)$ is homeomorphic to $\mathbb{R}$ (for example, via $x\mapsto\dfrac{1-2x}{x(x-1)}$, we may replace the domain and the co-domain with $(0,1)$, i.e., we look for a function $f : (0,1)\to(0,1)$ that maps any open interval to $(0,1)$.

Given $x\in(0,1)$, we consider the decimal expansion of $x$. If there are two such expansions (like $0.5=0.499\ldots$), we can choose either one, but the rule must be fixed to ensure that the function is well defined.

If the expansion contains infinitely may 9 digits, we take $f(x)=0.5$. Otherwise, we remove all the digits up to and including the last 9 (if there is no 9, we don't remove anything), and interpret the remaining digits as the base 9 representation of a number $y$. If $y = 0$ or $y=1=0.888\ldots$, we take $f(x)=0.5$; otherwise, we take $f(x)=y$.

Conversely, given $y\in(0,1)$ and an interval $(a,b)\subset(0,1)$, we must find $x\in(a,b)$ such that $f(x)=y$. The given interval contains an interval $[n\,10^{-k}, (n+1)\,10^{-k})$ for a sufficiently large integer $k$; when written in decimal, all the numbers in that interval start with the same $k$ digits $0.x_1\ldots x_k\,$. We write $y$ in base 9 as $0.y_1y_2\ldots$ and take x as the decimal interpretation of $0.x_1\ldots x_k9y_1y_2\ldots\,$.
[/sp]
 

FAQ: Visualizing an "As Discontinuous As Possible" Function

1. What is an "As Discontinuous As Possible" function?

An "As Discontinuous As Possible" function is a type of mathematical function that has a high degree of discontinuity or abrupt changes within its graph. This means that the function has many sharp corners, breaks, and jumps, making it difficult to visualize and analyze.

2. How can I plot a "As Discontinuous As Possible" function?

To plot an "As Discontinuous As Possible" function, you can use a graphing calculator or software, such as Desmos or Wolfram Alpha. These tools can handle complex functions with discontinuities and help you visualize the graph.

3. What are some real-life examples of "As Discontinuous As Possible" functions?

One example of an "As Discontinuous As Possible" function is the Weierstrass function, which is used in fractal geometry to create self-similar patterns. Another example is the Dirichlet function, which is used in number theory to show the existence of irrational numbers.

4. How do "As Discontinuous As Possible" functions differ from smooth functions?

The main difference between "As Discontinuous As Possible" functions and smooth functions is the level of continuity. Smooth functions have continuous derivatives, meaning their graphs have no sharp corners or breaks. On the other hand, "As Discontinuous As Possible" functions have many discontinuities, making them more challenging to visualize and analyze.

5. Are "As Discontinuous As Possible" functions useful in any practical applications?

While "As Discontinuous As Possible" functions may not have many practical applications, they are essential in pure mathematics and used to explore the boundaries of mathematical concepts. They can also be used in computer graphics and simulations to create more complex and realistic visualizations.

Similar threads

Back
Top