6

I'm looking for a continous function $f: [0,1] \to \mathbb{R}$ such that it takes any value even (thus finite) number of times.

I suppose that it exists in the class of Lipschitz functions. All my approaches have led to some value which is taken infinite number of times.

  • Just to clarify: do you ask for $f$ to be surjective? (I'm guessing you don't, since there are no surjective continuous functions from a compact to the real line, but the formulation "takes any value" could be interpreted in this way). – Pierre-Guy Plamondon Aug 12 '15 at 10:47
  • 1
    Sorry for not being clear, function doesn't have to be surjective. I didn't specify this since 0 is an even number:) – Pasha Mishchenko Aug 12 '15 at 16:39
  • My answer here can be extended by defining $f(-\infty)=f(\infty)=\infty$ to give a function $[-\infty,\infty]\to[0,\infty]$ which is a solution to your question. – Eric Wofsey Sep 18 '15 at 06:04

2 Answers2

3

Such a function can't be continuous, as the image of a compact set under a continuous function is compact. In this example, $[0, 1]$ is compact, while $\mathbb{R}$ is not.

However, the existence of such a function can be easily shown. From basic cardinality results it is known that bijections between $[0, \frac{1}{2}]$ and $\mathbb{R}$ resp. between $(\frac{1}{2}, 1]$ and $\mathbb{R}$ exist. Combining these functions yields a function with the desired property.

Dominik
  • 19,963
2

If you are still interested, I have a partial proof for this:

Let $A$ be the set of the local maximums of $f$ and $B$ be the set of its local minimums.

First case: $f(0) \neq f(1)$:
Given that $]f(0);f(1)[$ is uncountable, and $f(A\cup B)$ is countable (see here if you're not convinced:link), I can find $a \in ]f(0);f(1)[$ verifying $a \notin f(A\cup B)$. Given the definition of $a$, every time $f-a$ hits $0$, its sign changes. However, $(f-a)(0)$ and $(f-a)(1)$ are of opposite signs, hence $f-a$ hits $0$ an odd number of times, so $f$ takes the value $a$ an odd number of times.

Tricky case: $f(0)=f(1)=0$:
We can assume that $f(0+)$ and $f(1-)$ are of the same sign, since otherwise we can use the same argument as the first part. So from now we'll consider the case where they are both positive.
Sub-case 1: $A$ and $B$ are finite: Then, since we know that $f$ is increasing around $0$ and decreasing around $1$, $|A\cup B|$ is odd, so we can choose a value $a$ verifying $|\{x \in A\cup B|f(x)=a\}|$ is odd. Given that definition, $f$ takes the value $a$ an odd number of times.
Sub-case 2: $A$ and $B$ are infinite.
I don't know how to handle this sub-case. (I think one has to use the Bolzano-Weierstrass theorem on A and B, and somehow use the continuity of $f$, but I can't quite make this work.)

GBQT
  • 916
  • It's not possible to handle sub-case 2; see my example here (you can extend it continuously to infinity so its domain becomes a closed interval). – Eric Wofsey Sep 18 '15 at 06:05
  • Could you explain how one can manage to deduce a function $[0,1] \to \mathbb{R}$ from your example? – GBQT Oct 01 '15 at 17:15
  • 1
    My example is a function $f:\mathbb{R}\to [0,\infty)$ which extends continuously to a map $\bar{f}:[-\infty,\infty]\to[0,\infty]$ by setting $f(-\infty)=f(\infty)=\infty$. Composing with homeomorphisms $[-\infty,\infty]\cong [0,1]$ and $[0,\infty]\cong[0,1]$, you get a function $g:[0,1]\to[0,1]\subset\mathbb{R}$ such that the preimage of every point has even cardinality. – Eric Wofsey Oct 01 '15 at 17:47
  • In the case 1, how are you assuming existence of local maxima and minima? What if f has kinks at those points? – Non-Being Apr 08 '17 at 11:01
  • I am not assuming their existence; if there is no local minimum, then $B$ is simply the empty set. Same goes for $A$. – GBQT Apr 09 '17 at 22:16