2

Show that there exists a functon $f:\mathbb R\to\mathbb R$ such that if $I$ is any nonempty open interval then $f(I)=\mathbb R$.

For now I do not see how to approach this exercise. Would you have a hint ?

Note it is for any interval.

  • 1
    Use the $\tan$ function – A. Goodier Dec 22 '17 at 19:15
  • 2
    Conway's "base-13" function? – Angina Seng Dec 22 '17 at 19:16
  • @LordSharktheUnknown I look at this. –  Dec 22 '17 at 19:25
  • See https://math.stackexchange.com/questions/790927/is-there-a-function-f-colon-mathbbr-to-mathbbr-such-that-every-non-empty-o/2085298#2085298 – zhw. Dec 22 '17 at 19:30
  • Replace "any interval" with "any non-empty open interval". At least half-open would be sufficient but that is just a subtleness. – Tobias Dec 22 '17 at 19:31
  • Thanks. So it was impossible to find such an example alone. –  Dec 22 '17 at 19:37
  • The close vote was for it being unclear what you're asking, and I agree. While the title as it stands is fine, the question should be stated clearly in the body of the question. And by clearly, I mean more clearly than it is stated in the title. The question linked above by zhw does this. Being imprecise, the title is insufficient as a question, note that interval includes degenerate cases like $[a,a]$ or $[0,-1]=\varnothing$, which you presumably mean to exclude. – jgon Dec 22 '17 at 20:09
  • OK. $[0,-1] = [-1,0]$ in terms of barycenters. –  Dec 22 '17 at 20:13
  • @zhw. I posted an answer which I now realize has a lot in common with your answer posted to a different question, with a link that you provided in a comment above (to the point that I picked similar notation, $I_n$, $K_n$ without realizing). I would think that your version is easier to follow (subject to the Baire category theorem being a bit easier than all the details involved in the use of Hamel bases, which I believe is the case). – Mirko Dec 23 '17 at 03:43
  • @Mirko We don't need Baire for the approach I took. – zhw. Dec 23 '17 at 21:18
  • @zhw. You are right, at each step we only need to remove finitely many Cantor set, so we do not need the Baire category theorem. I didn't think carefully when I read your answer (to the duplicate question). I was thinking today there is an argument involving only cardinality (not involving either Cantor sets, or Hamel base) may write yet another answer later. – Mirko Dec 23 '17 at 23:10
  • It is more interesting to ask if there is continuous function which maps every open interval onto $\mathbb R$. – Kavi Rama Murthy Dec 28 '17 at 05:37
  • @KaviRamaMurthy joke ? :) –  Dec 28 '17 at 06:37

3 Answers3

2

You may use a Hamel basis (as an alternative, to the answer by David C. Ullrich already posted). A Hamel basis is a basis of the reals $\mathbb R$ as a vector space over the rationals $\mathbb Q$. Let $\mathcal B=\{I_n:n\in\mathbb N\}$ be the family of all open intervals with rational endpoints, indexed by the set $\mathbb N$ of positive integers. Any Hamel basis must contain a subset $H$ with all of the following properties: (a) $H$ has cardinality continuum (same as the cardinality of the real line), (b) $H$ is bounded, and (c) every (finite) linear combination of (different) elements of $H$ with non-zero rational coefficients results in irrational numbers only. (Just use that any Hamel basis $A$ must have cardinality continuum, and throw away the finitely many elements of the basis that appear in the linear combination representing the number $1$, and use that there must be an $n$ such that $A\cap[-n,n]$ must have cardinality continuum since the continuum has uncountable cofinality ... well alternatively use that $[0,1]$ spans the reals over the rationals, and hence contains a Hamel basis, from which we could throw out the finitely many elements that appear in the linear combination representing $1$, and obtain our $H$ satisfying the above conditions (a), (b), and (c). It is not too difficult to show that every Hamel basis must have the cardinality of the continuum, I could expand on that if necessary.)

Next pick a strictly decreasing sequence of positive rationals $p_n$ and a sequence of rationals $q_n$ such that $K_n\subset I_n$, where $K_n=p_n H + q_n := \{p_n h + q_n: h\in H\}$. Note that if $n\not=m$ then $K_n\cap K_m=\emptyset$, indeed, if $p_n h + q_n=p_m g + q_m$ for some $h,g\in H$, then $p_nh-p_mg= q_m-q_n$, but the left-hand side is irrational (by property (c) when $h\not= g$, and by $p_n\not=p_m$, when $h=g$), while the right-hand side is rational.

Take any surjective function $\varphi:H\to\mathbb R$. If $x$ is any real number of the form $p_n h + q_n$ for some $n\in\mathbb N$ and some $h\in H$ define $f(x)=\varphi(h)$. (Note that such a representation of $x$, if it exists, is unique, and hence $f$ is well-defined.) If $y$ is a real number which is not of the above form (for any $n\in\mathbb N$ and any $h\in H$) then define $f(y)$ arbitrary. (Finally, if $I$ is any open interval, then $I_n\subset I$ for some $n$, hence $f(I)\supset f(I_n)\supset f(K_n)=\mathbb R$.)

