# Continuous $f\colon [0,1]\to \mathbb{R}$ all of whose nonempty fibers are countably infinite?

I have been told it is possible to construct a continuous function $f\colon [0,1]\to \mathbb{R}$ such that $f^{-1}(x)$ is either empty or has cardinality $\aleph_0$ for every $x\in \mathbb{R}$. I've thought about this for a while but can't seem to cook up an example. Does anyone know such a construction?

-
+1 - an interesting question. If you were allowed an open interval, it would be easy, e.g., $\sin{\theta}$. Maybe try defining $f(0)=f(1)=0$ and precomposing a Gaussian-scaled cosine, $\cos{x}e^{-x^2}$, with a homeomorphism $\mathbb{R}\leftrightarrow (0,1)$? –  Neal May 12 '12 at 15:22
@Neal: I think that function takes the value $1$ only once. –  froggie May 12 '12 at 15:31
Every fiber is the preimage of a closed set, so it is a countable complete metric space. Therefore homeomorphic to an ordinal. –  Asaf Karagila May 12 '12 at 15:57
To some ordinal ... I think that compactness may kill having a smooth function which satisfies this property --- try looking at the critical points, maybe. –  Neal May 12 '12 at 16:31
This unanswered question suggests that the function can't be of bounded variation. –  Nate Eldredge May 12 '12 at 16:35
show 1 more comment

This appears to be a special case of the result in the paper:

Kwiatkowska, A. Continuous functions taking every value a given number of times. Acta Math. Hungar. 121 (2008), no. 3, 229–242. MathSciNet | arXiv

The indicatrix of a function $F$ is $f(y) := |F^{-1}(y)|$, where $f$ takes values in the set $\{0, 1, 2, \dots, \omega, \mathfrak{c}\}$ (where $\omega$ is your $\aleph_0$). Kwiatkowska's paper gives necessary and sufficient conditions for a function $f$ to be the indicatrix of some continuous function $F : [0,1] \to [0,1]$. It appears that $f \equiv \omega$ satisfies those conditions.

I skimmed the proof and it seems to be constructive, so it should be possible to use it to explicitly produce the corresponding function $F$, but I didn't take the time to do this. It would be interesting to see what it looks like.

-
That's a pretty crazy result. I'll have to have a look at their construction. I'd still be happy to see constructions that other people come up with :) –  froggie May 12 '12 at 16:09

Begin with the Cantor function. Each horizontal segment in its graph has length $3^{-n}$. The endpoints of this segment are $(a,y_0)$ and $(b,y_0)$ where $b-a=3^{-n}$ and $y_0$ is a dyadic rational. Replace this segment with a zigzag that reaches $2^{-n}$ above and below: e.g., $y_0+2^{-n}\sin (2\pi \frac{x-a}{b-a})$ will work.

This new function $f$ attains each value in $[0,1]$ countably many times. Indeed, each $y\in [0,1]$ belongs to countably many dyadic intervals $[k/2^n,(k+1)/2^n]$, $n=0,1,2\dots$. Each dyadic interval is precisely the image under $f$ of an interval of length $3^{-n-1}$ (i.e., of a gap in the Cantor set).

-
Nice construction! Thanks! –  froggie May 15 '12 at 19:49

This is a more or less explicit example of a function satisfying a similar condition, where $\aleph_0$ is substituted by $\mathfrak{c}$.

Let $\gamma\colon[0,1]\to[0,1]\times[0,1]$ be a space filing curve, that is, a continuous function such that $\gamma([0,1])=[0,1]\times[0,1]$, and let $\gamma(t)=(\alpha(t),\beta(t))$. Then $\alpha\colon[0,1]\to\mathbb{R}$ is continuous and the cardinality of $\alpha^{-1}(x)$ is $\mathfrak{c}$ for all $x\in[0,1]$.

-
Isn't any constant function a simpler (albeit much less interesting) example? –  D. Thomine May 12 '12 at 22:48
@D.Thomine Yes, it is. –  Julián Aguirre May 13 '12 at 6:52
I'll define a convergent sequence of functions $f_n: [0,1] \to [0,1]$, which will be piecewise linear, starting with $f_0(x)=x$. For each $k \in \{0, 1, \ldots, 2^n - 1\}$ a particular segment of the graph of $f_n$, call it $L_k$, will go from $y = k/2^n$ to $y = (k+1)/2^n$. For $f_{n+1}$ we replace each $L_k$ by a "zigzag" with the same starting and ending points, first going from $y=k/2^n$ to $(k+1/2)/2^n$, then back down to $k/2^n$, up to $(k+1/2)/2^n$ and then $(k+1)/2^n$, down to $(k+1/2)/2^n$ and up to $(k+1)/2^n$. The distinguished segments of the graph of $f_{n+1}$ corresponding to the intervals $[k/2^n, (k+1/2)/2^n]$ and $[(k+1/2)/2^n, (k+1)/2^n]$ are the rightmost segments of this zigzag with $y$ in those intervals. For example, here is the graph of $f_2$, with the four distinguished segments in red:
Then $f_n$ converges uniformly to a continuous function $f$ which has the desired properties.
I considered this sort of construction too, in a slightly different from: starting with $f(x)=x$, repeatedly (a) bisect each segment in the graph; (b) replace each segment with an N-shaped zigzag. However, I could not easily rule out the possibility that the limit might attain some value uncountably many times. (Then I switched to the Cantor construction in which the function is defined all at once.) –  user31373 May 16 '12 at 0:32
If you replace each segment by a zigzag, you will indeed get uncountably many points in the inverse image (which will be a perfect set). Here you get only countably many: for each $n$ and each $y \in [0,1]$, $f^{-1}(y)$ is contained in the union of the finite set $f_{n}^{-1}(y)$ and an interval whose length goes to $0$ as $n \to \infty$. –  Robert Israel May 16 '12 at 1:36