# Is it possible to have the set $f^{-1}(\lbrace x \rbrace)$ perfect for every $x$?

There are examples of functions $f \colon [0,1] \longrightarrow [0,1]$ such that for any $\alpha$, $f^{-1}(\lbrace \alpha \rbrace)$ is uncountable. My favorite example is $$f(r) = \limsup_n \frac{a_1 + a_2 +\cdots + a_n}{n}$$ where $0.a_1a_2\cdots$ is the (non-terminated) binary expansion of $r$.

Is there a continuous function $f \colon [0,1] \longrightarrow \Bbb{R}$ such that for any $\alpha \in \Bbb{R}$, $f^{-1}(\lbrace \alpha \rbrace)$ is (non-empty) perfect ?

• Is your favorite function continuous ?? – user38122 Aug 8 '13 at 12:34
• Just a remark : an easy way to construct a continuous function $f:[0,1] \rightarrow [0,1]$ such that for any $\alpha$, $f^{-1}(\alpha)$ is uncountable is to take any space filling curve $g:[0,1] \rightarrow [0,1]^2$ and then compose with the projection onto $[0,1]$. – Malik Younsi Aug 8 '13 at 13:37
• Google "locally recurrent functions". See also my comments that you can find at math.niu.edu/~rusin/known-math/00_incoming/fubini – Dave L Renfro Aug 8 '13 at 18:09
• @user38122 No, but it is of Baire class $2$. – Andrés E. Caicedo Jan 8 '14 at 8:16

Also, it can be shown that there is a residual set (a set whose complement is of first category) of continuous functions on $[0,1]$ such that for any $f$ in that set $f^{-1}(\lbrace \alpha \rbrace)$ is perfect except for countably many $\alpha$ and for each of the exceptional $\alpha 's$, $f^{-1}(\lbrace \alpha \rbrace)$ has the form $P\cup\lbrace t\rbrace$ where $P$ is perfect and $t$ is an isolated point of $f^{-1}(\lbrace \alpha \rbrace)$.
Per Malik's comment, the $y$ coordinate of the Peano curve is such a function. This it is because it is constructed using subdivision of the interval into dyadic squares, so the inverse image of each square is an interval, and the inverse image of a sufficiently small square is a sufficiently small interval. But clearly a square around a point contains other points with the same. $y$ coordinate.