Mirko
  • 13,789
  • After posting my answer, I realized it has a lot in common with @zhw.'s answer to a different question, linked to in a comment provided earlier, above. (I even picked similar notation, $I_n$, $K_n$ without realizing, though the $K_n$ here are slightly different than the $K_n$ there, but mostly play the same sole). I would think that zhw.'s version is easier to follow (subject to the Baire category theorem, needed for some of the details there, being a bit easier than all the details involved in the use of Hamel bases, which I believe is the case). See https://math.stackexchange.com/q/2085298 – Mirko Dec 23 '17 at 03:56
1

Here's a solution to an analogous problem; it seems likely that it could be converted to a solution to the problem you pose, the details might be messy.

Let $K=\{0,1\}^{\mathbb N}$, the set of all sequences of $0$'s and $1$'s.

If $F$ is a finite sequence of $0$'s and $1$'s, let $I_F\subset K$ be the set of all sequences that start with $F$. (So for example if $s=(0,1,0,1,\dots)$ then $s\in I_{(0,1,0)}$ and $s\notin I_{(1)}$.)

We show that

There exists $f:K\to K$ such that $f(I_F)=K$ for every finite sequence $F$.

First define $a:K\to\{0,1\}$ by saying $a(s)=1$ if and only if $$\limsup\frac1n(s_1+\dots+s_n)>1/2.$$

Note that if $s=s'$ except for finitely many terms then $a(s)=a(s')$.

If $A\subset\mathbb N$ is infinite and $s\in K$ let $s_A\in K$ be the sequence that might be loosely described as the restriction of $s$ to $A$. For example if $A=\{2,4,6,\dots\}$ then $$s_A=(s_2,s_4,\dots).$$

Now choose disjoint infinite sets $A_1,A_2,\dots\subset\mathbb N$ and define $f:K\to K$ by $$f(s)=(a(s_{A_1}),a(s_{A_2}),\dots).$$

It's clear that $f(K)=K$, and since finitely many terms don't matter to $a(s)$ it follows that $f(I_F)=K$.

In case the connection to the question you asked is not clear: Define $b:K\to\mathbb R$ by $$b(s)=\sum_{j=1}^\infty s_j2^{-j}.$$

Then $b$ is not a bijection from $K$ to $[0,1]$, but it's "almost" such a bijection (the details here are what I fear might be messy). Note that if $F$ is a finite sequence then $b(I_F)$ is a dyadic subinterval of $[0,1]$ (and of course also note that any open interval contains a dyadic subinterval).

I think it's now clear that one can construct the function you ask for by diddling with binary expansions.

0

This question has been answered, it's a duplicate, and at hindsight my answer here (the older one, as I am posting a second answer to the same question now) has a lot in common with the (even older) answer by zhw. User zhw used Cantor sets, and I used a Hamel basis, but I thought I would present a different construction, again recursive, but of a somewhat different type, and using only a cardinality argument, instead of any special sets of reals.

Let $\mathcal B=\{I_n:n\in\mathbb N\}$ be the family of all open intervals with rational endpoints (as in zhw's answer as well as in my previous answer). This time, list $\mathbb R=\{x_\alpha:\alpha<\frak c\}$, where $\frak c=2^{\aleph_0}$ is the cardinality of the continuum. Recursively, for each $\alpha$ pick a countable dense set $D_\alpha=\{z_{\alpha,n}:n\in\mathbb N\}$ (where $\mathbb N$ is the non-negative integers) such that $z_{\alpha,n}\in I_n$ and $D_\alpha\cap D_\beta=\emptyset$ if $\beta<\alpha<\frak c$. This could be done since if $0<\alpha<\frak c$ then the cardinality $|I_n|=\frak c$ but $|\cup_{\beta<\alpha}D_\beta|\le |\alpha|\cdot\aleph_0=\max\{|\alpha|,\aleph_0\}<\frak c,$ so we could pick $z_{\alpha,n}\in I_n\setminus\cup_{\beta<\alpha}D_\beta\,.$ For each $\alpha$ and each $n$ define $f(z_{\alpha,n})=x_\alpha$, that is $f(D_\alpha)=\{x_\alpha\}$ (the function $f$ takes constant value $x_\alpha$ on the set $D_\alpha$). If $y\in\mathbb R\setminus\cup_{\alpha<\frak c}D_\alpha$ define $f(y)$ arbitrarily. (Note that $f$ is well-defined since if $\beta<\alpha$ then $z_{\alpha,n}\not=z_{\beta,m}$, for all $m,n\in\mathbb N$.) Then for each $n$ we have $f(I_n)=\mathbb R$ since for each $\alpha$, by construction $x_\alpha =f(z_{\alpha,n})$ and $z_{\alpha,n}\in I_n\,.$

Mirko
  • 13,789